Details
-
Task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
In tests there is endless duplication of setting up a JNDI LDAP connection, for example:
Hashtable<String, String> env = new Hashtable<String, String>(); env.put( Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory" ); env.put( Context.PROVIDER_URL, "ldap://" + InetAddress.getLocalHost().getHostName() + ":" + getLdapServer().getPort() ); env.put( Context.SECURITY_AUTHENTICATION, "simple" ); env.put( Context.SECURITY_PRINCIPAL, "uid=hnelson,ou=users,dc=example,dc=com" ); env.put( Context.SECURITY_CREDENTIALS, "secret" ); env.put( "java.naming.ldap.attributes.binary", "krb5key" );
That should (TM) be clean up.