SlideShare a Scribd company logo
Java EE Platform Security What is included, what is missing. Masoud Kalali Author of GlassFish security book Http://kalali.me
What can Security refer to?
Security requirements Authentication Authorization Transport Security Single Sign-On
Java EE and Security Requirements I @ServletSecurity(@HttpConstraint(rolesAllowed = {&quot;manager&quot;, &quot;administrator&quot;})) ... String usrname = request.getParameter(&quot;username&quot;);  String pass = request.getParameter(&quot;password&quot;); request.login(strUsername, strPassword); .... <login-config> <auth-method>BASIC</auth-method> <realm-name>JDBCRealm</realm-name> </login-config> What Java EE provides for Authentication: Authentication Methods (Form, Basic, Digest, Client-Cert) Security Realms Programmatic  login/ logout, setHttpOnly isHttpOnly, @ServletSecurity Adding new or Extending Realms, extending current realms  JSR-196, pluggable authentication
Java EE and Security Requirements II What Java EE platform provides for authorization: Role based access control over resources Roles are defined in a vendor specific way Roles are based on the info from the same security realm Enforced using Annotation or XML description Can be extend using JSR-115 <method-permission>  <role-name>manager</role-name>  <method>    <ejb-name>Emp</ejb-name>    <method-name>getAge</method-name>    </method>  </method-permission> Annotation Targets Level Target Kind @DeclareRoles Class EJB, Servlet @RunAs Class  EJB, Servlet @ServletSecurity Class  Servlet @PermitAll Class, Method EJB @DenyAll Method EJB @RolesAllowed Class, Method EJB
Java EE and Security Requirements III The Transport Security facilities: Confidentiality Data integrity Different set of resources, different level of transport security <security-constraint> <display-name>Current Online Users</display-name> <web-resource-collection> <web-resource-name>online users</web-resource-name> <description/> <url-pattern>/admin/online/*</url-pattern> </web-resource-collection> <auth-constraint> <description/> <role-name>manager</role-name> </auth-constraint> <user-data-constraint> <description/> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
Java EE and Security Requirements IV What Java EE platform provides for SSO: Nothing out of JSRs Application servers provide some basic functionalities with restrictions: Same Realm Same Virtual Server/ Host Other solutions like proxies like delegated authentication to Apache mod_proxy Clustering the instances Need same realm
Is that All? Really, Is that all we need to have? Do we miss anything major? Is there anything still basic and good to have?
Basic, but missing requirements Authentication chain Fine grained access control Single Sign-On
Basic, but missing requirements I Chain of authentication challenges One realm, provider failed chain to the next one Put Challenges together in groups Basic rules to forms the groups Authentication levels Higher level for more secure realms More resources accessible on higher authentication levels Authentication chain:
Basic, but missing requirements II Fine grained access control Coarse grained allow/not-allow are not sufficient anymore A very common issue: time, location based access control XACML is there, but not in the platform Attribute based access evaluation Attributes for all involving factors Version 2 is mature enough, Version 3 in the corner JBoss and Sun open source XACML implementations http://sunxacml.sourceforge.net/ http://www.jboss.org/picketbox/
Basic, but missing requirements III What to do with more SSO requirements? It may never get into the platform Involve more than just Java EE Heavy, complex and open ended Go with JOSSO,  http://www.josso.org/ Go with OpenSSO,  http://opensso.dev.java.net Both work with CDSSO Integrate with many platforms/ servers Can be used from almost any language
Time For Questions Questions? You can contact me at  [email_address]  or  http://twitter.com/MasoudKalali

More Related Content

PPT
JavaEE Security
PPT
Developing With JAAS
PPTX
Extending Arquillian graphene
PDF
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
PPTX
Octopus framework; Permission based security framework for Java EE
PDF
Java EE Application Security With PicketLink
PPTX
Java ee 8 + security overview
PDF
J2EE Security with Apache SHIRO
JavaEE Security
Developing With JAAS
Extending Arquillian graphene
Peeples authentication authorization_services_with_saml_xacml_with_jboss_eap6
Octopus framework; Permission based security framework for Java EE
Java EE Application Security With PicketLink
Java ee 8 + security overview
J2EE Security with Apache SHIRO

What's hot (20)

PDF
From 0 to Spring Security 4.0
PPTX
Learn Apache Shiro
PPTX
Spring Security
PPTX
Spring Security 3
PDF
Super simple application security with Apache Shiro
PPTX
Intro to Apache Shiro
PPTX
Java Security Framework's
PPTX
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
PPT
Java Security
PDF
SSO using CAS + two-factor authentication (PyGrunn 2014 talk)
PPTX
Access Control Pitfalls v2
PPTX
Spring Security
PDF
Securing REST APIs
PPT
CAS Enhancement
PPTX
Spring Security 5
PPTX
Deep dive into Java security architecture
PPTX
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
PDF
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
PDF
Fun With Spring Security
PPTX
Token Authentication for Java Applications
From 0 to Spring Security 4.0
Learn Apache Shiro
Spring Security
Spring Security 3
Super simple application security with Apache Shiro
Intro to Apache Shiro
Java Security Framework's
ApacheCon 2014: Infinite Session Clustering with Apache Shiro & Cassandra
Java Security
SSO using CAS + two-factor authentication (PyGrunn 2014 talk)
Access Control Pitfalls v2
Spring Security
Securing REST APIs
CAS Enhancement
Spring Security 5
Deep dive into Java security architecture
API Security & Federation Patterns - Francois Lascelles, Chief Architect, Lay...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Fun With Spring Security
Token Authentication for Java Applications
Ad

Viewers also liked (6)

PDF
Java Security Manager Reloaded - jOpenSpace Lightning Talk
PDF
Java Security Overview
PPTX
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
PPT
Java security
PPT
Security As A Service
PPT
Security via Java
Java Security Manager Reloaded - jOpenSpace Lightning Talk
Java Security Overview
Security Architecture of the Java Platform (BG OUG, Plovdiv, 13.06.2015)
Java security
Security As A Service
Security via Java
Ad

Similar to Security in java ee platform: what is included, what is missing (20)

PDF
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
PPTX
Utilize the Full Power of GlassFish Server and Java EE Security
PDF
Finally, EE Security API JSR 375
PDF
Java EE Services
PPTX
Introduction To Building Enterprise Web Application With Spring Mvc
PPTX
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
PPTX
SCWCD : Secure web : CHAP : 7
PPTX
SCWCD : Secure web
PDF
Dev objecttives-2015 auth-auth-fine-grained-slides
PDF
Authentication Control
PPTX
Java EE 8 security and JSON binding API
PDF
ADDRESSING TOMORROW'S SECURITY REQUIREMENTS IN ENTERPRISE APPLICATIONS
PDF
Spring4 security
PDF
Apache Roller, Acegi Security and Single Sign-on
PPT
Websphere on z/OS and RACF security
PPT
Extending Oracle SSO
PDF
Single Sign-on Framework in Tizen
PDF
Anil saldhana securityassurancewithj_bosseap
PPTX
Enrterprise Java-Unit 1 (All chapters) for TYIT PPTx
PPTX
Enterprise Java TYIT Sem 5 Unit 1 Chapter 1 and 2 PPT
THEFT-PROOF JAVA EE - SECURING YOUR JAVA EE APPLICATIONS
Utilize the Full Power of GlassFish Server and Java EE Security
Finally, EE Security API JSR 375
Java EE Services
Introduction To Building Enterprise Web Application With Spring Mvc
JSR 375 - Have you seen Java EE Security API lately? - codemotion Tel Aviv 2015
SCWCD : Secure web : CHAP : 7
SCWCD : Secure web
Dev objecttives-2015 auth-auth-fine-grained-slides
Authentication Control
Java EE 8 security and JSON binding API
ADDRESSING TOMORROW'S SECURITY REQUIREMENTS IN ENTERPRISE APPLICATIONS
Spring4 security
Apache Roller, Acegi Security and Single Sign-on
Websphere on z/OS and RACF security
Extending Oracle SSO
Single Sign-on Framework in Tizen
Anil saldhana securityassurancewithj_bosseap
Enrterprise Java-Unit 1 (All chapters) for TYIT PPTx
Enterprise Java TYIT Sem 5 Unit 1 Chapter 1 and 2 PPT

More from Masoud Kalali (12)

PPTX
Real world RESTful service development problems and solutions
PDF
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
PDF
BOF 2193 - How to work from home effectively
PDF
Real-World RESTful Service Development Problems and Solutions
PDF
How to avoid top 10 security risks in Java EE applications and how to avoid them
PDF
Java EE 7 overview
PPT
Confess 2013: OWASP Top 10 and Java EE security in practice
ODP
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
PPTX
Slides for the #JavaOne Session ID: CON11881
PPT
An Overview of RUP methodology
PPT
An overview of software development methodologies.
PPT
NIO.2, the I/O API for the future
Real world RESTful service development problems and solutions
CON 2107- Think Async: Embrace and Get Addicted to the Asynchronicity of EE
BOF 2193 - How to work from home effectively
Real-World RESTful Service Development Problems and Solutions
How to avoid top 10 security risks in Java EE applications and how to avoid them
Java EE 7 overview
Confess 2013: OWASP Top 10 and Java EE security in practice
Server Sent Events, Async Servlet, Web Sockets and JSON; born to work together!
Slides for the #JavaOne Session ID: CON11881
An Overview of RUP methodology
An overview of software development methodologies.
NIO.2, the I/O API for the future

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Approach and Philosophy of On baking technology
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
Teaching material agriculture food technology
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
MYSQL Presentation for SQL database connectivity
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Programs and apps: productivity, graphics, security and other tools
A comparative analysis of optical character recognition models for extracting...
Approach and Philosophy of On baking technology
Review of recent advances in non-invasive hemoglobin estimation
20250228 LYD VKU AI Blended-Learning.pptx
Machine learning based COVID-19 study performance prediction
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Diabetes mellitus diagnosis method based random forest with bat algorithm
Mobile App Security Testing_ A Comprehensive Guide.pdf
Building Integrated photovoltaic BIPV_UPV.pdf
A Presentation on Artificial Intelligence
Dropbox Q2 2025 Financial Results & Investor Presentation
Teaching material agriculture food technology
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Network Security Unit 5.pdf for BCA BBA.
The Rise and Fall of 3GPP – Time for a Sabbatical?
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

Security in java ee platform: what is included, what is missing

  • 1. Java EE Platform Security What is included, what is missing. Masoud Kalali Author of GlassFish security book Http://kalali.me
  • 2. What can Security refer to?
  • 3. Security requirements Authentication Authorization Transport Security Single Sign-On
  • 4. Java EE and Security Requirements I @ServletSecurity(@HttpConstraint(rolesAllowed = {&quot;manager&quot;, &quot;administrator&quot;})) ... String usrname = request.getParameter(&quot;username&quot;); String pass = request.getParameter(&quot;password&quot;); request.login(strUsername, strPassword); .... <login-config> <auth-method>BASIC</auth-method> <realm-name>JDBCRealm</realm-name> </login-config> What Java EE provides for Authentication: Authentication Methods (Form, Basic, Digest, Client-Cert) Security Realms Programmatic login/ logout, setHttpOnly isHttpOnly, @ServletSecurity Adding new or Extending Realms, extending current realms JSR-196, pluggable authentication
  • 5. Java EE and Security Requirements II What Java EE platform provides for authorization: Role based access control over resources Roles are defined in a vendor specific way Roles are based on the info from the same security realm Enforced using Annotation or XML description Can be extend using JSR-115 <method-permission> <role-name>manager</role-name> <method> <ejb-name>Emp</ejb-name> <method-name>getAge</method-name> </method> </method-permission> Annotation Targets Level Target Kind @DeclareRoles Class EJB, Servlet @RunAs Class EJB, Servlet @ServletSecurity Class Servlet @PermitAll Class, Method EJB @DenyAll Method EJB @RolesAllowed Class, Method EJB
  • 6. Java EE and Security Requirements III The Transport Security facilities: Confidentiality Data integrity Different set of resources, different level of transport security <security-constraint> <display-name>Current Online Users</display-name> <web-resource-collection> <web-resource-name>online users</web-resource-name> <description/> <url-pattern>/admin/online/*</url-pattern> </web-resource-collection> <auth-constraint> <description/> <role-name>manager</role-name> </auth-constraint> <user-data-constraint> <description/> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> </security-constraint>
  • 7. Java EE and Security Requirements IV What Java EE platform provides for SSO: Nothing out of JSRs Application servers provide some basic functionalities with restrictions: Same Realm Same Virtual Server/ Host Other solutions like proxies like delegated authentication to Apache mod_proxy Clustering the instances Need same realm
  • 8. Is that All? Really, Is that all we need to have? Do we miss anything major? Is there anything still basic and good to have?
  • 9. Basic, but missing requirements Authentication chain Fine grained access control Single Sign-On
  • 10. Basic, but missing requirements I Chain of authentication challenges One realm, provider failed chain to the next one Put Challenges together in groups Basic rules to forms the groups Authentication levels Higher level for more secure realms More resources accessible on higher authentication levels Authentication chain:
  • 11. Basic, but missing requirements II Fine grained access control Coarse grained allow/not-allow are not sufficient anymore A very common issue: time, location based access control XACML is there, but not in the platform Attribute based access evaluation Attributes for all involving factors Version 2 is mature enough, Version 3 in the corner JBoss and Sun open source XACML implementations http://sunxacml.sourceforge.net/ http://www.jboss.org/picketbox/
  • 12. Basic, but missing requirements III What to do with more SSO requirements? It may never get into the platform Involve more than just Java EE Heavy, complex and open ended Go with JOSSO, http://www.josso.org/ Go with OpenSSO, http://opensso.dev.java.net Both work with CDSSO Integrate with many platforms/ servers Can be used from almost any language
  • 13. Time For Questions Questions? You can contact me at [email_address] or http://twitter.com/MasoudKalali