Class LdapSessionFactory

java.lang.Object
org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory
org.elasticsearch.xpack.security.authc.ldap.LdapSessionFactory
All Implemented Interfaces:
Closeable, AutoCloseable

public class LdapSessionFactory extends SessionFactory
This factory creates LDAP connections via iterating through user templates. Note that even though there is a separate factory for Active Directory, this factory would work against AD. A template for each user context would need to be supplied.
  • Constructor Details

    • LdapSessionFactory

      public LdapSessionFactory(org.elasticsearch.xpack.core.security.authc.RealmConfig config, org.elasticsearch.xpack.core.ssl.SSLService sslService, org.elasticsearch.threadpool.ThreadPool threadPool)
  • Method Details

    • session

      public void session(String username, org.elasticsearch.common.settings.SecureString password, org.elasticsearch.action.ActionListener<LdapSession> listener)
      This iterates through the configured user templates attempting to open. If all attempts fail, the last exception is kept as the cause of the thrown exception
      Specified by:
      session in class SessionFactory
      Parameters:
      username - a relative name, Not a distinguished name, that will be inserted into the template.
      password - The password of the user
      listener - the listener to call on a failure or result