Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Authentication with LDAP

 
hisham ragheb
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Moayad Abu Jaber
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Nitesh Kant
Bartender
Posts: 1638
IntelliJ IDE Java MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
hisham ragheb
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 9279
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can configure Tomcat to use LDAP for container-managed security as described here.
 
hisham ragheb
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic