Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Realm name in tomcat (web.xml)

What is the realm-name in the tomcat.

<login-config> 
     <auth-method>BASIC</auth-method> 
     <realm-name></realm-name> 
</login-config>

In the above code I have to fill the realm-name element. I have seen the following code in the server.xml file:

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

Where is the realm-name specified? Is it the user name?

like image 244
Krishna Avatar asked Jun 05 '12 06:06

Krishna


People also ask

What is realm name in web XML?

Realm name is not the user name. It is the authentication realm, 'typically a description of the computer or system being accessed" - see http://en.wikipedia.org/wiki/Basic_access_authentication. This should be name that makes sense for the resource you are protecting.

What is a realm in Tomcat?

Definition: Tomcat Realms is an interface for connecting Catalina to a existing database of usernames, passwords and roles to handle application authentication. You can manage your user access and their roles. Roles are grouping of users based on permissions you wish to grant to any group of users.

Where can I find server XML in Tomcat?

xml and web. xml. By default, these files are located at TOMCAT-HOME/conf/server. xml and TOMCAT-HOME/conf/web.

Which file realm is configured in Tomcat?

Introduction. UserDatabaseRealm is an implementation of the Tomcat Realm interface that uses a JNDI resource to store user information. By default, the JNDI resource is backed by an XML file.


1 Answers

Realm name is not the user name. It is the authentication realm, 'typically a description of the computer or system being accessed" - see http://en.wikipedia.org/wiki/Basic_access_authentication. This should be name that makes sense for the resource you are protecting.

like image 119
stevedbrown Avatar answered Sep 17 '22 11:09

stevedbrown