SlideShare a Scribd company logo
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
SAML authentication in AEM
Sham Hassan Chikkegowda
Customer Support Engineer
Timothee Maret
Sr. Software Developer&
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Agenda
•  SAML 2.0
A quick overview
•  AEM & SAML
Supported features
•  Configurations
Settings in typical deployments
•  Troubleshoot
How to analyze deployment issues
•  Changelog
Improvements in AEM 6.2
•  Q & A
2
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
SAML 2.0
A quick overview
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Overview of SAML 2.0
§  Security Assertion Markup Language
§  Open standard (OASIS) for Federated Identity implementations
§  XML based Framework for exchanging authentication and authorization data across security domains
§  Enables security use cases
§  Seamless cross domain browsing via Web Single Sign-On (SSO)
§  Attribute-Based Authorization
§  Securing Web Services
4
Source: [SAMLTech]
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
SAML Web SSO
5
Participants Use case
Identity Provider
(IdP)
Service Provider
(SP)
Principal
User
Authenticate
Provide
Assert
User
service.foo.ch (SP1)
service.bar.com (SP2)
IdentityInformation
Source: [SAMLTech]
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
AEM & SAML
• Supported features
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
SAML features supported in AEM
SAML 2.0 standard
Web Browser SSO Profile
POST Binding
SP & IdP initiated Single Sign-On (SSO)
Single Logout Profile
POST Binding
SP & IdP initiated Single Log-Out (SLO)
XML Signature
XML Encryption
7
AEM authentication handler
Auto creation of users and assignment to groups
Attribute synchronization
Multiple authentication handlers configurations
Global and per request landing page
Configurable clock drift compensation (HF 9985)
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Web Browser SSO Profile
8
to /path/ending/with/saml_login
Create/update repository user
Sync attributes
Decide resource to redirect to (landing page)
Set Cookie
- login-token
Using Cookie:
- login-token
Commonly Used IdP
IBM ISFIM, Oracle SSO,
OKTA, Ping Federate,
MS ADFS, SecureAuth,
Google, Onelogin,
Shiboleth, CA Siteminder, etc.
Set Cookies:
- saml_request_path
- anchor_backup
+ SP identifier
(e.g. req. parameter)
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Security considerations (1/2)
9
Public
SP
Private
IdP Public
IdP
Private
SP
Key provided to the SP/AEM
Key provided to IdP
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Security considerations (2/2)
Security feature Required Description
Authentication & Integrity Yes Guarantees that the received assertions to have been emit by the trusted
IdP and have not been modified
Achieved using XML Signature
No Guarantee that the SAMLRequest has been emit by the trusted SP/AEM
and the owner document has not been modified
Achieved using XML Signature
Confidentiality No Assertions may contain sensitive data (e.g. PII data) which must only be
read by the recipient
Achieved
•  End to end using XML Encryption
•  Point to point using TLS (HTTPS)
10
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Configurations
Settings in typical deployments
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Security (1/4)
Authentication & Integrity
§  Validating the origin and validating the integrity of the assertions (mandatory)
How
12
SAML auth. handler property Configuration
idpCertAlias Set the alias of the IdP certificate in the global TrustStore
Key Configuration
Set the IdP certificate in the global TrustStorePublic
IdP
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Security (2/4)
Confidentiality
§  End-to-end confidentiality by encrypting the assertions (optional)
How
13
SAML auth. handler property Configuration
useEncryption Check if the authentication handler expects encrypted assertions
spPrivateKeyAlias Set the alias of the SP certificate in the KeyStore
keyStorePassword Set the password of the ‘authentication-service’ user KeyStore
Key Configuration
Set the SP private key in the ‘authentication-service’ service user KeyStore
Set the SP private key in the ‘authentication-service’ service user KeyStore
Public
SP
Private
SP
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Security (3/4)
Managing cryptographic keys
!  Storing SP certificates and private key in the repository under the paths /etc/key/saml/[public|idp_cert|private] is no longer
supported since the release com.adobe.granite.auth.saml-0.3.26 (DOC-8250, DOC-5509)
How
14
Set SP key pair in ‘authentication-service’ KeyStore
1.  Browse /libs/granite/security/content/useradmin.html
2.  Select the user ‘authentication-service’
3.  Create the KeyStore if needed
Keep the KeyStore password for property keyStorePassword of
SAML authentication handler configuration
4.  Click on ‘Manage KeyStore’
5.  Upload the SP private key and public certificate
Keep the private key alias for property spPrivateKeyAlias of
SAML authentication handler configuration
Set IdP public key in global TrustStore
1.  Browse /libs/granite/security/content/useradmin.html
2.  Select any user
3.  Create the global TrustStore if needed
4.  Click on ‘Manage TrustStore’
5.  Upload IdP public certificate
Keep the alias for property idpCertAlias of SAML authentication
handler configuration
Private keys in PKCS12 or JKS format
Public keys in public certificate in PKCS#12, JKS or CER format
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Security (4/4)
Deployment behind a dispatcher/LB
! Most deployments of SSL are terminated at the load balancer or at the dispatcher and communication to AEM
instance happens over HTTP
How
Make instances SSL context aware by configuring
http://host:port/system/console/configMgr/org.apache.felix.http.sslfilter.SslFilter
15
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Auto creation of users
What
§  AEM can automatically create non-existing AEM users on first login
§  The user identifier and properties are derived from the assertions
How
16
SAML auth.
handler property
Configuration
createUser Check to enable the feature
userIDAttribute Set the name of the attribute containing the user ID
Leave empty to use the Subject:NameId attribute
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Add user to groups
What
§  AEM can automatically assign the user to the respective groups
How
17
SAML auth. handler property Configuration
addGroupMemberships Check to enable the feature
groupMembershipAttribute Set the name of the attribute containing a list of
AEM groups this user should be added to
defaultGroups Set the list of default AEM groups users are added
to after successful authentication
! Attribute value is an array not a list of group names
! Make sure neither default groups OR attribute
containing AEM group is administrator
! Prior to Granite-9432 SAML IdP would override any
groups a user was added to manually on the AEM
instance
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Attributes synchronization
What
§  AEM can store additional attributes from a SAML assertion in the repository (e.g. firstname, lastname, etc.)
§  Synchronization happens during login
How
18
SAML auth. handler
property
Configuration
synchronizeAttributes Set the list of attribute from the SAML response to be
stored at a path relative to the user node
Example
emailAddress=profile/email
givenName=profile/givenName
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Single Log-Out (SLO)
What
§  AEM can close IdP and SP sessions upon logout
§  IdP or SP Initiated SLO
§  Attempt to logout all SP from the same session
How
!  Signin-out should be the same binding
!  Sensitive to clock drifts (HF 9985)
19
SAML auth. handler
property
Configuration
handleLogout Check to enable the feature
logoutUrl URL of the IdP where the SAML logout request should be
sent to
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Landing page
What
§  AEM supports specifying the path to redirect after successful login
§  Narrow the focus on requested protected page
How
20
SAML auth. handler
property
Configuration
defaultRedirectUrl Set the default landing page path (only for IdP
initiated login)
Cookie name Value
saml_request_path Use the cookie to define a request specific landing
page path
Order of priority
1.  Cookie (saml_request_request)
2.  SAML Authentication Handler
redirect (defaultRedirectUrl)
3.  Apache Sling default redirects
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Troubleshoot
How to analyze deployment issues
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Methodology
SAML deployments integrate multiple services supported by heterogeneous parties
(companies, teams) connected with an open standard
22
Observe message
exchanged
Observe logs
Compare with
SAML standard
Identify wrong
configuration
Enable logging/tracing on AEM
and dispatcher/LB if available
Avoid encryption for debugging
Record client traffic
Check the pipes are clear (dispatcher, LB, etc.)
Isolate Issue
[SAMLBind] § 3.5 - HTTP Post Binding
§ 3.5.5 - Message Exchange
[SAMLProf] § 4.1 - Web Browser SSO Profile
§ 4.4 - Single Logout Profile
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Tools
On AEM
§  Capture logs by enabling logging/tracing for the packages
com.adobe.granite.auth.saml & org.apache.sling.auth
On client
§  Record browsing session in HAR file
https://help.tenderapp.com/kb/troubleshooting-your-tender-site/generating-an-har-file
§  Observe SAML messages being transferred
https://addons.mozilla.org/en-US/firefox/addon/saml-tracer
SAML 2.0
§  Encrypting/decrypting, signing/validating, generating, SAML messages
https://www.samltool.com/encrypt.php
23
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Common mistakes
•  Assertions not signed by the IdP
•  Dispatcher/LB layer does not forward the saml_request_path cookie
•  Missing/wrong session management with dispatcher enabling secure sessions
•  IdP does not forward the saml_request_path cookie
•  POST requests are cached at the dispatcher due to rewrite rules
•  Consumption URL and entity id do not match
•  HTTP SSL filter configuration does not retain the user in SSL protocol
•  IdP does not support SLO (some don’t, refer to IdP documentation)
•  IdP server & AEM server not in sync with Internet time server (Configurable clock drift helps)
24
If allowAuthorized is set to ‘0’ then
add below session management
section in dispatcher.any file
/sessionmanagement {
/directory "<path>/.sessions"
/encode "md5"
/header "Cookie:login-token"
/timeout "800"
}
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Error & resolutions
Symptom Common cause
HTTP ERROR: 403 Problem accessing /saml_login. Reason:
Forbidden
The IdP hostname is not configured in Http Referer Filter
com.adobe.granite.auth.saml.model.Assertion Invalid
Assertion: notOnOrAfter
Assertion not valid in time. IdP server & AEM server not in
sync with Internet time server
com.adobe.granite.auth.saml.SamlAuthenticationHandler
Private key of SP not provided: Cannot sign Authn request
It is a warning & can be ignored if not using encryption and
the IdP accepts unsigned assertions
com.adobe.granite.auth.saml.util.SamlReader Failed
validating signature
Signed SAML response signature not matching with IdP
public certificate stored in AEM
javax.xml.crypto.dsig.XMLSignatureException:
java.security.SignatureException: Signature length not
correct: got 128 but was expecting 256
you are signing with a 1024-bit key but attempting to
verify with a 2048-bit key
AccessDeniedException One of the value of attribute containing a list of AEM
groups is administrators
25
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Changelog
Improvements in AEM 6.2
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Improvements in AEM 6.2
•  Release note
https://docs.adobe.com/docs/en/aem/6-2/release-notes/wcm-platform.html
•  SAML Handler should provide landing page in case of AEM side authentication errors
GRANITE-8928
•  SAML IdP Removes Users from Groups
GRANITE-9432
•  Configurable Clock drift compensation
HF 11082, HF 9985
27
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
References
•  SAML 2.0 Authentication Handler
https://docs.adobe.com/docs/en/aem/6-2/administer/security/saml-2-0-authenticationhandler.html
•  [SAMLProf] Profiles for the OASIS Security Assertion Markup Language (SAML) V2.0
https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf
•  [SAMLBind] Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0
https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf
•  [SAMLTech] Security Assertion Markup Language (SAML) V2.0 Technical Overview
https://www.oasis-open.org/committees/download.php/27819/sstc-saml-tech-overview-2.0-cd-02.pdf
•  SAML V2.0 Executive Overview
https://www.oasis-open.org/committees/download.php/13525/sstc-saml-exec-overview-2.0-cd-01-2col.pdf
28
© 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential.
Q & A
29
AEM GEMS Session SAML authentication in AEM

