Module org.elasticsearch.xcore
Class InternalCloudApiKeyService.Default
java.lang.Object
org.elasticsearch.xpack.core.security.cloud.InternalCloudApiKeyService.Default
- All Implemented Interfaces:
InternalCloudApiKeyService
- Enclosing interface:
InternalCloudApiKeyService
public static class InternalCloudApiKeyService.Default
extends Object
implements InternalCloudApiKeyService
Default used when no real implementation is loaded.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xpack.core.security.cloud.InternalCloudApiKeyService
InternalCloudApiKeyService.CloudGrantApiKeyResult, InternalCloudApiKeyService.Default -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidgrantCloudAuthentication(CloudCredential cloudManagedCredential, String description, ActionListener<InternalCloudApiKeyService.CloudGrantApiKeyResult> listener) Grants a dedicated cloud API key for an ML job, using the caller's credential to authenticate the grant request.voidrevokeCloudAuthentication(PersistedCloudCredential persistedCredential, ActionListener<Void> listener)
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
grantCloudAuthentication
public void grantCloudAuthentication(CloudCredential cloudManagedCredential, String description, ActionListener<InternalCloudApiKeyService.CloudGrantApiKeyResult> listener) Description copied from interface:InternalCloudApiKeyServiceGrants a dedicated cloud API key for an ML job, using the caller's credential to authenticate the grant request. The granted key is then authenticated to produce anAuthenticationthat the caller can persist alongside the credential.- Specified by:
grantCloudAuthenticationin interfaceInternalCloudApiKeyService- Parameters:
cloudManagedCredential- the caller credential (extracted from the active request viaCloudCredentialManager.extractCloudManagedCredential(org.elasticsearch.common.util.concurrent.ThreadContext))description- a human-readable description for the granted key, by convention"<resource-kind>:<resource-id>"(for example"transform:my-transform"or"datafeed:my-feed")listener- receives the granted credential envelope and its correspondingAuthentication
-
revokeCloudAuthentication
public void revokeCloudAuthentication(PersistedCloudCredential persistedCredential, ActionListener<Void> listener) - Specified by:
revokeCloudAuthenticationin interfaceInternalCloudApiKeyService
-