1

I have an admin account that has a SHA-512 encrypted password. I am using ApacheDS (v2.0.0-M19) and Apache LDAP API (v1.0.0-M28)

In my code I have the following:

final LdapConnectionConfig config = new LdapConnectionConfig();
config.setCredentials("adminsPassword");
config.setName("admin");
...

final DefaultLdapConnectionFactory factory = 
    new DefaultLdapConnectionFactory(config);

final GenericObjectPool.Config poolConfig = 
    new GenericObjectPool.Config();

ldapConnectionTemplate = new LdapConnectionTemplate(
    new LdapConnectionPool(
        new DefaultPoolableLdapConnectionFactory(factory), poolConfig));

I would like to send the password encrypted instead of in plaintext (shown above). I have tried sending that value encrypted but it errors out. Is there a call I'm missing somewhere to tell it to not use plain text?

Thanks!

user2992188
  • 283
  • 1
  • 5
  • 18
  • The documentation for 2.0.1 states that if you send no credentials, your pool contains unauthorized connections. Could you not do that and then use an explicit bind() call with credentials and secure = true? – Gwaptiva Jan 18 '21 at 09:51

0 Answers0