More Related Content

PPTX
AEM (CQ) Dispatcher Security and CDN+Browser Caching
PPTX
Web Application Security 101
PDF
Connecting Connect with Spring Boot
PDF
Splunk Architecture | Splunk Tutorial For Beginners | Splunk Training | Splun...
PPTX
Android studio installation
PDF
Building blocks of Angular
PDF
Laravel Introduction
PPTX
Security misconfiguration
AEM (CQ) Dispatcher Security and CDN+Browser Caching
Web Application Security 101
Connecting Connect with Spring Boot
Splunk Architecture | Splunk Tutorial For Beginners | Splunk Training | Splun...
Android studio installation
Building blocks of Angular
Laravel Introduction
Security misconfiguration

What's hot (20)

PPTX
ASP.NET MVC.
 
PPTX
Selenium WebDriver avec Java
PPTX
WEB DEVELOPMENT
PDF
Spring MVC Framework
PPTX
Asp.Net Core MVC with Entity Framework
PPTX
API Design- Best Practices
PPTX
Spring boot - an introduction
PPTX
Laravel Tutorial PPT
PPTX
React Workshop
PPT
Soap and Rest
PDF
xCP 2.1 Developer Guide
PPTX
AEM Rich Text Editor (RTE) Deep Dive
PDF
Introduction to Sightly
PPTX
Android - Broadcast Receiver
PDF
Microservices Design Patterns | Edureka
PDF
Fundamentals of Web Development For Non-Developers
PPTX
AngularJS Architecture
PPTX
Content Management System(CMS) & Basic WordPress
PPTX
Getting Started with Lightning Web Components | LWC | Salesforce
PPT
MVC ppt presentation
ASP.NET MVC.
 
