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

How to enable Basic Authentication for Non-Prod AEM websites? | Support Authenticated Performance Testing with Cloud Manager | AEM Community Blog Seeding

kautuk_sahni
Employee
Employee

BlogImage.jpg

How to enable Basic Authentication for Non-Prod AEM websites? | Support Authenticated Performance Te... by Albin Issac

Abstract

Enable Basic Authentication:
Most of the time we will have the use case to enable basic authentication for non-prod AEM websites to avoid non authenticated users accessing the content(another option is through IP whitelisting) also avoiding the non-prod contents getting indexed through google search(another approach to avoid the indexing is through Robots meta tag)
Easy to use generic user name/password for every website so that only the users know those credentials can access the password(if you need more security go with site-specific users or individual users)
In AEM the basic authentication can be enabled quickly through Dispatcher(Apache)
Create a common configuration file for authentication — /conf.d/htaccess/authentication.conf
## unsets authorization header when sending a request to AEM
RequestHeader unset Authorization
AuthType Basic
AuthBasicProvider file
AuthUserFile /etc/httpd/conf.d/htaccess/credential.htpasswd
AuthName “Authentication Required”
Require valid-user
Include this file into the individual Virtual Hosts


Include /etc/httpd/conf.d/htaccess/authentication.conf

The ENV_TYPE can be set as an Environment variable e.g /etc/sysconfig/httpd (for AMS environment the required environment variables will be enabled by default)
ENV_TYPE=’dev’
Create the credential file, execute the below command, you will be prompted to enter the password
htpasswd -c /etc/httpd/conf.d/htaccess/credential.htpasswd testuser
Execute the below command, to add additional users if required
htpasswd /etc/httpd/conf.d/htaccess/credential.htpasswd testuser1
Restart the Apache server, now basic authentication is enabled for the websites.

Read Full Blog

How to enable Basic Authentication for Non-Prod AEM websites? | Support Authenticated Performance Te...

Q&A

Please use this thread to ask the related questions.

0 Replies