3

How to configure Tomcat 5.5 to authenticate against Win2003 Activedirectory(LDAP)

What changes are needed to default tomcat configuration, at least server.xml needs to be changed somehow to have IP of Win2003 server?

GEOCHET
  • 21,119
  • 15
  • 74
  • 98
Tom
  • 6,725
  • 24
  • 95
  • 159
  • Duplicate of http://stackoverflow.com/questions/267869/configuring-tomcat-to-authenticate-using-windows-active-directory – Raedwald Oct 08 '12 at 15:19

4 Answers4

2

I don't know if "automatic" login with IE is possible.

But you can use a "classic" login form (Java EE style) and let Tomcat perform the login against Active Directory using a JNDI Realm.

change the default realm in your server.xml or set the realm in your application's context.xml like this:

    <Realm
        className="org.apache.catalina.realm.JNDIRealm"
        debug="99"
        connectionURL="ldap://your-activedirectory-server:389"
        connectionName="a user with read access to AD (optional if anonymous access is permitted)"
        connectionPassword="password"
        referrals="follow"
        userBase="where to look for users, for instance: DC=mycompany,DC=com"
        userSearch="(sAMAccountName={0})"
        userSubtree="true"
        roleBase="where to look for groups, for instance: DC=mycompany,DC=com"
        roleName="cn"
        roleSearch="(member={0})"
        roleSubtree="true"/>

More informations here: Apache Tomcat 5.5 Realm Configuration HOW-TO

And: Active Directory Integration

Arjan Tijms
  • 37,782
  • 12
  • 108
  • 140
Jerome Delattre
  • 1,289
  • 12
  • 10
0

@thanks, catalina log shows now: PartialResultException LDAP error 10 any ideas how to fix it? – Tom Dec 11

I have seen this error and it was holding me up. I found that the LDAP server was not returning the mail items I was requesting

seen below:--   emailAddress=mail

User Property Names Mapping : userId=sAMAccountName,name=cn,emailAddress=displayName

Found that chaning to to something that was retunred worked a treat, i.e. displayName.

Jakub Hampl
  • 39,863
  • 10
  • 77
  • 106
der
  • 1
0

Configuring Tomcat With Active Directory. Have not tried it. Good luck.

Igal Serban
  • 10,558
  • 3
  • 35
  • 40
0

I want LDAP login that picks user name from activedirectory, the browser will display the user+pwd dialog when you are using firefox etc.

Its OK if IE handshakes automatically but its not necessary.

Tom
  • 6,725
  • 24
  • 95
  • 159