Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Anonymous user is showing after successful authentication

Avatar

Level 1

We have recently implemented login functionality with the help of OKTA and we have utilized SAML OOTB configuration for it.

 

Issue: Whenever we login, it is showing "Anonymous" user instead of showing logged in user id.

 

I can see users created on publishers but still it is not treating them actual users.

 

Below are logs:

 

30.11.2021 14:17:35.153 *DEBUG* [qtp629093193-3004] org.apache.sling.auth.core.impl.SlingAuthenticator getAuthenticationInfo: no handler could extract credentials; assuming anonymous

30.11.2021 14:17:35.153 *DEBUG* [qtp629093193-3004] org.apache.sling.auth.core.impl.SlingAuthenticator doHandleSecurity: No credentials in the request, anonymous

30.11.2021 14:17:35.155 *DEBUG* [qtp629093193-3004] org.apache.sling.auth.core.impl.SlingAuthenticator setAttributes: ResourceResolver stored as request attribute: user=anonymous

30.11.2021 14:17:45.154 *DEBUG* [qtp629093193-2991] org.apache.sling.auth.core.impl.HttpBasicAuthenticationHandler forceAuthentication: Not forcing authentication because request parameter sling:authRequestLogin is not set

3 Replies

Avatar

Level 1

@Siva_Sogalapalli  @kautuk_sahni 

 

We have configured OKTA AEM integration based on this only. This is working on DEV environment with No CloudFront Cache and only 1 publisher but on Stage with CloudFront cache and 2 publisher, same code is not working. User is able to login after multiple saml token and user is created in publisher. but still it is showing anonymous user. User is able to see gated content but the logic based on user info is not working as it is anonymous users.

 

We have allowed User agent, cookies and /saml_login in CF configuration., but still it is not working. Please guide what could be wrong.  

Avatar

Employee Advisor

HI @khushbu16anand,

Can you check if the session ID is also same for the users getting logged in.

Also, check if your handler is available under "Registered Authentication Handlers" for the path you are trying to access. (Navigate to Sling Authenticator in Felix console via http://localhost:4502/system/console/slingauth)