• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Tomcat Realm JNDI problem

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
I am not a spy. Definitely. Definitely not a spy. Not me. No way. But this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic