Hi All,
I'm configuring SAML 2.0 for Publish in AEM as a Cloud Service.
However, SAML is not working as expected in the Preview tier.
Where is the problem?
I am referring to the following documentation:
The Publish tier is working as expected.
After authenticating with the IdP, users are redirected to /saml_login on Publish:
publish-xxxx.adobeaemcloud.com/saml_login
During the saml_login process, a "login-token" cookie is issued, and users can then view the website.
On the Preview tier, users are also redirected to the IdP, and after authenticating, they are redirected to /saml_login on Preview:
preview-xxxx.adobeaemcloud.com/saml_login
However, no "login token" cookies are issued, and the user is redirected back to the IdP URL again.
/saml_login → IdP Login → /saml_login → IdP Login → (infinite loop)
• "login-token" cookie is not issued on the Preview tier.
• This results in an infinite loop.
Where is the problem?
To identify the cause, I tried changing several settings.
The difference between the Publish and Preview configurations is controlled by environment variables,
so I tried intentionally using an incorrect value for the Preview tier’s "idpCertAlias."
However, the result remained an infinite loop with no noticeable change.
Normally, if "idpCertAlias" is set to an incorrect value, an invalid_token error should occur.
This suggests that on the Preview tier, the certificate might not be referenced at all, leading to the infinite loop.
I followed the setup guide and steps to use Package Manager to replicate the global trust store to the Publish tier, but am I correct in assuming this applies to the Preview tier as well?
Thanks,
Saito.
Solved! Go to Solution.
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @SaitoYoshio ,
I hope you are using keystorepassword property. If yes then specify “useEncryption” : false in your configuration. This solved it for me. Also can you check the saml logs.
Thanks for Reply.
The useEncryption property in the com.adobe.granite.auth.saml.SamlAuthenticationHandler~...cfg.json file is
"useEncryption": false,
Views
Replies
Total Likes
Hi ALL
In my case, SAML on the Publish tier is working fine.
SAML on the Preview tier is not working.
I think this is because the Trust Store is not applied to the Preview tier.
I have written a new ticket.
Please tell me the correct way to set up the SAML IdP Certificate File on the Publish Tier and Preview Tier.
Thanks,
Saito.
Views
Replies
Total Likes
@SaitoYoshio I had faced similar issue earlier,
Basically Adobe created a SamlAuthenticationHandler custo ath handler and if you see code inside, you will be needed proper SAML response code from issuer. Whatever the response we got will validated against the installed cert. Just check your SAML response is proper or not.
1. Try reinstalling idp smal cert in trustore again and copy the new alias ID and paste in osgi config. Use the cert which is issued to preview-xxxx.adobeaemcloud.com domain only but not publish.
2. Also check if users are creating in AEM with Random uuids.
Thank you for your reply.
Publish and Preview register different certificate files, and the alias name refers to different files.
The URL of the SAML response is also exclusive to Preview.
> 2. Also check if users are creating in AEM with Random uuids.
I don't understand what this means.
When creating a user, do I need to create it with Random uuid?
Thanks
Saito.
Views
Replies
Total Likes
Hi @SaitoYoshio ,
When I got the similar issues as yours, users were creating with uuids instead of user emails so just wanted to check.
Have you tried reinstalling the cert? Also share the exception you are getting in error log
Thanks,
Ramesh.
Views
Replies
Total Likes
The certificate should be correct if you reinstall it.
The error log currently occurring is as follows:
I would appreciate any advice you can give me.
Thanks,
Saito.
Views
Replies
Total Likes
@SaitoYoshio The log says keystore password not present at /etc/truststore path.
Views
Replies
Total Likes
I was able to solve this problem.
I reported the solution in the latest comment.
Thank you for your help.
Saito
Views
Replies
Total Likes
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies