Module org.elasticsearch.xcore
Class CloudCredentialManager.Noop
java.lang.Object
org.elasticsearch.xpack.core.security.cloud.CloudCredentialManager.Noop
- All Implemented Interfaces:
CloudCredentialManager
- Enclosing interface:
CloudCredentialManager
No-op default used when no real implementation is loaded.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.core.security.cloud.CloudCredentialManager
CloudCredentialManager.Noop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionextractCloudManagedCredential(ThreadContext threadContext) Extracts the caller's cloud credential fromthreadContext.booleanhasCloudManagedCredential(ThreadContext threadContext) Checks if there is a cloud credential in the thread context.voidinjectCloudManagedCredential(ThreadContext threadContext, CloudCredential credential) Injects aCloudCredentialintothreadContextso downstream actions can authenticate with it.resolverOf(PersistedCloudCredential persisted) Returns a resolver backed by a persisted credential.wrapClient(Client delegate, CloudCredential credential) Wraps client and injects the cloud credential viaCloudCredentialManager.resolverOf(CloudCredential).wrapClient(Client delegate, CloudCredentialResolver resolver) Returns a cloud-credentials-awareClient.wrapClient(Client delegate, PersistedCloudCredential persisted) Wraps client and injects the cloud credential viaCloudCredentialManager.resolverOf(PersistedCloudCredential).Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.xpack.core.security.cloud.CloudCredentialManager
resolverOf
-
Constructor Details
-
Noop
public Noop()
-
-
Method Details
-
hasCloudManagedCredential
Description copied from interface:CloudCredentialManagerChecks if there is a cloud credential in the thread context.- Specified by:
hasCloudManagedCredentialin interfaceCloudCredentialManager
-
extractCloudManagedCredential
Description copied from interface:CloudCredentialManagerExtracts the caller's cloud credential fromthreadContext.Precondition:
CloudCredentialManager.hasCloudManagedCredential(ThreadContext)must returntrue; otherwise the call fails with an unchecked exception.- Specified by:
extractCloudManagedCredentialin interfaceCloudCredentialManager- Returns:
- the caller's cloud credential
-
injectCloudManagedCredential
Description copied from interface:CloudCredentialManagerInjects aCloudCredentialintothreadContextso downstream actions can authenticate with it.- Specified by:
injectCloudManagedCredentialin interfaceCloudCredentialManager
-
resolverOf
Description copied from interface:CloudCredentialManagerReturns a resolver backed by a persisted credential.- Specified by:
resolverOfin interfaceCloudCredentialManager
-
wrapClient
Description copied from interface:CloudCredentialManagerReturns a cloud-credentials-awareClient. On everyexecute(...)the implementation obtains aCloudCredentialfromresolver, injects it into the activeThreadContextviaCloudCredentialManager.injectCloudManagedCredential(org.elasticsearch.common.util.concurrent.ThreadContext, org.elasticsearch.xpack.core.security.cloud.CloudCredential), and dispatches todelegateunder that isolated context.The credential or persisted envelope captured by
resolvermust remain open for the lifetime of the returned client.- Specified by:
wrapClientin interfaceCloudCredentialManager
-
wrapClient
Description copied from interface:CloudCredentialManagerWraps client and injects the cloud credential viaCloudCredentialManager.resolverOf(CloudCredential). Returnsdelegatewhencredentialis null.- Specified by:
wrapClientin interfaceCloudCredentialManager
-
wrapClient
Description copied from interface:CloudCredentialManagerWraps client and injects the cloud credential viaCloudCredentialManager.resolverOf(PersistedCloudCredential). Returnsdelegatewhenpersistedis null.- Specified by:
wrapClientin interfaceCloudCredentialManager
-