• 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 ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

ldap authentication. JNDIRealm

Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Can some one tell me how to achieve server based authentication. I have installed openldap in my windows system. I am unable to add users to it. and there is nothing like role attribute in it..

Then what is <role-name> in web.xml file. please give me a detailed explanation about this.
please give me exact mapping to server.xml in tomcat to web.xml.

one more thing is do we need ldap.jar file to be placed in catalina/server/lib?

Saloon Keeper
Posts: 27863
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Last question first: The LDAP/JNDI client is part of the system, so you don't have to request it specifically.

LDAP is a general-purpose directory system and in the case of LDAP, "directory" is more like "telephone directory" than "filesystem directory", despite its hierarchical capabilities.

The LDAP JNDI Realm for Tomcat works by doing LDAP searches. There's not predefined "user" or "role" type, just entries that match the searches. If you were using Active Directory, you'd probably want to use entries that are defined for Windows Authentication, and the same applies to Solaris, but in a generic LDAP environment, you can use whatever you like.

Here's a sample user definition:

This user is only accessing via the Internet, so there's no Unix account attributes on that person's directory entry.

Here's a role definition:

People whose member UID's are in this group are authorized to log into the Legacy Trac system. It's not a Java webapp, so it only has one grouping. For J2EE apps, there would be groups for each role, so I'd set up group dn's such as cn=tracusers_submitter,ou=legacy,ou=groups,dc=mousetech,dc=com, as well as cn=tracusers_dispatcher,ou=legacy,ou=groups,dc=mousetech,dc=com and so forth.
Sometimes you feel like a nut. Sometimes you feel like a tiny ad.
a bit of art, as a gift, that will fit in a stocking
    Bookmark Topic Watch Topic
  • New Topic