lightblue-platform / lightblue-rest

Data access layer as service REST API
GNU General Public License v3.0
9 stars 16 forks source link

Use UnboundID for LDAP communication in login module #257

Closed derek63 closed 8 years ago

derek63 commented 8 years ago

Built-in Java LDAP support is a joke, and requires us to write ugly code like this:

private Hashtable<String, Object> env = new Hashtable<>();
...
env.put(Context.SECURITY_AUTHENTICATION, "simple");
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, server);
...
System.setProperty("javax.net.ssl.trustStore", trustStore);
System.setProperty("javax.net.ssl.trustStorePassword", trustStorePassword);

Let's use a sane LDAP library that doesn't require System.setProperty calls and Hashtables.

I assumed UnboundID since (I think) that is what was used that in the lightblue-ldap project, but I am open to others as well (spring-ldap, etc.)

dcrissman commented 8 years ago

FWIW UnboundID is what lightblue-ldap uses.