atom feed10 messages in org.apache.tomcat.usersRe: ldap authenitcation
FromSent OnAttachments
Charlene MitchellNov 25, 2002 2:35 am 
Charlene MitchellNov 25, 2002 9:28 am 
Charlene MitchellNov 26, 2002 12:45 am 
Charlene MitchellNov 26, 2002 10:07 am 
Craig R. McClanahanNov 26, 2002 10:36 am 
Hari VenkatesanNov 26, 2002 1:44 pm 
Charlene MitchellNov 26, 2002 11:42 pm 
Charlene MitchellNov 26, 2002 11:48 pm 
Craig R. McClanahanNov 27, 2002 9:35 am 
Charlene MitchellNov 27, 2002 9:50 am 
Subject:Re: ldap authenitcation
From:Charlene Mitchell (char@yahoo.co.uk)
Date:Nov 25, 2002 9:28:46 am
List:org.apache.tomcat.users

Hi,

No success so far :-(

Surely I can't be the only person trying to do something so fundamental?

How can I guarantee that I see even a failure in the log files? Seeing nothing at all seems very weird.

Thanks

Charlene

How do I authenticate against an LDAP directory using TomCat 4.1.2?

In my web.xml I have a resource that requires form authentication as follows: <login-config> <auth-method>FORM</auth-method>

<realm-name>java:/jaas/LDAPLogin</realm-name> <!-- I tried with and without this --> <form-login-config>

<form-login-page>/login</form-login-page>

<form-error-page>/login-fail</form-error-page> </form-login-config> </login-config>

I have read the JNDI Realm how-to and added the following few lines to my server.xml file. <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionURL="ldap://ldapmachine:389" userPattern="uid={0},ou=Users,o=myOrg.com" roleBase="ou=Groups,0=myOrg.com" roleName="cn" roleSearch="(uniqueMember={0})"/>

When I access a restricted URL the login page appears and I type in my credentials, but when I submit (to: j_security_check) I automatically get redirected to my login-fail page in a matter of nano-seconds (this in itself suggests that it is not working!).

When I look in the TomCat log files I cannot see any references to any attempts to contact my LDAP directory. And when I look in the LDAP access log I cannot see any attempt to be contacted either.

What step have I missed out or got wrong?

Many thanks in advance

Charlene