Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How can I use LDAP for Tomcat authentication ?

843811Jan 16 2002 — edited Apr 28 2006
Hi

I have an implementation of apache 1.3.20 with tomcat 3.2.3. I an doing
auth. with a ldap server wihich works prefectly with apache
mod_auth_ldap (module). When i am trying to read the environment
variables with a cgi , REMOTE_USER returns me the authentificated user
but when i am doing a getremoteuser() in my servlet with tomcat , it
returns NULL Why ?

I came accross this page when looking for material and

http://www.peacetech.com/java/files/apache/tomcat/

did the following

1) Downloaded - jndi_auth_beta1.jar, Extracted jndi_auth.jar file which contained
class files and plcaed them inside my tomcat/lib directory

2) Then i have updated the server.xml file of my Tomcat, that i wanted to use LDAPRealm

<RequestInterceptor className="com.peacetech.webtools.tomcat.LdapRealm"
debug="1"
directoryUrl = "ldap://csee.usf.edu:389"
searchBaseContext = "o=usf.edu"
searchFilter = "uid={0}"
searchScopeAsString = "sub"
securityAttributes = "securityEquals"
attributesReadByOwner = "true"
connectionMaxPoolSize = "10"
ldapVersion = "3" />

Then i had shutdown and restarted the server after some initial hickups, then i have tried to open some sample JSP and sevlets in the examples directory of my server. But i was not asked for any UserId/Password. Was wondering if i have done anything wrong ??

Thanks
Arun
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 26 2006
Added on Jan 16 2002
2 comments
238 views