SlideShare a Scribd company logo
What is tackled in the Java EE Security API (Java EE 8)
What is tackled in the Java EE Security API
(Java EE 8)
A G E N D A
JAVA EE
SECURITY
WHY 

UPDATE?
ALREADY

AVAILABLE?
JSR-375

SOTERIA
CONCEPTS
DEMO
• C4J
• Senior Java Web Developer, Java Coach, Information Security
• JSR-375
• Java EE Security API Expert group member
• Java EE Believer
@rdebusscher
http://jsfcorner.blogspot.be
http://javaeesquad.blogspot.be
W H O A M I
RUDY DE BUSSCHER
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
W H Y U P D A T E ?
W H Y A N E W J S R ?
• Java EE Security is viewed as not portable,
abstract/confusing, antiquated
• Doesn't fit cloud app developer paradigm:
requires app server configuration
T E R M I N O L O G Y ?
• What is that "something" where identities are
stored?
• realm (Tomcat, some hints in Servlet spec)
• (auth) repository
• (auth) store
• login module (JAAS)
• identity manager (Undertow)
• authenticator (Resin, OmniSecurity, Seam security)
• authentication provider (Spring Security)
• Identity provider
J A V A E E S E C U R I T Y
• No JSR exists to address security overall
• Each JSR has his 'own' way
• They look at each other, but ...
So what is standardised?
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
W H Y U P D A T E ?
J A S P I C
Java Authentication Service
Provider Interface for
Containers
• Java EE 6
• For custom logic
• BASIC/FORM/DIGEST
• Low Level (per request)
• Verbose
What is tackled in the Java EE Security API (Java EE 8)
Java Authorization
Service Provider
Contract for Containers
J A C C
• J2EE 1.4 ERA
• C.O.M.P.L.E.X.I.T.Y
• Application Server Wide
• No Role Mapping specified
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
G O A L S
J S R - 3 7 5
• EG discussions started March 2015
• EG Members
• EE API veterans: many JSRs, many years struggling with
Security API
• 3rd party security framework creators/developers
• EE platform security implementers
• October 2016
• EG Updated, switch Spec Lead
G O A L S
• Plug the portability holes
• Modernize
• Context Dependency Injection (CDI)
• Intercept at Access Enforcement Points: POJO methods
• Expression Language (EL)
• Enable Access Enforcement Points with complex rules
• App Developer Friendly
• Common security configurations not requiring server changes
• Annotation defaults not requiring XML
I D E A S
• Terminology
• API for Authentication Mechanism
• API for Identity Store
• API for Security Context
• API for Password Aliasing
• API for Role/Permission Assignment
• API for Authorization Interceptors
• + ...
JAVA EE 8
JAVA EE 9
S O T E R I A
• In Greek mythology, Soteria was the goddess of
safety and salvation.
• RI of JSR-375
• Should work on Java EE 7
• WildFly 10+
• Payara 4.1.1.161+
• TomEE 7.0.2+
• WebSphere Liberty 2016.9+
JASPIC JACC
SOTERIA
U S I N G
Existing blocks for authentication and authorization
OR SHOULD I PUT THE SAFE HARBOUR TEXT ...
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
C O N C E P T S
H T T P A U T H E N T I C A T I O N M E C H A N I S M
• How are credentials retrieved
• BASIC
• FORM
• classic j_security_check, ...
• CustomForm
• programmatic
• Custom
• For JAX-RS endpoints, ...
@CustomFormAuthenticationMechanismDefinition(

loginToContinue = @LoginToContinue(

loginPage="/login.xhtml",

errorPage=""

)

)
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
C O N C E P T S
I D E N T I T Y S T O R E
• Verify credentials
• LDAP
• DATABASE
• with configurable queries
• EMBEDDED
• Easy for testing with hardcoded values
• Custom
• Whatever your need is
@LdapIdentityStoreDefinition(

url = "ldap://localhost:33389/",

baseDn = "uid=ldap,ou=apps,dc=jsr375,dc=net",

password = "changeOnInstall",

searchBase = "dc=jsr375,dc=net",

searchExpression = "(&(uid=%s)(objectClass=person))",

groupBaseDn = "ou=group,dc=jsr375,dc=net"

)
C D I
• Context and Dependency Injection

