Class KerberosRealm
java.lang.Object
org.elasticsearch.xpack.core.security.authc.Realm
org.elasticsearch.xpack.security.authc.kerberos.KerberosRealm
- All Implemented Interfaces:
Comparable<org.elasticsearch.xpack.core.security.authc.Realm>,org.elasticsearch.xpack.core.security.authc.support.CachingRealm
public final class KerberosRealm
extends org.elasticsearch.xpack.core.security.authc.Realm
implements org.elasticsearch.xpack.core.security.authc.support.CachingRealm
This class provides support for Kerberos authentication using spnego
mechanism.
It provides support to extract kerberos ticket using
KerberosAuthenticationToken.extractToken(String) to build
KerberosAuthenticationToken and then authenticating user when
KerberosTicketValidator validates the ticket.
On successful authentication, it will build User object populated
with roles and will return AuthenticationResult with user object. On
authentication failure, it will return AuthenticationResult with
status to terminate authentication process.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.xpack.core.security.authc.Realm
org.elasticsearch.xpack.core.security.authc.Realm.Factory -
Field Summary
FieldsFields inherited from class org.elasticsearch.xpack.core.security.authc.Realm
config, logger -
Constructor Summary
ConstructorsConstructorDescriptionKerberosRealm(org.elasticsearch.xpack.core.security.authc.RealmConfig config, NativeRoleMappingStore nativeRoleMappingStore, org.elasticsearch.threadpool.ThreadPool threadPool) -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(org.elasticsearch.xpack.core.security.authc.AuthenticationToken token, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authc.AuthenticationResult<org.elasticsearch.xpack.core.security.user.User>> listener) voidvoidvoidinitialize(Iterable<org.elasticsearch.xpack.core.security.authc.Realm> realms, org.elasticsearch.license.XPackLicenseState licenseState) voidlookupUser(String username, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.user.User> listener) booleansupports(org.elasticsearch.xpack.core.security.authc.AuthenticationToken token) org.elasticsearch.xpack.core.security.authc.AuthenticationTokentoken(org.elasticsearch.common.util.concurrent.ThreadContext context) Methods inherited from class org.elasticsearch.xpack.core.security.authc.Realm
compareTo, domain, name, order, toString, type, usageStatsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.core.security.authc.support.CachingRealm
name
-
Field Details
-
KRB_METADATA_REALM_NAME_KEY
- See Also:
-
KRB_METADATA_UPN_KEY
- See Also:
-
-
Constructor Details
-
KerberosRealm
public KerberosRealm(org.elasticsearch.xpack.core.security.authc.RealmConfig config, NativeRoleMappingStore nativeRoleMappingStore, org.elasticsearch.threadpool.ThreadPool threadPool)
-
-
Method Details
-
initialize
public void initialize(Iterable<org.elasticsearch.xpack.core.security.authc.Realm> realms, org.elasticsearch.license.XPackLicenseState licenseState) - Overrides:
initializein classorg.elasticsearch.xpack.core.security.authc.Realm
-
getAuthenticationFailureHeaders
- Overrides:
getAuthenticationFailureHeadersin classorg.elasticsearch.xpack.core.security.authc.Realm
-
expire
- Specified by:
expirein interfaceorg.elasticsearch.xpack.core.security.authc.support.CachingRealm
-
expireAll
public void expireAll()- Specified by:
expireAllin interfaceorg.elasticsearch.xpack.core.security.authc.support.CachingRealm
-
supports
public boolean supports(org.elasticsearch.xpack.core.security.authc.AuthenticationToken token) - Specified by:
supportsin classorg.elasticsearch.xpack.core.security.authc.Realm
-
token
public org.elasticsearch.xpack.core.security.authc.AuthenticationToken token(org.elasticsearch.common.util.concurrent.ThreadContext context) - Specified by:
tokenin classorg.elasticsearch.xpack.core.security.authc.Realm
-
authenticate
public void authenticate(org.elasticsearch.xpack.core.security.authc.AuthenticationToken token, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authc.AuthenticationResult<org.elasticsearch.xpack.core.security.user.User>> listener) - Specified by:
authenticatein classorg.elasticsearch.xpack.core.security.authc.Realm
-
lookupUser
public void lookupUser(String username, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.user.User> listener) - Specified by:
lookupUserin classorg.elasticsearch.xpack.core.security.authc.Realm
-