| Author |
Tomcat Realm JNDI problem
|
Allahbaksh Asadullah
Greenhorn
Joined: Aug 30, 2007
Posts: 9
|
|
Hi, I tried whole day with tomcat JDNI authentication. With below parameter it works fine with Active Directory. But when I use Tomcat realm I am not able authenticate my self. SearchControls searchCtls = new SearchControls(); // Specify the attributes to return // String returnedAtts[] = { SN, MEMBEROF }; String returnedAtts[] = { �sn�, �member� }; searchCtls.setReturningAttributes(returnedAtts); // Specify the search scope searchCtls.setSearchScope(SearchControls.SUBTREE_SCOPE); String searchFilter = "(&(objectClass=group)(&(objectCategory=group))(" + sAMAccountName+ "=" + userId + "))"; // Specify the Base for the search // an empty dn for all objects from all domains in the forest String searchBase = ""; NamingEnumeration results = ctx.search(searchBase, searchFilter, searchCtls); Below are few configuration which I tried <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://192.168.200.57:3268" roleName="cn" userSubtree="true" userSearch="(sAMAccountName={0})" /> <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://192.168.200.57:3268" userPattern="{0}" userSubtree="true" /> Can some one let me know equivalent of the same in Tomcat Server.xml
|
 |
 |
|
|
subject: Tomcat Realm JNDI problem
|
|
|