concepts used for many artefacts.
• Extension to read the annotations and create
required beans.
• CDI -> beans.xml
• HttpAuthenticationMechanism
required to activate Soteria
Demo
BASIC

IN MEMORY
Demo
FORM IN JSF
WITH LDAP
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
C O N C E P T S
T R I P L E A
• Authentication
• Verifying that a user is who she says she is.
• Authorisation
• He can execute the allowed actions within their privilege.
• Accounting
• Audit
M U L T I S T O R E
• Authentication / Authorisation
• From multiple sources!
• Examples
• Scenario 1
• Authentication : LDAP
• Authorisation : Database
M U L T I S T O R E ( 2 )
• Scenario 2
• Authentication : OAuth2
• Authentication : Limited to certain email Domain
• Authorization : ...
• Scenario 3
• Authentication : ...
• Authorisation : Database
• Authorisation (In Test) : Extra roles/permissions
I D E N T I T Y S T O R E H A N D L E R
• IdentityStoreHandler
• Handles multiple defined Identity Stores
• ValidationType on IdentityStore
• BOTH
• AUTHENTICATION
• AUTHORIZATION
@LdapIdentityStoreDefinition(

url = "ldap://localhost:33389/",

baseDn = "uid=ldap,ou=apps,dc=jsr375,dc=net",

password = "changeOnInstall",

searchBase = "dc=jsr375,dc=net",

searchExpression = "(&(uid=%s)(objectClass=person))",

groupBaseDn = "ou=group,dc=jsr375,dc=net",
authenticateOnly = true

)
Demo
MULTI STORE
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
C O N C E P T S
E X T E N S I B I L I T Y
interface HttpAuthenticationMechanism
interface IdentityStore
interface IdentityStoreHandler
• Why Update?
• What is available?
• JSR-375
• Concepts
• Authentication Mechanism
• IdentityStore
• Authentication - Authorization
• Custom integration
• Security Context
C O N C E P T S
S E C U R I T Y C O N T E X T
Security

Context
Authentication

Mechanism
Identity

Store
Principal

Info for

Request
Authorization

Interceptors
U S E S D A T A
Project page
The starting point to all resources
https://java.net/projects/javaee-security-spec
Users List
Subscribe and contribute
users@javaee-security-spec.java.net
Github Soteria repository
Fork and play!
https://github.com/javaee-security-spec/soteria
G E T I N V O L V E D
Q & A

More Related Content

PDF
OAuth & OpenID Connect Deep Dive
PPTX
Terraform modules restructured
PDF
Overview of secret management solutions and architecture
PPTX
AtoM Data Migrations
PPT
Red Hat Ansible 적용 사례
PPTX
Vault - Secret and Key Management
PDF
Introduction to Google Compute Engine
PPTX
Microservices Part 3 Service Mesh and Kafka
OAuth & OpenID Connect Deep Dive
Terraform modules restructured
Overview of secret management solutions and architecture
AtoM Data Migrations
Red Hat Ansible 적용 사례
Vault - Secret and Key Management
Introduction to Google Compute Engine
Microservices Part 3 Service Mesh and Kafka

What's hot (20)

