Hello Team,
My use case scenario is Apache webserver directs all the requests to the Sling servlet and Sling servlet would forward the calls to CQ or our internal webapp depending upon the url. I need the anonymous access for accessing my Sling Servlet.
When I call my Sling Servlet from the Apache webserver, it is redirected to libs/cq/core/content/login.html. When I hit in the CQ server direcly for that servlet thats not redirecting to the login page and directly the servlet is served. Only when apache webserver dispatches the request, its being redirected to /libs/cq/core/content/login.html.
[rid#18017320/initial] (4) RewriteCond: input='/mcdonalds' pattern='^/(.*)$' => matched
[rid#18017320/initial] (2) rewrite '/mcdonalds' -> '/apps/myvanity/forwardvanity?category=mcdonalds'
[rid#18017320/initial] (3) split uri=/apps/myvanity/forwardvanity?category=mcdonalds -> uri=/apps/myvanity/forwardvanity, args=category=mcdonalds
[rid#18017320/initial] (2) local path result: /apps/myvanity/forwardvanity
[rid#18017320/initial] (2) prefixed with document_root to /u/apache/htdocs/apps/myvanity/forwardvanity
[rid#18017320/initial] (1) go-ahead with /u/apache/htdocs/apps/myvanity/forwardvanity [OK]
[rid#180092b0/initial] (2) init rewrite engine with requested uri /libs/cq/core/content/login.html
When I look into the configuration in the Apache Sling Authentication Service, I could see the AllowAnonymouAccess option is being checked. Also I tried to configure the AuthenticationRequirements property to
-/apps/myvanity/forwardvanity to allow this url anonymous access explicitly. After the configuration I could even see that my entry got added in the Authenticator tab.
Authentication Requirement Configuration | ||
---|---|---|
Path | Authentication Required | Defining Service (Description or ID) |
/system/sling/logout | No | Apache Sling Request Authenticator |
/system/sling/login | No | Apache Sling Request Authenticator |
/system/sling/cqform/defaultlogin | No | Default Login Form for CQ Login Selector Authentication Handler |
/login | No | Day Communique LoginServlet |
/libs/cq/core/content/login | No | Day CQ Login Selector Authentication Handler |
/bin/login | No | Day Communique LoginServlet |
/apps/myvanity/forwardvanity | No | Apache Sling Request Authenticator |
/apps/myvanity/forwardvanity | No | Apache Sling Request Authenticator |
/ | No | Apache Sling Request Authenticator |
Could some one please suggest how to allow the anonymous access for that servlet such that my apache webserver would not redirect to login page. Any suggestions/pointers would be appreciated.
Best Regards,
Durga