public class X509CertificateLoginModule extends ClusterLoginModule
ClusterIdentityPrincipal.
Samples:
Client comes with a Certificate with Subject DN "CN=server,O=Hazelcast,C=US" and no option is specified for this login module.
Assigned principals:
- ClusterIdentityPrincipal: "CN=server,O=Hazelcast,C=US"
- ClusterRolePrinpical: "server"
- ClusterEndpointPrincipal: [IP address of the client]
If option roleAttribute=O is used in the same scenario, then identity and endpoint will remain unchanged and role will change:
- ClusterRolePrinpical: "Hazelcast"
If option roleAttribute=SN is used in the same scenario, then no role will be assigned - i.e. no ClusterRolePrincipal
in the Subject.
If multiple values are present for the role attribute, then all values are assigned as a role name.
E.g. "cn=X, cn=Y, cn=Z, ou=Engineering, o=ACME, c=CZ" with default role attribute value ("cn") will result in following
role principals:
- ClusterRolePrinpical: "X", "Y", "Z"
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_ROLE_ATTRIBUTE
Default value for "roleAttribute" attribute.
|
static String |
OPTION_ROLE_ATTRIBUTE
Login module option name under which role name attribute is stored.
|
callbackHandler, commitSucceeded, endpoint, logger, loginSucceeded, OPTION_SKIP_ENDPOINT, OPTION_SKIP_IDENTITY, OPTION_SKIP_ROLE, options, SHARED_STATE_IDENTITY, sharedState, subject| Constructor and Description |
|---|
X509CertificateLoginModule() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
getName() |
boolean |
onLogin() |
abort, addRole, commit, getBoolOption, getIntOption, getLastIdentity, getStringOption, initialize, isSkipIdentity, isSkipRole, login, logout, onAbort, onCommit, onInitialize, onLogoutpublic static final String OPTION_ROLE_ATTRIBUTE
public static final String DEFAULT_ROLE_ATTRIBUTE
public boolean onLogin()
throws LoginException
onLogin in class ClusterLoginModuleLoginExceptionprotected String getName()
getName in class ClusterLoginModuleCopyright © 2021 Hazelcast, Inc.. All rights reserved.