tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric B." <ebe...@hotmail.com>
Subject How to define a Realm as a global resource and use it as a ResourceLink?
Date Fri, 07 Aug 2009 19:27:43 GMT
Hi,

I would have thought this to be straightforward.  I finally got my LDAP 
authentication working properly with my JNDIRealm configured within my 
container (I tried both engine and context).
In order to secure and clean things up a little, I would like to move my 
JNDIRealm definition to a global resource and use it within my context, but 
I can't seem to get it working.

This is what I have:
  <GlobalNamingResources>
   <!-- LDAP directory resource -->
   <Resource name="SnoopyLDAP" auth="Container"
             type="org.apache.catalina.realm.JNDIRealm"
             connectionURL="ldap://snoopy.domain.com:389"
             userPattern="uid={0},ou=People,dc=domain,dc=com"
             roleBase="ou=Tomcat,ou=Group,dc=domain,dc=com"
             roleName="cn"
             roleSearch="(uniqueMember={0})"
             digest="md5" />

     </GlobalNamingResources>

....

<Context docBase="${catalina.home}/webapps/admin" privileged="true"
         antiResourceLocking="false" antiJARLocking="false">

    <ResourceLink name="users" global="SnoopyLDAP" 
type="org.apache.catalina.realm.JNDIRealm"/>

</Context>


Unfortunately, this does not even open a connection to the server.  Do I 
need to specify it in some other manner?  I checked the documentation for 
the <Realm> object, but there doesn't seem to be any parameter that allows 
me to link it to a global resource.

Thanks for the help!

Eric 




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message