PDF
Terraform
PPTX
OpenShift Introduction
PDF
Let's build Developer Portal with Backstage
PDF
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
PPTX
GitHub Basics - Derek Bable
PPTX
Windows Azure Blob Storage
PPTX
CSV import in AtoM
PPTX
Introducing Access to Memory
PPTX
Comprehensive Terraform Training
PDF
Vault
PPTX
Hashicorp Vault ppt
PPTX
FreeIPA - Attacking the Active Directory of Linux
PPTX
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
ODP
Openshift Container Platform
PDF
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
PDF
Secure Spring Boot Microservices with Keycloak
PDF
Implementing security requirements for banking API system using Open Source ...
PDF
OpenShift 4, the smarter Kubernetes platform
PDF
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
PPTX
11.OpenShift 로 PaaS 구축
Terraform
OpenShift Introduction
Let's build Developer Portal with Backstage
Google Cloud Platform Training | Introduction To GCP | Google Cloud Platform ...
GitHub Basics - Derek Bable
Windows Azure Blob Storage
CSV import in AtoM
Introducing Access to Memory
Comprehensive Terraform Training
Vault
Hashicorp Vault ppt
FreeIPA - Attacking the Active Directory of Linux
Apache Knox Gateway "Single Sign On" expands the reach of the Enterprise Users
Openshift Container Platform
OpenStack 인스턴스 간략 사용자_매뉴얼(liberty)_v1
Secure Spring Boot Microservices with Keycloak
Implementing security requirements for banking API system using Open Source ...
OpenShift 4, the smarter Kubernetes platform
Kubernetes One-Click Deployment: Hands-on Workshop (Mainz)
11.OpenShift 로 PaaS 구축
Ad

Similar to What is tackled in the Java EE Security API (Java EE 8) (20)

