File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

LDAP username password retrival

 
Rithanya Laxmi
Ranch Hand
Posts: 184
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to retrieve the username and password frtom LDAP server for the respective userId which is passed as an input. I am using javax.naming security package in java (1.6). Please help me how we can go about this? any examples or links are really appreciated.

Thanks.
 
Matthew Brown
Bartender
Posts: 4549
8
Java Netbeans IDE Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You shouldn't be able to extract the password. It should be stored using a hash function/one-way encryption so that you can check a password but not recover it.
 
Rithanya Laxmi
Ranch Hand
Posts: 184
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Mathew. Password will always be encrypted and stored in the LDAP DB right? Where my requirement is to retrieve the encrypted password and store that in a local DB?How to go about this? Whether LDAP server will have any table where the username & password will be stored? Please clarify.

Thanks.
 
Matthew Brown
Bartender
Posts: 4549
8
Java Netbeans IDE Scala
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's going to depend on your LDAP server, and how it stores the password. But it's very common to use a one-way encryption, as I said. If that's the case then what you want to do simply isn't possible (short of running a brute force attack against every password).

You'll have to check the documentation and configuration for your specific server - maybe ask your system administrators.
 
Prajakta Acharya
Ranch Hand
Posts: 138
Java Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not 100% sure if this is possible, but something that I remember from one of my previous projects.

LDAP can add logged in user's attributes to http header.

Again, I don't know if this would depend on LDAP server implementation or so.

A link that might help you :
http://pic.dhe.ibm.com/infocenter/tivihelp/v2r1/index.jsp?topic=%2Fcom.ibm.itame2.doc_5.1%2Fam51_webservers_guide145.htm
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic