Tom
Tom

Reputation: 6707

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

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?

Upvotes: 3

Views: 3934

Answers (4)

Jerome Delattre
Jerome Delattre

Reputation: 1299

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

Upvotes: 2

der
der

Reputation: 1

@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.

Upvotes: 0

Igal Serban
Igal Serban

Reputation: 10684

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

Upvotes: 0

Tom
Tom

Reputation: 6707

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.

Upvotes: 0

Related Questions