This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Security and the fly likes Connecting to LDAP server over SSL without using certificates Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Connecting to LDAP server over SSL without using certificates" Watch "Connecting to LDAP server over SSL without using certificates" New topic
Author

Connecting to LDAP server over SSL without using certificates

Vijay Bharghav bheemineni
Greenhorn

Joined: Aug 31, 2005
Posts: 29
Hi ,

Could you any let me know how to connect to LDAP server over SSL with out using certficates, I mean to say I must be able to connect to LDAP server with out generation of certificates or some thing like that.

Below is my code snippet which works fine when I try to connect LDAP with out SSL. I need make changes to this,so that it connects to LDAP server over SSL with out certificates.

Thanks in advance for sparing your time.

===========================================================================
public DirContext authenticate(String principle, String password) throws Exception
{
Debug.out("principle: "+principle);
Debug.out("password: "+password);
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://10.241.23.252:389");
env.put(Context.SECURITY_AUTHENTICATION,"simple");
env.put(Context.SECURITY_PRINCIPAL,principle);
env.put(Context.SECURITY_CREDENTIALS,password);

DirContext ctx = new InitialDirContext(env);
return ctx;
}
===========================================================================

Regards,
Vijay Bharghav Bheemineni.
 
 
subject: Connecting to LDAP server over SSL without using certificates
 
Similar Threads
Password Change on Ldap keep on failing
Spring 3.1 LDAP Authentication Just Hangs: Where To Look?
Configuring the application policy in login-config.xml for LDAP Apache DS
cannot connect to LDAP through JNDI
hi