Class JwtRealm
java.lang.Object
org.elasticsearch.xpack.core.security.authc.Realm
org.elasticsearch.xpack.security.authc.jwt.JwtRealm
- All Implemented Interfaces:
Closeable,AutoCloseable,Comparable<org.elasticsearch.xpack.core.security.authc.Realm>,org.elasticsearch.core.Releasable,org.elasticsearch.xpack.core.security.authc.support.CachingRealm
public class JwtRealm
extends org.elasticsearch.xpack.core.security.authc.Realm
implements org.elasticsearch.xpack.core.security.authc.support.CachingRealm, org.elasticsearch.core.Releasable
-
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
Fields inherited from class org.elasticsearch.xpack.core.security.authc.Realm
config, logger -
Constructor Summary
ConstructorsConstructorDescriptionJwtRealm(org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.xpack.core.ssl.SSLService sslService, org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper userRoleMapper, org.elasticsearch.watcher.ResourceWatcherService resourceWatcherService) -
Method Summary
Modifier and TypeMethodDescriptionvoidauthenticate(org.elasticsearch.xpack.core.security.authc.AuthenticationToken authenticationToken, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.authc.AuthenticationResult<org.elasticsearch.xpack.core.security.user.User>> listener) voidclose()voidvoidstatic org.elasticsearch.common.settings.SecureStringgetHeaderSchemeParameters(org.elasticsearch.common.util.concurrent.ThreadContext threadContext, String headerName, String schemeValue, boolean ignoreCase) voidinitialize(Iterable<org.elasticsearch.xpack.core.security.authc.Realm> allRealms, org.elasticsearch.license.XPackLicenseState xpackLicenseState) voidlookupUser(String username, org.elasticsearch.action.ActionListener<org.elasticsearch.xpack.core.security.user.User> listener) booleansupports(org.elasticsearch.xpack.core.security.authc.AuthenticationToken jwtAuthenticationToken) org.elasticsearch.xpack.core.security.authc.AuthenticationTokentoken(org.elasticsearch.common.util.concurrent.ThreadContext threadContext) voidusageStats(org.elasticsearch.action.ActionListener<Map<String, Object>> listener) static voidvalidateClientAuthorizationSettings(String clientAuthorizationType, org.elasticsearch.common.settings.SecureString clientAuthorizationSharedSecret, org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig) static voidvalidateIssuerCredentialSettings(org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig, org.elasticsearch.common.settings.SecureString hmacSecretKey, String jwkSetPath, List<String> allowedSignatureAlgorithms) validateJwkSetPathSetting(org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig, String jwkSetPath) Methods inherited from class org.elasticsearch.xpack.core.security.authc.Realm
compareTo, domain, getAuthenticationFailureHeaders, name, order, toString, typeMethods 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
-
Constructor Details
-
JwtRealm
public JwtRealm(org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig, org.elasticsearch.threadpool.ThreadPool threadPool, org.elasticsearch.xpack.core.ssl.SSLService sslService, org.elasticsearch.xpack.core.security.authc.support.UserRoleMapper userRoleMapper, org.elasticsearch.watcher.ResourceWatcherService resourceWatcherService)
-
-
Method Details
-
validateClientAuthorizationSettings
public static void validateClientAuthorizationSettings(String clientAuthorizationType, org.elasticsearch.common.settings.SecureString clientAuthorizationSharedSecret, org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig) throws org.elasticsearch.common.settings.SettingsException - Throws:
org.elasticsearch.common.settings.SettingsException
-
validateIssuerCredentialSettings
public static void validateIssuerCredentialSettings(org.elasticsearch.xpack.core.security.authc.RealmConfig realmConfig, org.elasticsearch.common.settings.SecureString hmacSecretKey, String jwkSetPath, List<String> allowedSignatureAlgorithms) throws org.elasticsearch.common.settings.SettingsException - Throws:
org.elasticsearch.common.settings.SettingsException
-
validateJwkSetPathSetting
-
initialize
public void initialize(Iterable<org.elasticsearch.xpack.core.security.authc.Realm> allRealms, org.elasticsearch.license.XPackLicenseState xpackLicenseState) - Overrides:
initializein classorg.elasticsearch.xpack.core.security.authc.Realm
-
supports
public boolean supports(org.elasticsearch.xpack.core.security.authc.AuthenticationToken jwtAuthenticationToken) - 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 threadContext) - Specified by:
tokenin classorg.elasticsearch.xpack.core.security.authc.Realm
-
authenticate
public void authenticate(org.elasticsearch.xpack.core.security.authc.AuthenticationToken authenticationToken, 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
-
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
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Specified by:
closein interfaceorg.elasticsearch.core.Releasable
-
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
-
usageStats
- Overrides:
usageStatsin classorg.elasticsearch.xpack.core.security.authc.Realm
-
getHeaderSchemeParameters
-