Token authorization in AEM | Community
Skip to main content
akhilraj
Level 5
Dec 21, 2022 3:52 AM UTC
Solved

Token authorization in AEM

Hi,

 

We have configured our instances with SSO SAML configuration.

Authentication is working fine with SSO Azure Sign in.

But when a third party consumes our pages or ajax calls to fetch some internal data, they are getting 401 Un Authorized,

As a tenant we have created an APP with client id, secret and mentioned scope. With this, third party is able to generate token. But when they use token, they are getting 401. The reason is AEM is accepting only saml response currently. 

Is it something like, we have to configure OAuth as well for third party token authorization ?

 

Or any documentation for Oauth token authorization will be fine

 

Please suggest

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
Dec 21, 2022 4:11 AM UTC

Hello @akhilraj 

 

A custom Authentication Handler would be required to achieve this. It would validate the token and signature (with the public cert from the AEM truststore that belongs to the private key the token is signed with)

 

If successful, the user would be logged in and accordingly the response can be created.

 

Another option is to use Adobe IMS JWT and AEM Access Token

https://experience-aem.blogspot.com/2021/07/aem-cloud-service-get-adobe-ims-jwt-and-aem-access-token-using-post-man-aem-sso.html

Aanchal Sikka

3 replies

Mani_kumar_
New Participant
Dec 21, 2022 3:18 PM UTC

Please find the references discussed in the thread for custom authentication handler.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/how-to-create-custom-authentication-handler/m-p/238421

 

Hope this is helpful.

Translate
aanchal-sikka
aanchal-sikkaAccepted solution
New Participant
Dec 21, 2022 4:11 AM UTC

Hello @akhilraj 

 

A custom Authentication Handler would be required to achieve this. It would validate the token and signature (with the public cert from the AEM truststore that belongs to the private key the token is signed with)

 

If successful, the user would be logged in and accordingly the response can be created.

 

Another option is to use Adobe IMS JWT and AEM Access Token

https://experience-aem.blogspot.com/2021/07/aem-cloud-service-get-adobe-ims-jwt-and-aem-access-token-using-post-man-aem-sso.html

Translate
Aanchal Sikka
akhilraj
akhilrajAuthor
Level 5
Dec 21, 2022 4:30 AM UTC

Thanks @aanchal-sikka .

Is there any examples for custom authentication handler creation.?

The cert we installed in AEM trust store for SAML configuration already.

 

And our version of AEM is 6.5, so the second approach will work here ?

 

Translate