Search code examples
securityjakarta-eeauthenticationamazon-web-servicesglassfish

Password protected domain glassfish


Which is the best way to make a password-protected domain? I currently running Glassfish4 on AWS EC2 ubuntu server.

I mean something like this:

(For non Italians, the dialog says: Authentication required: Insert username and password in order to access: https://..... )


Solution

  • This is Basic access authentication used primarily on Apache webservers. In this instance is negotiated by use of an .htaccess and .htpasswd file.

    There is a very good .htaccess/passwd creation tool here which will allow you to create the files to give basic password http password protection to any site. Be careful not to overwrite any existing rules in any current .htaccess file. Do not store your .htpasswd file in a publicly-accessible directory.