Selenium WebDriver avec Java
WEB DEVELOPMENT
Spring MVC Framework
Asp.Net Core MVC with Entity Framework
API Design- Best Practices
Spring boot - an introduction
Laravel Tutorial PPT
React Workshop
Soap and Rest
xCP 2.1 Developer Guide
AEM Rich Text Editor (RTE) Deep Dive
Introduction to Sightly
Android - Broadcast Receiver
Microservices Design Patterns | Edureka
Fundamentals of Web Development For Non-Developers
AngularJS Architecture
Content Management System(CMS) & Basic WordPress
Getting Started with Lightning Web Components | LWC | Salesforce
MVC ppt presentation
Ad

Viewers also liked (20)

PDF
Aem authentication vs idp
PPTX
AEM GEMs Session Oak Lucene Indexes
PPT
Regions of the United States: The Northeast
PPTX
HORMONAL REGULATION OF OVULATION,PREGNANCY,PARTURITION
PDF
Project Scheduling
PDF
The six key steps to AEM architecture
DOCX
Strengths in the addie model
PDF
AEM Best Practices for Component Development
PPTX
IdP, SAML, OAuth
PPTX
Solve 3 Enterprise Storage Problems Today
PPSX
Integrated Lifecycle Marketing Workshop: Emerging Channels for Email List Bui...
ODP
Ambienti di virtualizzazione
PDF
Renesas RL78 The True Low Power Microcontroller Platform
PDF
Enterprise TEPPCO Pipeline System Map
PPSX
How to refill canon color cartridge 241
PDF
An Introduction to Faye
PDF
Summary -Fish
PPT
Intermediate Colors
PDF
How to Make the Inc 500 List
PPTX
Analytics Solutions from SAP
Aem authentication vs idp
AEM GEMs Session Oak Lucene Indexes
Regions of the United States: The Northeast
HORMONAL REGULATION OF OVULATION,PREGNANCY,PARTURITION
Project Scheduling
The six key steps to AEM architecture
Strengths in the addie model
AEM Best Practices for Component Development
IdP, SAML, OAuth
Solve 3 Enterprise Storage Problems Today
Integrated Lifecycle Marketing Workshop: Emerging Channels for Email List Bui...
Ambienti di virtualizzazione
Renesas RL78 The True Low Power Microcontroller Platform
Enterprise TEPPCO Pipeline System Map
How to refill canon color cartridge 241
An Introduction to Faye
Summary -Fish
Intermediate Colors
How to Make the Inc 500 List
Analytics Solutions from SAP
Ad

