public class LdapLoginModule extends BasicLdapLoginModule
BasicLdapLoginModule, this module doesn't expect full user DN to be provided as a login name. This module allows
to verify provided user credentials by doing a new LDAP bind similarly to the BasicLdapLoginModule, but it also allow
to compare provided password against a value defined in passwordAttribute module option. This login module expects an LDAP
account to be pre-configured. This account is used for searching user and roles objects. Account configuration is done by
using well-known InitialLdapContext environment variables as login module options:
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_USER_FILTER
Default value for the "userFilter" option.
|
static String |
OPTION_PASSWORD_ATTRIBUTE
Login module option name - Credentials verification is done by new LDAP binds by default.
|
static String |
OPTION_SECURITY_REALM
Option name for referencing Security realm name in Hazelcast configuration.
|
static String |
OPTION_SKIP_AUTHENTICATION
Login module option name - Allows disabling password verification and only takes care about filling
HazelcastPrincipal instances into the Subject. |
static String |
OPTION_USER_CONTEXT
Login module option name - LDAP Context in which user objects are searched.
|
static String |
OPTION_USER_FILTER
Login module option name - LDAP search string for retrieving user objects based on provided login name.
|
static String |
OPTION_USER_SEARCH_SCOPE
Login module option name - LDAP search scope used for "userFilter" search.
|
static String |
PLACEHOLDER_LOGIN
Placeholder string to be replaced by provided login name in the "userFilter" option.
|
ctx, DEFAULT_PARSE_DN, DEFAULT_ROLE_RECURSION_MAX_DEPTH, DEFAULT_USER_NAME_ATTRIBUTE, login, maxRecursionDepth, name, OPTION_PARSE_DN, OPTION_ROLE_CONTEXT, OPTION_ROLE_FILTER, OPTION_ROLE_MAPPING_ATTRIBUTE, OPTION_ROLE_MAPPING_MODE, OPTION_ROLE_NAME_ATTRIBUTE, OPTION_ROLE_RECURSION_MAX_DEPTH, OPTION_ROLE_SEARCH_SCOPE, OPTION_USER_NAME_ATTRIBUTE, parseFromDN, password, PLACEHOLDER_DN, roleContext, roleFilter, roleMappingAttribute, roleMappingMode, roleNameAttribute, roleSearchScope, userAttributes, userDN, userNameAttribute, visitedRoleDnscallbackHandler, commitSucceeded, endpoint, logger, loginSucceeded, OPTION_SKIP_ENDPOINT, OPTION_SKIP_IDENTITY, OPTION_SKIP_ROLE, options, SHARED_STATE_IDENTITY, sharedState, subject| Constructor and Description |
|---|
LdapLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
protected LdapContext |
createLdapContext() |
protected void |
initAuthentication() |
protected void |
onInitialize() |
protected boolean |
onLogin() |
protected Attributes |
setUserDnAndGetAttributes() |
getName, getSearchScope, hasMoreIgnorePartResEx, logLdapContextProperties, verifyOptionsabort, addRole, commit, getBoolOption, getIntOption, getLastIdentity, getStringOption, initialize, isSkipIdentity, isSkipRole, login, logout, onAbort, onCommit, onLogoutpublic static final String PLACEHOLDER_LOGIN
public static final String OPTION_USER_CONTEXT
public static final String OPTION_USER_FILTER
public static final String OPTION_USER_SEARCH_SCOPE
public static final String OPTION_PASSWORD_ATTRIBUTE
public static final String OPTION_SKIP_AUTHENTICATION
HazelcastPrincipal instances into the Subject.public static final String OPTION_SECURITY_REALM
public static final String DEFAULT_USER_FILTER
protected void onInitialize()
onInitialize in class BasicLdapLoginModuleprotected boolean onLogin()
throws LoginException
onLogin in class BasicLdapLoginModuleLoginExceptionprotected Attributes setUserDnAndGetAttributes() throws NamingException, FailedLoginException
setUserDnAndGetAttributes in class BasicLdapLoginModuleNamingExceptionFailedLoginExceptionprotected void initAuthentication()
throws FailedLoginException
initAuthentication in class BasicLdapLoginModuleFailedLoginExceptionprotected LdapContext createLdapContext() throws NamingException
createLdapContext in class BasicLdapLoginModuleNamingExceptionCopyright © 2022 Hazelcast, Inc.. All rights reserved.