Unable to login with AEM username and password in AEMaaCS publish | Community
Skip to main content
aanchal-sikka
Community Advisor
Community Advisor
February 1, 2024
Solved

Unable to login with AEM username and password in AEMaaCS publish

  • February 1, 2024
  • 5 replies
  • 2090 views

Hello,

 

A while ago, we conducted a proof of concept (POC) using WKND, successfully logging into the WKND site on publish using a username and password. However, it has abruptly ceased functioning and now returns a 204 No Content error.

 

Only log observed in dispatcher is

"POST /system/sling/login/j_security_check HTTP/1.1" 204 - "https://publish-p47369-e228224.adobeaemcloud.com/content/wknd/language-masters/en/magazine.html"

 

 Following config us available on the dispatcher

# Allow j_security check for login
/0103 { /type "allow" /method "POST" /url "/system/sling/login/j_security_check" }

What might we be overlooking?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by MadhuGubby

 I got to know from wknd tech team that the request  was hitting the line https://github.com/adobe/aem-guides-wknd/blob/main/dispatcher/src/conf.d/available_vhosts/wknd.vhost#L89

RewriteRule "^(.*)" - [R=204,L]

I got to know that this will be addressed in the upcoming release.

5 replies

Himanshu_Jain
Community Advisor
Community Advisor
February 1, 2024

Are you storing user credentials in publisher instance?

 

Thanks

Himanshu Jain
aanchal-sikka
Community Advisor
Community Advisor
February 1, 2024

@himanshu_jain 

The users are created in Author and published.

Aanchal Sikka
Adobe Employee
March 21, 2024

@aanchal-sikka did you find a resolution to this issue? I'm also facing the same error with wknd code deployed on AEM as a cloud. One interesting observation is when I trigger the same post request through Postman /system/sling/login/j_security_check, the request does reach AEM publish and I get a 200OK with site content served

kautuk_sahni
Community Manager
Community Manager
February 2, 2024

204 No Content response indicates that the server processed the request successfully but has no content to send back. This is often used for actions that modify data without returning a specific payload. In this case, it suggests that the login attempt itself might have gone through, but the expected response (e.g., a redirect or user session information) is missing. Some potential causes and solutions to explore:

Authentication Mechanism:

  • Check Configuration: Verify that the dispatcher configuration for /system/sling/login/j_security_check is correct. Pay attention to parameters like allowedPaths, allowedMethods, and sling:resourceType.
  • Custom Authentication: If custom authentication is involved, ensure it's properly configured and error-free.
  • Access Rights: Double-check that the user account has the necessary access rights to perform the login action.

Dispatcher Caching:

  • Clear Cache: Invalidate the dispatcher cache for the relevant paths or enable debug mode to bypass caching during testing.
  • Caching Rules: Review caching rules that might be interfering with login responses.

WKND Integration:

  • WKND-Specific Issues: Explore potential WKND configuration or logic issues that might be causing the response to be empty.

Content Path:

  • Double-check the content path in the error log (/content/wknd/language-masters/en/magazine.html). Ensure it exists and is configured correctly on the publish instance.

Cross-Origin Resource Sharing (CORS):

  • If the WKND site and AEM instances reside on different domains, CORS must be properly configured on the dispatcher to allow login requests from the WKND origin.
  • Double-check CORS rules in the dispatcher configuration (particularly the /0103 block) and adjust as needed.
Kautuk Sahni
arunpatidar
Community Advisor
Community Advisor
February 2, 2024

HI @aanchal-sikka 
Do you see any error in the log?

Do you have sticky session if you are using multi-pub setup?

Seems like issue is due to logout/not having valid session.

 

Arun Patidar
Imran Khan
Community Advisor
Community Advisor
February 11, 2024

There is an issue with aem login specifically in publish as soon as we done with the ui.config build in publish instance. This issue is with Adobe Experience Manager 2023.12.14697.20231215T125030Z-231200 AEM instance

The issue is with com.day.cq.rewriter.linkchecker.impl.LinkCheckerTransformerFactory.cfg.json configuration on line 

"linkcheckertransformer.stripHtmltExtension": true

 


@aanchal-sikka @kautuk_sahni 

kautuk_sahni
Community Manager
Community Manager
February 21, 2024

@aanchal-sikka Were you able to fix this?

Kautuk Sahni
MadhuGubbyAdobe EmployeeAccepted solution
Adobe Employee
March 25, 2024

 I got to know from wknd tech team that the request  was hitting the line https://github.com/adobe/aem-guides-wknd/blob/main/dispatcher/src/conf.d/available_vhosts/wknd.vhost#L89

RewriteRule "^(.*)" - [R=204,L]

I got to know that this will be addressed in the upcoming release.

aanchal-sikka
Community Advisor
Community Advisor
March 25, 2024

Thanks for sharing @madhugubby .

Aanchal Sikka