Tomcat 5.5.23 documentation read tips 5-realms and Access Control

Source: Internet
Author: User
This article describes how to configure realm in Tomcat ). Realm is a collection of usernames and passwords. By configuring realm, we can restrict access relationships between accounts, Web apps, and other resources. This is meaningless for easycluster, because in Tomcat of easycluster, only one web app is run.

On the other hand, by configuring realm, users can put some information into realm and Set permissions to facilitate web app development, such as making the user name and password into realm. This realm comes from servlet specification 2.4. This specification stipulates that servlet container should implement something called container managed security, which is reflected in Tomcat as this realm.

What makes realm attractive is that it supports multiple types of realm:

(1) jdbcrealm-accesses authentication information stored in a relational database, accessed via a JDBC driver.
(2) datasourcerealm-accesses authentication information stored in a relational database, accessed via a named jndi jdbc datasource.
(3) jndirealm-accesses authentication information stored in an LDAP based directory server, accessed via a JNDI provider.
(4) memoryrealm-accesses authentication information stored in an in-memory object collection, which is initialized from an XML document (CONF/tomcat-users.xml ).
(5) jaasrealm-accesses authentication information through the Java Authentication & Authorization Service (JAAS) framework.

In fact, the types of information stored are different. You can use databases, LDAP, and JNDI. When we configured the Manager account, we modified the tomcat-users.xml, which is actually memoryrealm. For more information about realm, please refer to this document, which is not detailed here, because it is of little use to us.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.