PDF
Java EE Security API - JSR375: Getting Started
PDF
Finally, EE Security API JSR 375
PPTX
Java ee 8 + security overview
PPTX
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
PDF
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
PDF
Introduction to PicketLink
PPTX
Java EE 8 security and JSON binding API
PPTX
Utilize the Full Power of GlassFish Server and Java EE Security
PPTX
Java2Days - Security for JavaEE and the Cloud
PPTX
Intro to Apache Shiro
PPTX
Security Architecture of the Java Platform (http://www.javaday.bg event - 14....
PPT
Security As A Service
PPT
Session 8 Tp8
PPT
Websphere on z/OS and RACF security
PPTX
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
PDF
ADDRESSING TOMORROW'S SECURITY REQUIREMENTS IN ENTERPRISE APPLICATIONS
PDF
Java EE Services
PPT
Security in java ee platform: what is included, what is missing
PDF
Java EE Application Security With PicketLink
PPTX
Security Аrchitecture of Тhe Java Platform
Java EE Security API - JSR375: Getting Started
Finally, EE Security API JSR 375
Java ee 8 + security overview
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
Introduction to PicketLink
Java EE 8 security and JSON binding API
Utilize the Full Power of GlassFish Server and Java EE Security
Java2Days - Security for JavaEE and the Cloud
Intro to Apache Shiro
Security Architecture of the Java Platform (http://www.javaday.bg event - 14....
Security As A Service
Session 8 Tp8
Websphere on z/OS and RACF security
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
ADDRESSING TOMORROW'S SECURITY REQUIREMENTS IN ENTERPRISE APPLICATIONS
Java EE Services
Security in java ee platform: what is included, what is missing
Java EE Application Security With PicketLink
Security Аrchitecture of Тhe Java Platform
Ad

More from Rudy De Busscher (16)

PDF
jakarta-integration-testing.pdf
PDF
core-profile_jakartaOne2022.pdf
PDF
MicroStream-WithoutDatabase.pdf
PDF
Jakarta EE 8 on JDK17
PDF
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
PDF
Creating a Kubernetes Operator in Java
PDF
Finally, easy integration testing with Testcontainers
PDF
Control and monitor_microservices_with_microprofile
PDF
Transactions in micro-services (fall 2019)
PDF
Transactions in micro-services (summer 2019)
PDF
Monitor Micro-service with MicroProfile metrics
PDF
Gradual migration to MicroProfile
PDF
Secure JAX-RS
PDF
From Monolith to micro-services and back : The Self Contained Systems
PPTX
Extending Arquillian graphene
PPTX
Octopus framework; Permission based security framework for Java EE
jakarta-integration-testing.pdf
core-profile_jakartaOne2022.pdf
MicroStream-WithoutDatabase.pdf
Jakarta EE 8 on JDK17
How Class Data Sharing Can Speed up Your Jakarta EE Application Startup
Creating a Kubernetes Operator in Java
Finally, easy integration testing with Testcontainers
Control and monitor_microservices_with_microprofile
Transactions in micro-services (fall 2019)
Transactions in micro-services (summer 2019)
Monitor Micro-service with MicroProfile metrics
Gradual migration to MicroProfile
Secure JAX-RS
From Monolith to micro-services and back : The Self Contained Systems
Extending Arquillian graphene
Octopus framework; Permission based security framework for Java EE

Recently uploaded (20)

PPT
Teaching material agriculture food technology
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Empathic Computing: Creating Shared Understanding
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Approach and Philosophy of On baking technology
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
Machine learning based COVID-19 study performance prediction
PPTX
Spectroscopy.pptx food analysis technology
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Network Security Unit 5.pdf for BCA BBA.
Teaching material agriculture food technology
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Empathic Computing: Creating Shared Understanding
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Approach and Philosophy of On baking technology
Digital-Transformation-Roadmap-for-Companies.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Review of recent advances in non-invasive hemoglobin estimation
Building Integrated photovoltaic BIPV_UPV.pdf
Machine learning based COVID-19 study performance prediction
Spectroscopy.pptx food analysis technology
Spectral efficient network and resource selection model in 5G networks
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
Programs and apps: productivity, graphics, security and other tools
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Network Security Unit 5.pdf for BCA BBA.

What is tackled in the Java EE Security API (Java EE 8)

  • 2. What is tackled in the Java EE Security API (Java EE 8)
  • 3. A G E N D A JAVA EE SECURITY WHY 
 UPDATE? ALREADY
 AVAILABLE? JSR-375
 SOTERIA CONCEPTS DEMO
  • 4. • C4J • Senior Java Web Developer, Java Coach, Information Security • JSR-375 • Java EE Security API Expert group member • Java EE Believer @rdebusscher http://jsfcorner.blogspot.be http://javaeesquad.blogspot.be W H O A M I RUDY DE BUSSCHER
  • 5. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context W H Y U P D A T E ?
  • 6. W H Y A N E W J S R ? • Java EE Security is viewed as not portable, abstract/confusing, antiquated • Doesn't fit cloud app developer paradigm: requires app server configuration
  • 7. T E R M I N O L O G Y ? • What is that "something" where identities are stored? • realm (Tomcat, some hints in Servlet spec) • (auth) repository • (auth) store • login module (JAAS) • identity manager (Undertow) • authenticator (Resin, OmniSecurity, Seam security) • authentication provider (Spring Security) • Identity provider
  • 8. J A V A E E S E C U R I T Y • No JSR exists to address security overall • Each JSR has his 'own' way • They look at each other, but ...
  • 9. So what is standardised?
  • 10. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context W H Y U P D A T E ?
  • 11. J A S P I C Java Authentication Service Provider Interface for Containers • Java EE 6 • For custom logic • BASIC/FORM/DIGEST • Low Level (per request) • Verbose
  • 13. Java Authorization Service Provider Contract for Containers J A C C • J2EE 1.4 ERA • C.O.M.P.L.E.X.I.T.Y • Application Server Wide • No Role Mapping specified
  • 14. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context G O A L S
  • 15. J S R - 3 7 5 • EG discussions started March 2015 • EG Members • EE API veterans: many JSRs, many years struggling with Security API • 3rd party security framework creators/developers • EE platform security implementers • October 2016 • EG Updated, switch Spec Lead
  • 16. G O A L S • Plug the portability holes • Modernize • Context Dependency Injection (CDI) • Intercept at Access Enforcement Points: POJO methods • Expression Language (EL) • Enable Access Enforcement Points with complex rules • App Developer Friendly • Common security configurations not requiring server changes • Annotation defaults not requiring XML
  • 17. I D E A S • Terminology • API for Authentication Mechanism • API for Identity Store • API for Security Context • API for Password Aliasing • API for Role/Permission Assignment • API for Authorization Interceptors • + ... JAVA EE 8 JAVA EE 9
  • 18. S O T E R I A • In Greek mythology, Soteria was the goddess of safety and salvation. • RI of JSR-375 • Should work on Java EE 7 • WildFly 10+ • Payara 4.1.1.161+ • TomEE 7.0.2+ • WebSphere Liberty 2016.9+
  • 19. JASPIC JACC SOTERIA U S I N G Existing blocks for authentication and authorization
  • 20. OR SHOULD I PUT THE SAFE HARBOUR TEXT ...
  • 21. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context C O N C E P T S
  • 22. H T T P A U T H E N T I C A T I O N M E C H A N I S M • How are credentials retrieved • BASIC • FORM • classic j_security_check, ... • CustomForm • programmatic • Custom • For JAX-RS endpoints, ...
  • 24. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context C O N C E P T S
  • 25. I D E N T I T Y S T O R E • Verify credentials • LDAP • DATABASE • with configurable queries • EMBEDDED • Easy for testing with hardcoded values • Custom • Whatever your need is
  • 26. @LdapIdentityStoreDefinition(
 url = "ldap://localhost:33389/",
 baseDn = "uid=ldap,ou=apps,dc=jsr375,dc=net",
 password = "changeOnInstall",
 searchBase = "dc=jsr375,dc=net",
 searchExpression = "(&(uid=%s)(objectClass=person))",
 groupBaseDn = "ou=group,dc=jsr375,dc=net"
 )
  • 27. C D I • Context and Dependency Injection
 concepts used for many artefacts. • Extension to read the annotations and create required beans.
  • 28. • CDI -> beans.xml • HttpAuthenticationMechanism required to activate Soteria
  • 31. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context C O N C E P T S
  • 32. T R I P L E A • Authentication • Verifying that a user is who she says she is. • Authorisation • He can execute the allowed actions within their privilege. • Accounting • Audit
  • 33. M U L T I S T O R E • Authentication / Authorisation • From multiple sources! • Examples • Scenario 1 • Authentication : LDAP • Authorisation : Database
  • 34. M U L T I S T O R E ( 2 ) • Scenario 2 • Authentication : OAuth2 • Authentication : Limited to certain email Domain • Authorization : ... • Scenario 3 • Authentication : ... • Authorisation : Database • Authorisation (In Test) : Extra roles/permissions
  • 35. I D E N T I T Y S T O R E H A N D L E R • IdentityStoreHandler • Handles multiple defined Identity Stores • ValidationType on IdentityStore • BOTH • AUTHENTICATION • AUTHORIZATION
  • 36. @LdapIdentityStoreDefinition(
 url = "ldap://localhost:33389/",
 baseDn = "uid=ldap,ou=apps,dc=jsr375,dc=net",
 password = "changeOnInstall",
 searchBase = "dc=jsr375,dc=net",
 searchExpression = "(&(uid=%s)(objectClass=person))",
 groupBaseDn = "ou=group,dc=jsr375,dc=net", authenticateOnly = true
 )
  • 38. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context C O N C E P T S
  • 39. E X T E N S I B I L I T Y interface HttpAuthenticationMechanism interface IdentityStore interface IdentityStoreHandler
  • 40. • Why Update? • What is available? • JSR-375 • Concepts • Authentication Mechanism • IdentityStore • Authentication - Authorization • Custom integration • Security Context C O N C E P T S
  • 41. S E C U R I T Y C O N T E X T Security
 Context Authentication
 Mechanism Identity
 Store Principal
 Info for
 Request Authorization
 Interceptors U S E S D A T A
  • 42. Project page The starting point to all resources https://java.net/projects/javaee-security-spec Users List Subscribe and contribute [email protected] Github Soteria repository Fork and play! https://github.com/javaee-security-spec/soteria G E T I N V O L V E D
  • 43. Q & A