{"id":62308,"date":"2024-07-31T22:40:50","date_gmt":"2024-07-31T17:10:50","guid":{"rendered":"https:\/\/www.tothenew.com\/blog\/?p=62308"},"modified":"2024-07-31T23:55:10","modified_gmt":"2024-07-31T18:25:10","slug":"aem-saml-integration-step-by-step-guide","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/aem-saml-integration-step-by-step-guide\/","title":{"rendered":"AEM SAML Integration \u2013 Step by Step Guide"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">In the dynamic landscape of digital experience management, security and user convenience are paramount. Adobe Experience Manager (AEM) stands out as a leading solution, empowering organizations to create, manage, and deliver engaging digital experiences. However, with the increasing importance of security, integrating robust authentication mechanisms like Security Assertion Markup Language (SAML) with Single Sign-On (SSO) capabilities becomes essential. In this blog post, we&#8217;ll delve into the world of AEM SAML integration, unraveling the complexities of SSO and authentication to streamline user experiences while fortifying digital defenses.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">We will be using the SP initiative for authentication in our case. Below is the diagram to help understand the authentication process:<\/span><\/p>\n<div id=\"attachment_63523\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-63523\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-63523 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/07\/file.jpg\" alt=\"AEM SAML Authentication Flow\" width=\"625\" height=\"433\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/07\/file.jpg 625w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/file-300x208.jpg 300w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-63523\" class=\"wp-caption-text\">AEM SAML Authentication Flow<\/p><\/div>\n<p><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"color: #000000;\"><strong>Configuration of Identity Provider (IdP)<\/strong><\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\">Register for Okta trial account<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Navigate to Admin dashboard<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Navigate to Application \u279d Create App Integration<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Choose SAML 2.0<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Add Application Configs:<\/span>\n<div id=\"attachment_63526\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-63526\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-63526 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config11-1024x371.png\" alt=\"Application Config Image\" width=\"625\" height=\"226\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config11-1024x371.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config11-300x109.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config11-768x278.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config11-624x226.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config11.png 1348w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-63526\" class=\"wp-caption-text\">Application Config<\/p><\/div>\n<div id=\"attachment_63527\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-63527\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-63527 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config2-1024x377.png\" alt=\"Profile Attributes Image\" width=\"625\" height=\"230\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config2-1024x377.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config2-300x110.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config2-768x282.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config2-624x229.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/07\/okta-config2.png 1349w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-63527\" class=\"wp-caption-text\">Profile Attributes<\/p><\/div>\n<ul>\n<li><b>Single Sign-on URL<\/b><span style=\"font-weight: 400;\"> &#8211; An authentication request from AEM to Okta first goes to<\/span> <span style=\"font-weight: 400;\">https:\/\/&lt;domain&gt;\/<\/span><span style=\"font-weight: 400;\">&lt;Service Provider Entity ID&gt;\/saml_login<\/span><\/li>\n<li><b>Service Provider Entity ID<\/b><span style=\"font-weight: 400;\"> &#8211; Identifier for Service provider, same to be defined in SAML Authentication Handler)<\/span><\/li>\n<li><b>Signature Certificate<\/b><span style=\"font-weight: 400;\"> &#8211; Locally generated certificate<\/span><\/li>\n<li><b>Single Logout UR<\/b><span style=\"font-weight: 400;\">L &#8211; URL to redirect to while logging out<\/span><\/li>\n<li><b>Attribute Statements<\/b><span style=\"font-weight: 400;\"> &#8211; add attributes to sync value with AEM like uid \u2192 user.login etc<\/span><\/li>\n<li><b>Group Attributes <\/b><span style=\"font-weight: 400;\">&#8211; attribute to add a user to the desired group in AEM<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Create the desired groups in Okta and assign the relevant users to it<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Add relevant users to your app<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Once the setup is complete, navigate to <\/span><b>Sign On,<\/b><span style=\"font-weight: 400;\"> and on the right rail click on <\/span><b>View SAML Setup Instructions<\/b><span style=\"font-weight: 400;\"> and save the following:<\/span>\n<ul>\n<li><span style=\"font-weight: 400;\">Identity Provider Single Sign-On URL<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Identity Provider Single Logout URL<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Certificate<\/span><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><span style=\"color: #000000;\"><strong>Configuration of Service Provider (SP)<\/strong><\/span><\/p>\n<ol>\n<li><span style=\"font-weight: 400;\">Map a demo hostname for localhost<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Generate local certificate and private key<\/span>\n<ul>\n<li><span style=\"font-weight: 400;\">Generate a private key using OpenSSL<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Create a CSR<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Generate local certificate using private key and CSR<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Convert private key to DER format\u00a0<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Add locally generated certificate and private key to <\/span><b>authentication-service<\/b><span style=\"font-weight: 400;\"> user\u2019s Keystore<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Add Okta certificate to AEM Trust Store and get Okta alias<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Navigate to the AEM config manager open <\/span><b>Adobe Granite SAML 2.0 Authentication Handler <\/b><span style=\"font-weight: 400;\">and<\/span> <span style=\"font-weight: 400;\">update the following fields:<\/span>\n<ul>\n<li><b>Path<\/b><span style=\"font-weight: 400;\"> &#8211; Root path that is to be authenticated\u00a0<\/span><\/li>\n<li><b>IDP URL<\/b><span style=\"font-weight: 400;\"> &#8211; URL where authentication request is sent to (embed URL from okta config)<\/span><\/li>\n<li><b>IDP Certificate alias<\/b><span style=\"font-weight: 400;\"> &#8211; Alias received from Trust Store<\/span><\/li>\n<li><b>Service Provider Entity ID<\/b><span style=\"font-weight: 400;\"> &#8211; Identification ID for the SP (Should match the SP Entity ID from okta config)<\/span><\/li>\n<li><b>SP private key alias<\/b><span style=\"font-weight: 400;\"> &#8211; authentication-service keystore alias<\/span><\/li>\n<li><b>Key Store Password <\/b><span style=\"font-weight: 400;\">&#8211; authentication-service keystore alias<\/span><\/li>\n<li><b>User ID attribute<\/b><span style=\"font-weight: 400;\"> &#8211; Unique identified for our user coming from Okta<\/span><\/li>\n<li><b>Use Encryption<\/b><span style=\"font-weight: 400;\"> &#8211; Whether or not to encrypt SAML messages<\/span><\/li>\n<li><b>Auto-create CRX users<\/b><span style=\"font-weight: 400;\"> &#8211; Whether we want new users to be created (ones coming from Okta)<\/span><\/li>\n<li><b>Add to groups<\/b><span style=\"font-weight: 400;\"> &#8211; Whether we want to add the incoming users to groups mentioned in the group-membership field<\/span><\/li>\n<li><b>Group Membership<\/b><span style=\"font-weight: 400;\"> &#8211; Attribute in the SAML response that mentions the user&#8217;s group name<\/span><\/li>\n<li><b>Default Group<\/b><span style=\"font-weight: 400;\"> &#8211; Default group for users to be added to. It does not pick a value from the SAML response<\/span><\/li>\n<li><b>Synchronized Attributes<\/b><span style=\"font-weight: 400;\"> &#8211; key-value pair which represents (attribute coming from SAML request)=(relative location to user&#8217;s profile node in CRX where we want to save the property). Ex. email=profile\/email<\/span><\/li>\n<li><b>Handle Logout<\/b><span style=\"font-weight: 400;\"> &#8211; Whether we want the ability for users to logout<\/span><\/li>\n<li><b>Logout URL<\/b><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"> &#8211; IDP URL to hit to remove logged-in user session<\/span><\/span><\/span>\n<div class=\"mceTemp\">\n<ul id=\"attachment_61223\" class=\"wp-caption alignnone\" style=\"width: 625px;\"><img decoding=\"async\" loading=\"lazy\" class=\"wp-image-61223 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config-1024x447.png\" alt=\"SAML Config in AEM\" width=\"625\" height=\"273\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config-1024x447.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config-300x131.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config-768x335.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config-624x272.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config.png 1350w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/>SAML Config Image<\/ul>\n<\/div>\n<p><div id=\"attachment_61224\" style=\"width: 635px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-61224\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-61224 size-large\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config1-1024x453.png\" alt=\"SAML Config in AEM(2)\" width=\"625\" height=\"276\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config1-1024x453.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config1-300x133.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config1-768x340.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config1-624x276.png 624w, \/blog\/wp-ttn-blog\/uploads\/2024\/04\/saml-config1.png 1344w\" sizes=\"(max-width: 625px) 100vw, 625px\" \/><p id=\"caption-attachment-61224\" class=\"wp-caption-text\">SAML Config Image<\/p><\/div><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Open the <\/span><b>Apache Sling Logging Logger Configuration<\/b><span style=\"font-weight: 400;\"> and update the following fields (Custom SAML logging):<\/span>\n<ul>\n<li><span style=\"font-weight: 400;\">Log Level: Debug<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Log File: logs\/saml.log<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Logger: com.adobe.granite.auth.saml<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Open the <\/span><b>Apache Sling Referrer Filter<\/b><span style=\"font-weight: 400;\"> and update the following fields (Allow SP and IDP referrer endpoints):<\/span>\n<ul>\n<li><span style=\"font-weight: 400;\">Allow empty &#8211; true<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Allow Hosts &#8211; Allow IDP(Okta) origin URL<\/span><\/li>\n<li><span style=\"font-weight: 400;\">Allow Regexp Host &#8211; Allow SP domain<\/span><\/li>\n<\/ul>\n<\/li>\n<li><span style=\"font-weight: 400;\">Open the <\/span><b>Apache Sling Authentication Service<\/b><span style=\"font-weight: 400;\"> and update the following fields:<\/span>\n<ul>\n<li><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\">Authentication Requirements &#8211; Add SP domain prefix-ed by a &#8216;+&#8217;<\/span><\/span>\n<p><div id=\"attachment_62313\" style=\"width: 1228px\" class=\"wp-caption alignnone\"><img aria-describedby=\"caption-attachment-62313\" decoding=\"async\" loading=\"lazy\" class=\"wp-image-62313 size-full\" src=\"https:\/\/www.tothenew.com\/blog\/wp-ttn-blog\/uploads\/2024\/06\/authentication_service_small.png\" alt=\"AEM Authentication Service Config\" width=\"1218\" height=\"48\" srcset=\"\/blog\/wp-ttn-blog\/uploads\/2024\/06\/authentication_service_small.png 1218w, \/blog\/wp-ttn-blog\/uploads\/2024\/06\/authentication_service_small-300x12.png 300w, \/blog\/wp-ttn-blog\/uploads\/2024\/06\/authentication_service_small-1024x40.png 1024w, \/blog\/wp-ttn-blog\/uploads\/2024\/06\/authentication_service_small-768x30.png 768w, \/blog\/wp-ttn-blog\/uploads\/2024\/06\/authentication_service_small-624x25.png 624w\" sizes=\"(max-width: 1218px) 100vw, 1218px\" \/><p id=\"caption-attachment-62313\" class=\"wp-caption-text\">Authentication Service Config Image<\/p><\/div><\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p><span style=\"color: #000000;\"><b>Conclusion:<\/b><\/span><\/p>\n<p><span style=\"font-weight: 400;\">In conclusion, AEM SAML integration with SSO capabilities represents a significant advancement in enhancing both security and user experience within digital experience management. By leveraging SAML&#8217;s authentication mechanisms, organizations can fortify their AEM instances against potential threats while providing users with a frictionless authentication experience.\u00a0 With the above steps, you can integrate SAML authentication capability into your website and enhance user experience significantly.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">If you still have questions, comment and join the discussion! Meanwhile, follow us on social media for more updates.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the dynamic landscape of digital experience management, security and user convenience are paramount. Adobe Experience Manager (AEM) stands out as a leading solution, empowering organizations to create, manage, and deliver engaging digital experiences. However, with the increasing importance of security, integrating robust authentication mechanisms like Security Assertion Markup Language (SAML) with Single Sign-On (SSO) [&hellip;]<\/p>\n","protected":false},"author":1762,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":1420},"categories":[5868],"tags":[4847,1221,2895],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/62308"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/1762"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=62308"}],"version-history":[{"count":14,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/62308\/revisions"}],"predecessor-version":[{"id":63698,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/62308\/revisions\/63698"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=62308"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=62308"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=62308"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}