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
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory
SessionFactory.LDAPServers -
Field Summary
Fields inherited from class org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory
config, ignoreReferralErrors, logger, metadataResolver, serverSet, sslService, sslUsed, threadPool, timeout -
Constructor Summary
ConstructorsConstructorDescriptionLdapSessionFactory(org.elasticsearch.xpack.core.security.authc.RealmConfig config, org.elasticsearch.xpack.core.ssl.SSLService sslService, org.elasticsearch.threadpool.ThreadPool threadPool) -
Method Summary
Modifier and TypeMethodDescriptionvoidsession(String username, org.elasticsearch.common.settings.SecureString password, org.elasticsearch.action.ActionListener<LdapSession> listener) This iterates through the configured user templates attempting to open.Methods inherited from class org.elasticsearch.xpack.security.authc.ldap.support.SessionFactory
close, connectionOptions, getDefaultLdapUrls, isSslUsed, supportsUnauthenticatedSession, unauthenticatedSession
-
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:
sessionin classSessionFactory- Parameters:
username- a relative name, Not a distinguished name, that will be inserted into the template.password- The password of the userlistener- the listener to call on a failure or result
-