File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes Active Directory Authentication using java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Security
Bookmark "Active Directory Authentication using java" Watch "Active Directory Authentication using java" New topic
Author

Active Directory Authentication using java

jerry conosm
Greenhorn

Joined: Sep 09, 2003
Posts: 10
Hi All,

Has anyone of you have done authentication using java and ms active directory? I'm a newbie in this area of Java and our client requires that there web application be authenticated using their ms active directory. I appreciate if you can share some code to do this.

Thanks in Advance.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41524
    
  53
AD can act as an LDAP server, and as such be accessed via JNDI.

Some links on using AD for authentication be found in this thread.


Ping & DNS - my free Android networking tools app
jerry conosm
Greenhorn

Joined: Sep 09, 2003
Posts: 10
Hi Ulf,

I looked at this thread and it seems that they are discussing authentication using JAAS and AD. What I need is an LDAP way of accessing Active Directory. Do you know if there are threads that discuss LDAP authentication using AD.

I appreciate any help.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41524
    
  53
I have no idea, but I bet the Search link does
mih ira
Greenhorn

Joined: Sep 30, 2008
Posts: 10


mihira
Dale Seng
Ranch Hand

Joined: Mar 22, 2004
Posts: 275
I'm not sure the code that's posted answers the OP's question. The code shows that "user" and "password" are built into the LDAP context to "bind" to the LDAP data. That's step 1. Step 2 would be to USE that context to determine if any random user/password pair in that context are valid.

--Dale--
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Active Directory Authentication using java