Similar to AEM GEMS Session SAML authentication in AEM (16)

PDF
A Technical Guide To Deploying Single Sign On
PDF
Simplifying The S's: Single Sign-On, SPNEGO and SAML
PDF
New Single Sign-on Options for IBM Lotus Notes & Domino (We4IT)
PDF
Open Mic "Notes Federated Login"
PDF
Single Sign-On Best Practices
PDF
ISBG The 3 S's a guide to single sign on
PDF
Attacking SSO (SAML) - Breaking into the front door of Authentication
PPTX
OISC2013_Presentation
PPTX
IBM Single Sign-On
PPTX
Active Directory Single Sign-On with IBM
PDF
A model for privacy-enhance federated identity management
PDF
Open Doors In The Cloud By Using SSO Methodologies Between Your Organisation ...
PDF
SAML 101
PPTX
AEM Security Keeping Your Content Safe.pptx
PDF
Taking a Pragmatic Look at the Salesforce Security Model
A Technical Guide To Deploying Single Sign On
Simplifying The S's: Single Sign-On, SPNEGO and SAML
New Single Sign-on Options for IBM Lotus Notes & Domino (We4IT)
Open Mic "Notes Federated Login"
Single Sign-On Best Practices
ISBG The 3 S's a guide to single sign on
Attacking SSO (SAML) - Breaking into the front door of Authentication
OISC2013_Presentation
IBM Single Sign-On
Active Directory Single Sign-On with IBM
A model for privacy-enhance federated identity management
Open Doors In The Cloud By Using SSO Methodologies Between Your Organisation ...
SAML 101
AEM Security Keeping Your Content Safe.pptx
Taking a Pragmatic Look at the Salesforce Security Model

More from AdobeMarketingCloud (14)

PPTX
Adobe Ask the AEM Community Expert Session Oct 2016
PPTX
Ask the expert AEM Assets best practices 092016
PPTX
AEM GEMS Session Template Editor Sept 14 2016
PDF
Immerse 2016 Efficient publishing with content fragments
PDF
IMMERSE 2016 Introducing content fragments
PPTX
IMMERSE 2016 Cedric Huesler US Keynote
PPTX
IMMERSE 2016 IST Mark Szulc Keynote
PPTX
IMMERSE'16 Intro to Adobe Experience Manager & Adobe Marketing Cloud
PPTX
IMMERSE'16 Introduction to AEM Tooling
PPTX
Introduction to Adobe Experience Manager based e commerce
PDF
IMMERSE'16 Introduction to adobe experience manager back end
PPTX
Ask the AEM Community Expert Feb 2016 Session: AEM + Brackets
PPTX
Build single page applications using AngularJS on AEM
PPTX
Build single page applications using AngularJS on AEM
Adobe Ask the AEM Community Expert Session Oct 2016
Ask the expert AEM Assets best practices 092016
AEM GEMS Session Template Editor Sept 14 2016
Immerse 2016 Efficient publishing with content fragments
IMMERSE 2016 Introducing content fragments
IMMERSE 2016 Cedric Huesler US Keynote
IMMERSE 2016 IST Mark Szulc Keynote
IMMERSE'16 Intro to Adobe Experience Manager & Adobe Marketing Cloud
IMMERSE'16 Introduction to AEM Tooling
Introduction to Adobe Experience Manager based e commerce
IMMERSE'16 Introduction to adobe experience manager back end
Ask the AEM Community Expert Feb 2016 Session: AEM + Brackets
Build single page applications using AngularJS on AEM
Build single page applications using AngularJS on AEM

Recently uploaded (20)

PPT
Introduction Database Management System for Course Database
PDF
System and Network Administraation Chapter 3
PDF
top salesforce developer skills in 2025.pdf
PDF
medical staffing services at VALiNTRY
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PPTX
Transform Your Business with a Software ERP System
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
Digital Strategies for Manufacturing Companies
PPTX
Online Work Permit System for Fast Permit Processing
PDF
Odoo Companies in India – Driving Business Transformation.pdf
PPTX
ai tools demonstartion for schools and inter college
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Odoo POS Development Services by CandidRoot Solutions
PDF
PTS Company Brochure 2025 (1).pdf.......
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
Introduction Database Management System for Course Database
System and Network Administraation Chapter 3
top salesforce developer skills in 2025.pdf
medical staffing services at VALiNTRY
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Transform Your Business with a Software ERP System
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
VVF-Customer-Presentation2025-Ver1.9.pptx
Navsoft: AI-Powered Business Solutions & Custom Software Development
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Digital Strategies for Manufacturing Companies
Online Work Permit System for Fast Permit Processing
Odoo Companies in India – Driving Business Transformation.pdf
ai tools demonstartion for schools and inter college
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Odoo POS Development Services by CandidRoot Solutions
PTS Company Brochure 2025 (1).pdf.......
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
How to Migrate SBCGlobal Email to Yahoo Easily

