How do I setup authentication with LDAP on Apache Tomcat?

Solution Unverified - Updated -

Issue

  • I'm trying to implement security in Tomcat, using the documentation Realm How-To JNDIRealm

  • I tried to use the same configuration as defined in the Tomcat URL for configuring the LDAP, but once the LDAP is configured I created a realm like:

<Realm className="org.apache.catalina.realm.JNDIRealm" name="jndibase"
     connectionURL="ldap://ipa.bne.redhat.com:389"
     userPattern="cn=users,cn=accounts,dc=bne,dc=redhat,dc=com"
     roleBase="cn=roles,cn=accounts,dc=bne,dc=redhat,dc=com"
     roleName="cn"
     roleSearch="(member={0})"/>

Environment

  • Enterprise Web Server (EWS)
    • 2.x
  • JBoss Web Server (JWS)
    • 3.x
  • Tomcat
    • 6
    • 7

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.