Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Password protecting staging publisher instance in AEM 6.2

AlexRizzuto
Level 3
Level 3

Hi,

Looking for a simple and effective way to password protect one of our staging publisher instance websites that mirrors content from a production instance under a subdomain. Can this be done through AEM somehow?

 

Thanks

1 Accepted Solution
AlexRizzuto
Correct answer by
Level 3
Level 3
Decided to go with the Apache basic authentication approach as it is the easiest for our specific requirements. Thanks everyone for your help!

View solution in original post

0 Replies
Jörg_Hoh
Employee
Employee

The simplest approach is to enable basic authentication on the webserver sitting in front of your staging publish instances. Implementing it with AEM requires more work (and you would implement a feature specifically for non-PROD environments ...).

Jörg

AlexRizzuto
Level 3
Level 3

MC Stuff wrote...

Hi Alex,

   Another option is having Authentication Requirements with value of +/  at http://host:port/system/console/configMgr/org.apache.sling.engine.impl.auth.SlingAuthenticator

Thanks,

 

I like the simplicity of this. When I enable this for a path and attempt to go to that path (locally on the instance - not even through dispatcher), it does not give me the login prompt but instead a 403 error along with:

"You don't have permission to access /system/sling/form/login on this server."

How can I enable this for anonymous users to authenticate? 

 

Thank you very much for your help!

-Alex

MC_Stuff
Level 9
Level 9

AlexRizzuto wrote...

How can I enable this for anonymous users to authenticate? 

 

Sounds like your installation nosamplecontent. Map default login page Or site level at /system/console/configMgr/com.day.cq.auth.impl.LoginSelectorHandler

If you don't have custom login page configure to /libs/granite/core/content/login

dragon2A
Level 6
Level 6

Hi Alex,

Directly try to hit the/libs/granite/core/content/login.html page you will see the login screen after login again it will re-directs to the geometrics page. You have to enter the Url in the browser after the login it will open a specific page. In 6.2 I tried updating the loginselectorhandler with the AEM login page but it didn't work for me. But we can be able to hit the login Url directly in the browser. 

 

Thanks

perfecci0nista
Level 3
Level 3

If you are looking for generalized authentication, then use apache basic authentication. It works seamlessly. 

<Directory C:/Adobe/Apache2.2/htdocs/mysite.com>
        AuthType Basic
        AuthName "Authenticated"
        AuthUserFile C:/Adobe/Apache2.2/.htpasswd
        Require valid-user
    </Directory>

AlexRizzuto
Correct answer by
Level 3
Level 3
Decided to go with the Apache basic authentication approach as it is the easiest for our specific requirements. Thanks everyone for your help!

View solution in original post

iainc65537558
Level 3
Level 3

We are looking to do a similar thing - In our httpd.conf we have all the dispatcher stuff and also some basic auth directives.  It is presenting the challenge but this is shown on top of the actual rendered page. How did you set up httpd.conf and where were the relevant directives?

We have tried with Directory and Location and the same happens.

One thing that might be slightly different is that we are trying to test this on a part of the website eg for testing we are trying to put basic auth behind the woman's page on we-retail /content/we-retail/us/en/women

Thanks