Bug 55888 - Not clear that a container may only contain a single Realm in server.xml
Not clear that a container may only contain a single Realm in server.xml
Product: Tomcat 7
Classification: Unclassified
Component: Documentation
PC All
: P2 normal (vote)
: ---
Assigned To: Tomcat Developers Mailing List
Depends on:
  Show dependency tree
Reported: 2013-12-16 08:39 UTC by psfung
Modified: 2014-01-09 10:45 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description psfung 2013-12-16 08:39:25 UTC
I defined a realm in server.xml...

<Engine name="Catalina" defaultHost="localhost">

below the block
<!-- Use the LockOutRealm to prevent attempts to guess user passwords
     via a brute-force attack -->
<Realm className="org.apache.catalina.realm.LockOutRealm">
  <!-- This Realm uses the UserDatabase configured in the global JNDI
       resources under the key "UserDatabase".  Any edits
       that are performed against this UserDatabase are immediately
       available for use by the Realm.  -->
  <Realm className="org.apache.catalina.realm.UserDatabaseRealm"

<Realm className="org.apache.catalina.realm.MemoryRealm"
    digest="MD5" pathname="conf/my-realm.xml"/>

It works fine initially. Later, I move the realm def above that block. The config is not changed logically, but then authentication of my realm fails.
Comment 1 Konstantin Kolinko 2013-12-16 09:21:19 UTC
A Container can have only one Realm.

Comment 2 psfung 2013-12-16 09:30:13 UTC
Please mention this in documentation / server logs.
Comment 3 Mark Thomas 2014-01-09 10:45:46 UTC
Docs updated for 7.0.51 onwards.