April 18, 2020
Estimated Post Reading Time ~

/system/console/configMgr in CRX / AEM

Use Case: Is it possible to change the settings of the Apache Authentication module in the (/system/console/configMgr) config manager? I'd like to turn off "allow anonymous access" but due to config issues, the anonymous access required to access the login screen has been disabled. I'm assuming this could be done via cURL somehow?

Solution:
Yes, it is possible. The following cUrl statement does the trick for me, restores the sling.auth.requirements settings and disables anonymous access.

curl -u admin:admin 'http://localhost:4502/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator' --data 'apply=true&action=ajaxConfigManager&%24location=launchpad%3Aresources%2Finstall%2F19%2Forg.apache.sling.auth.core-1.3.6.jar&auth.sudo.cookie=sling.sudo&auth.sudo.parameter=sudo&auth.annonymous=false&sling.auth.requirements=%2B%2F&sling.auth.requirements=-%2Flibs%2Fgranite%2Fcore%2Fcontent%2Flogin&sling.auth.requirements=-%2Fetc%2Fclientlibs%2Fgranite&sling.auth.anonymous.user=&sling.auth.anonymous.password=unmodified&auth.http=preemptive&auth.http.realm=Sling+(Development)&auth.uri.suffix=%2Fj_security_check&propertylist=auth.sudo.cookie%2Cauth.sudo.parameter%2Cauth.annonymous%2Csling.auth.requirements%2Csling.auth.anonymous.user%2Csling.auth.anonymous.password%2Cauth.http%2Cauth.http.realm%2Cauth.uri.suffix'


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.