10.19 Ensure Manager Application Passwords are Encrypted

Information

Apache Tomcat ships with a Manager Application which requires users with a role of manager-gui manager-status manager-script and/or manager-jmx to authenticate. The usernames and passwords to log onto the Manager Application are stored in the tomcat-users.xml in plain text by default.

Storing passwords in plain text may allow users with access to read the tomcat-users.xml file to obtain the credentials of user who have been assigned roles for the Manager Application. This may allow for accounts to be compromised on Tomcat and elsewhere.

Solution

- Generate the encrypted password: cd $CATALINA_HOME/bindigest.bat -a sha-256 YOURPASSWORD This will return the original password followed by encrypted password: YOURPASSWORD:240be518fabd2724ddb6f04eeb1da5967448d7e831c08c8fa822809f74c720a9
- Replace the plain text password with the above encrypted password generated above in CATALINA_HOME/conf/tomcat-user.xml file as follows. <user username="admin" password="240be518fabd2724ddb6f04eeb1da5967448d7e831c08c8fa822809f74c720a9" roles="manager-gui"/>
- Add the digest element as a child to the login-config element where the realm-name element has a value of UserDatabase For example: <login-config> <auth-method>DIGEST</auth-method> <realm-name>UserDatabase</realm-name></login-config>

See Also

https://workbench.cisecurity.org/benchmarks/21082

Item Details

Category: IDENTIFICATION AND AUTHENTICATION, SYSTEM AND COMMUNICATIONS PROTECTION

References: 800-53|IA-5(1), 800-53|SC-28, 800-53|SC-28(1), CSCv7|14.8

Plugin: Unix

Control ID: 1d566f48bb5871ee4fb63876203faf5fa72a3dc46839fe638096deba9b4ab09e