AEM GEMS Session SAML authentication in AEM

  • 1. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. SAML authentication in AEM Sham Hassan Chikkegowda Customer Support Engineer Timothee Maret Sr. Software Developer&
  • 2. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Agenda •  SAML 2.0 A quick overview •  AEM & SAML Supported features •  Configurations Settings in typical deployments •  Troubleshoot How to analyze deployment issues •  Changelog Improvements in AEM 6.2 •  Q & A 2
  • 3. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. SAML 2.0 A quick overview
  • 4. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Overview of SAML 2.0 §  Security Assertion Markup Language §  Open standard (OASIS) for Federated Identity implementations §  XML based Framework for exchanging authentication and authorization data across security domains §  Enables security use cases §  Seamless cross domain browsing via Web Single Sign-On (SSO) §  Attribute-Based Authorization §  Securing Web Services 4 Source: [SAMLTech]
  • 5. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. SAML Web SSO 5 Participants Use case Identity Provider (IdP) Service Provider (SP) Principal User Authenticate Provide Assert User service.foo.ch (SP1) service.bar.com (SP2) IdentityInformation Source: [SAMLTech]
  • 6. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. AEM & SAML • Supported features
  • 7. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. SAML features supported in AEM SAML 2.0 standard Web Browser SSO Profile POST Binding SP & IdP initiated Single Sign-On (SSO) Single Logout Profile POST Binding SP & IdP initiated Single Log-Out (SLO) XML Signature XML Encryption 7 AEM authentication handler Auto creation of users and assignment to groups Attribute synchronization Multiple authentication handlers configurations Global and per request landing page Configurable clock drift compensation (HF 9985)
  • 8. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Web Browser SSO Profile 8 to /path/ending/with/saml_login Create/update repository user Sync attributes Decide resource to redirect to (landing page) Set Cookie - login-token Using Cookie: - login-token Commonly Used IdP IBM ISFIM, Oracle SSO, OKTA, Ping Federate, MS ADFS, SecureAuth, Google, Onelogin, Shiboleth, CA Siteminder, etc. Set Cookies: - saml_request_path - anchor_backup + SP identifier (e.g. req. parameter)
  • 9. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Security considerations (1/2) 9 Public SP Private IdP Public IdP Private SP Key provided to the SP/AEM Key provided to IdP
  • 10. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Security considerations (2/2) Security feature Required Description Authentication & Integrity Yes Guarantees that the received assertions to have been emit by the trusted IdP and have not been modified Achieved using XML Signature No Guarantee that the SAMLRequest has been emit by the trusted SP/AEM and the owner document has not been modified Achieved using XML Signature Confidentiality No Assertions may contain sensitive data (e.g. PII data) which must only be read by the recipient Achieved •  End to end using XML Encryption •  Point to point using TLS (HTTPS) 10
  • 11. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Configurations Settings in typical deployments
  • 12. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Security (1/4) Authentication & Integrity §  Validating the origin and validating the integrity of the assertions (mandatory) How 12 SAML auth. handler property Configuration idpCertAlias Set the alias of the IdP certificate in the global TrustStore Key Configuration Set the IdP certificate in the global TrustStorePublic IdP
  • 13. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Security (2/4) Confidentiality §  End-to-end confidentiality by encrypting the assertions (optional) How 13 SAML auth. handler property Configuration useEncryption Check if the authentication handler expects encrypted assertions spPrivateKeyAlias Set the alias of the SP certificate in the KeyStore keyStorePassword Set the password of the ‘authentication-service’ user KeyStore Key Configuration Set the SP private key in the ‘authentication-service’ service user KeyStore Set the SP private key in the ‘authentication-service’ service user KeyStore Public SP Private SP
  • 14. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Security (3/4) Managing cryptographic keys !  Storing SP certificates and private key in the repository under the paths /etc/key/saml/[public|idp_cert|private] is no longer supported since the release com.adobe.granite.auth.saml-0.3.26 (DOC-8250, DOC-5509) How 14 Set SP key pair in ‘authentication-service’ KeyStore 1.  Browse /libs/granite/security/content/useradmin.html 2.  Select the user ‘authentication-service’ 3.  Create the KeyStore if needed Keep the KeyStore password for property keyStorePassword of SAML authentication handler configuration 4.  Click on ‘Manage KeyStore’ 5.  Upload the SP private key and public certificate Keep the private key alias for property spPrivateKeyAlias of SAML authentication handler configuration Set IdP public key in global TrustStore 1.  Browse /libs/granite/security/content/useradmin.html 2.  Select any user 3.  Create the global TrustStore if needed 4.  Click on ‘Manage TrustStore’ 5.  Upload IdP public certificate Keep the alias for property idpCertAlias of SAML authentication handler configuration Private keys in PKCS12 or JKS format Public keys in public certificate in PKCS#12, JKS or CER format
  • 15. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Security (4/4) Deployment behind a dispatcher/LB ! Most deployments of SSL are terminated at the load balancer or at the dispatcher and communication to AEM instance happens over HTTP How Make instances SSL context aware by configuring http://host:port/system/console/configMgr/org.apache.felix.http.sslfilter.SslFilter 15
  • 16. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Auto creation of users What §  AEM can automatically create non-existing AEM users on first login §  The user identifier and properties are derived from the assertions How 16 SAML auth. handler property Configuration createUser Check to enable the feature userIDAttribute Set the name of the attribute containing the user ID Leave empty to use the Subject:NameId attribute
  • 17. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Add user to groups What §  AEM can automatically assign the user to the respective groups How 17 SAML auth. handler property Configuration addGroupMemberships Check to enable the feature groupMembershipAttribute Set the name of the attribute containing a list of AEM groups this user should be added to defaultGroups Set the list of default AEM groups users are added to after successful authentication ! Attribute value is an array not a list of group names ! Make sure neither default groups OR attribute containing AEM group is administrator ! Prior to Granite-9432 SAML IdP would override any groups a user was added to manually on the AEM instance
  • 18. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Attributes synchronization What §  AEM can store additional attributes from a SAML assertion in the repository (e.g. firstname, lastname, etc.) §  Synchronization happens during login How 18 SAML auth. handler property Configuration synchronizeAttributes Set the list of attribute from the SAML response to be stored at a path relative to the user node Example emailAddress=profile/email givenName=profile/givenName
  • 19. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Single Log-Out (SLO) What §  AEM can close IdP and SP sessions upon logout §  IdP or SP Initiated SLO §  Attempt to logout all SP from the same session How !  Signin-out should be the same binding !  Sensitive to clock drifts (HF 9985) 19 SAML auth. handler property Configuration handleLogout Check to enable the feature logoutUrl URL of the IdP where the SAML logout request should be sent to
  • 20. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Landing page What §  AEM supports specifying the path to redirect after successful login §  Narrow the focus on requested protected page How 20 SAML auth. handler property Configuration defaultRedirectUrl Set the default landing page path (only for IdP initiated login) Cookie name Value saml_request_path Use the cookie to define a request specific landing page path Order of priority 1.  Cookie (saml_request_request) 2.  SAML Authentication Handler redirect (defaultRedirectUrl) 3.  Apache Sling default redirects
  • 21. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Troubleshoot How to analyze deployment issues
  • 22. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Methodology SAML deployments integrate multiple services supported by heterogeneous parties (companies, teams) connected with an open standard 22 Observe message exchanged Observe logs Compare with SAML standard Identify wrong configuration Enable logging/tracing on AEM and dispatcher/LB if available Avoid encryption for debugging Record client traffic Check the pipes are clear (dispatcher, LB, etc.) Isolate Issue [SAMLBind] § 3.5 - HTTP Post Binding § 3.5.5 - Message Exchange [SAMLProf] § 4.1 - Web Browser SSO Profile § 4.4 - Single Logout Profile
  • 23. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Tools On AEM §  Capture logs by enabling logging/tracing for the packages com.adobe.granite.auth.saml & org.apache.sling.auth On client §  Record browsing session in HAR file https://help.tenderapp.com/kb/troubleshooting-your-tender-site/generating-an-har-file §  Observe SAML messages being transferred https://addons.mozilla.org/en-US/firefox/addon/saml-tracer SAML 2.0 §  Encrypting/decrypting, signing/validating, generating, SAML messages https://www.samltool.com/encrypt.php 23
  • 24. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Common mistakes •  Assertions not signed by the IdP •  Dispatcher/LB layer does not forward the saml_request_path cookie •  Missing/wrong session management with dispatcher enabling secure sessions •  IdP does not forward the saml_request_path cookie •  POST requests are cached at the dispatcher due to rewrite rules •  Consumption URL and entity id do not match •  HTTP SSL filter configuration does not retain the user in SSL protocol •  IdP does not support SLO (some don’t, refer to IdP documentation) •  IdP server & AEM server not in sync with Internet time server (Configurable clock drift helps) 24 If allowAuthorized is set to ‘0’ then add below session management section in dispatcher.any file /sessionmanagement { /directory "<path>/.sessions" /encode "md5" /header "Cookie:login-token" /timeout "800" }
  • 25. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Error & resolutions Symptom Common cause HTTP ERROR: 403 Problem accessing /saml_login. Reason: Forbidden The IdP hostname is not configured in Http Referer Filter com.adobe.granite.auth.saml.model.Assertion Invalid Assertion: notOnOrAfter Assertion not valid in time. IdP server & AEM server not in sync with Internet time server com.adobe.granite.auth.saml.SamlAuthenticationHandler Private key of SP not provided: Cannot sign Authn request It is a warning & can be ignored if not using encryption and the IdP accepts unsigned assertions com.adobe.granite.auth.saml.util.SamlReader Failed validating signature Signed SAML response signature not matching with IdP public certificate stored in AEM javax.xml.crypto.dsig.XMLSignatureException: java.security.SignatureException: Signature length not correct: got 128 but was expecting 256 you are signing with a 1024-bit key but attempting to verify with a 2048-bit key AccessDeniedException One of the value of attribute containing a list of AEM groups is administrators 25
  • 26. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Changelog Improvements in AEM 6.2
  • 27. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Improvements in AEM 6.2 •  Release note https://docs.adobe.com/docs/en/aem/6-2/release-notes/wcm-platform.html •  SAML Handler should provide landing page in case of AEM side authentication errors GRANITE-8928 •  SAML IdP Removes Users from Groups GRANITE-9432 •  Configurable Clock drift compensation HF 11082, HF 9985 27
  • 28. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. References •  SAML 2.0 Authentication Handler https://docs.adobe.com/docs/en/aem/6-2/administer/security/saml-2-0-authenticationhandler.html •  [SAMLProf] Profiles for the OASIS Security Assertion Markup Language (SAML) V2.0 https://docs.oasis-open.org/security/saml/v2.0/saml-profiles-2.0-os.pdf •  [SAMLBind] Bindings for the OASIS Security Assertion Markup Language (SAML) V2.0 https://docs.oasis-open.org/security/saml/v2.0/saml-bindings-2.0-os.pdf •  [SAMLTech] Security Assertion Markup Language (SAML) V2.0 Technical Overview https://www.oasis-open.org/committees/download.php/27819/sstc-saml-tech-overview-2.0-cd-02.pdf •  SAML V2.0 Executive Overview https://www.oasis-open.org/committees/download.php/13525/sstc-saml-exec-overview-2.0-cd-01-2col.pdf 28
  • 29. © 2016 Adobe Systems Incorporated. All Rights Reserved. Adobe Confidential. Q & A 29