Altair® Panopticon

 

Tomcat User Base

The Tomcat User Base Realm is using a JNDI resource to store user information. By default, the JNDI resource is configured in an XML file. The default file is tomcat-users.xml  in the Apache Tomcat conf folder.

We strongly recommend using this authentication approach for your test or local environment. It is easy to setup and configure. However, it is not designed to be used for large-scale production or when you have a large number of users.

The following Realm has to be added in the server.xml  file in the Apache Tomcat conf folder:

<Realm className="org.apache.catalina.realm.UserDatabaseRealm" resourceName="UserDatabase"/>

   NOTE

The Tomcat User Database Realm is used as the default. No configurations are required in the server.xml  file to be able to use the Tomcat Database Realm.

 

 

The users and roles are managed in the tomcat-users.xml file in the Apache Tomcat conf folder. In this file, you can add users and roles as well as assign roles to users.

Add the following role and user to your tomcat-users.xml  file:

<role rolename="admin"/>
<user username="John" password="john" roles="admin"/>

By adding these two lines you have achieved the following:

q  Created a new role named admin

q  Created a new user with username John and password john

q  Assigned the newly created user the role admin

   NOTE

Authentication towards a Tomcat Realm (i.e., Tomcat users, LDAP, AD) in Tomcat 8.5.28 is not supported. This has been supported in all the previous and the succeeding versions.