Class FullCredentialsTokenBinding
java.lang.Object
org.apache.hadoop.service.AbstractService
org.apache.hadoop.fs.s3a.auth.delegation.AbstractDTService
org.apache.hadoop.fs.s3a.auth.delegation.AbstractDelegationTokenBinding
org.apache.hadoop.fs.s3a.auth.delegation.FullCredentialsTokenBinding
- All Implemented Interfaces:
Closeable,AutoCloseable,org.apache.hadoop.service.Service
Full credentials: they are simply passed as-is, rather than
converted to a session.
These aren't as secure; this class exists to (a) support deployments
where there is not STS service and (b) validate the design of
S3A DT support to support different managers.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.fs.s3a.auth.delegation.AbstractDelegationTokenBinding
AbstractDelegationTokenBinding.TokenSecretManagerNested classes/interfaces inherited from interface org.apache.hadoop.service.Service
org.apache.hadoop.service.Service.STATE -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructor, uses name ofNAMEand token kind ofDelegationConstants.FULL_TOKEN_KIND. -
Method Summary
Modifier and TypeMethodDescriptionbindToTokenIdentifier(AbstractS3ATokenIdentifier retrievedIdentifier) Bind to the token identifier, returning the credential providers to use for the owner to talk to S3 and related AWS Services.Create a new subclass ofAbstractS3ATokenIdentifier.createTokenIdentifier(Optional<RoleModel.Policy> policy, EncryptionSecrets encryptionSecrets, org.apache.hadoop.io.Text renewer) Create a new delegation token.Serve up the credentials retrieved from configuration/environment inloadAWSCredentials().protected voidService startup: create the secret manager.Methods inherited from class org.apache.hadoop.fs.s3a.auth.delegation.AbstractDelegationTokenBinding
convertTokenIdentifier, createDelegationToken, createSecretMananger, deploy, getDescription, getKind, getOwnerText, getSecretManagerPasssword, getTokenIssuingPolicy, getUserAgentField, toStringMethods inherited from class org.apache.hadoop.fs.s3a.auth.delegation.AbstractDTService
bindToFileSystem, getCanonicalUri, getOwner, getPolicyProvider, getStoreContext, requireServiceStarted, requireServiceState, serviceInitMethods inherited from class org.apache.hadoop.service.AbstractService
close, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, serviceStop, setConfig, start, stop, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStop
-
Field Details
-
FULL_TOKEN
- See Also:
-
-
Constructor Details
-
FullCredentialsTokenBinding
public FullCredentialsTokenBinding()Constructor, uses name ofNAMEand token kind ofDelegationConstants.FULL_TOKEN_KIND.
-
-
Method Details
-
serviceStart
Description copied from class:AbstractDelegationTokenBindingService startup: create the secret manager.- Overrides:
serviceStartin classAbstractDelegationTokenBinding- Throws:
Exception- failure.
-
deployUnbonded
Serve up the credentials retrieved from configuration/environment inloadAWSCredentials().- Overrides:
deployUnbondedin classAbstractDelegationTokenBinding- Returns:
- a credential provider for the unbonded instance.
- Throws:
IOException- failure to load
-
createTokenIdentifier
public AbstractS3ATokenIdentifier createTokenIdentifier(Optional<RoleModel.Policy> policy, EncryptionSecrets encryptionSecrets, org.apache.hadoop.io.Text renewer) throws IOException Create a new delegation token. It's slightly inefficient to create a new one every time, but it avoids concurrency problems with managing any singleton.- Specified by:
createTokenIdentifierin classAbstractDelegationTokenBinding- Parameters:
policy- minimum policy to use, if known.encryptionSecrets- encryption secrets.renewer- the principal permitted to renew the token.- Returns:
- a DT identifier
- Throws:
IOException- failure
-
bindToTokenIdentifier
public AWSCredentialProviderList bindToTokenIdentifier(AbstractS3ATokenIdentifier retrievedIdentifier) throws IOException Description copied from class:AbstractDelegationTokenBindingBind to the token identifier, returning the credential providers to use for the owner to talk to S3 and related AWS Services.- Overrides:
bindToTokenIdentifierin classAbstractDelegationTokenBinding- Parameters:
retrievedIdentifier- the unmarshalled data- Returns:
- non-empty list of AWS credential providers to use for authenticating this client with AWS services.
- Throws:
IOException- any failure
-
createEmptyIdentifier
Description copied from class:AbstractDelegationTokenBindingCreate a new subclass ofAbstractS3ATokenIdentifier. This is used in the secret manager.- Specified by:
createEmptyIdentifierin classAbstractDelegationTokenBinding- Returns:
- an empty identifier.
-