aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Authentication with LDAP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Authentication with LDAP" Watch "Authentication with LDAP" New topic
Author

Authentication with LDAP

hisham ragheb
Ranch Hand

Joined: Apr 14, 2008
Posts: 30
i want to know how to automate users authentication from ldap data store rather than from the server realm?i know how to use ldap(openldap) and ofcourse the JNDI API but is there any mapping tool in the sun application server to the ldap DIT initial context and the searching controls , filters and son on to ease this process?


SCJP 1.5 (94%), SCWCD 1.4 (91%), SCBCD 1.5 (95%)
Moayad Abu Jaber
Ranch Hand

Joined: Jan 15, 2008
Posts: 80
I think is no you need to create login page through this login.
You can use the JNDI API in your pages if the user right will work well rather than you need catch the exception.


Best Regards,
Moayad Abu Jaber
SCJP 5.0, SCWCD 1.4, SCBCD 5.0
Nitesh Kant
Bartender

Joined: Feb 25, 2007
Posts: 1638

I am not sure what you mean by "automating user authentication" and mapping tool.
However, if you want to do ldap authentication from java, then this tutorial trail will be a good point to start.

Using JNDI to connect to LDAP is in itself an easy process and I am not sure what further tools you are looking for.

By the way this post will probably belong to the Security forum.
[ May 12, 2008: Message edited by: Nitesh Kant ]

apigee, a better way to API!
hisham ragheb
Ranch Hand

Joined: Apr 14, 2008
Posts: 30
I am not sure what you mean by "automating user authentication" and mapping tool.


ok..i mean when you want to deploy a web application that use a FORM login page you have to supply the action=j_security_check and both properties names for the username and password must be j_username and j_password..my point is that this type of authentication uses the file Realm of the web container which means i have to edit the editor and add users in this file(tomcat-users.xml is an example)..so this nonsense if i have a website that accept members..i can store users info using JNDI with LDAP but..how to map the authentication to the LDAP entries...how i can say that j_username in the FORM authentication page will be mapped to "cn" attribute in ldap?and also how to map j_passwaord to ldap attribute "userPassword"?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8710
    
    6

You can configure Tomcat to use LDAP for container-managed security as described here.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
hisham ragheb
Ranch Hand

Joined: Apr 14, 2008
Posts: 30
Originally posted by Joe Ess:
You can configure Tomcat to use LDAP for container-managed security as described here.



Thank you alot Joe Ess..it was very useful and exactly what i want.

[ May 12, 2008: Message edited by: hisham ragheb ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Authentication with LDAP
 
Similar Threads
WAS Security
Authentication with LDAP
about ldap and jaas?
is it possible through LDAP ??
is it possible