public class RoleTokenBinding extends SessionTokenBinding
AbstractDelegationTokenBinding.TokenSecretManager| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT |
static String |
E_NO_ARN
Error message when there is no Role ARN.
|
CREDENTIALS_CONVERTED_TO_DELEGATION_TOKEN, LOG_EVENT, SESSION_TOKEN| Constructor and Description |
|---|
RoleTokenBinding()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected String |
bindingName()
Get the role of this token; subclasses should override this
for better logging.
|
AWSCredentialProviderList |
bindToTokenIdentifier(AbstractS3ATokenIdentifier retrievedIdentifier)
Returns a (wrapped)
MarshalledCredentialProvider which
requires the marshalled credentials to contain session secrets. |
RoleTokenIdentifier |
createEmptyIdentifier()
Create a new subclass of
AbstractS3ATokenIdentifier. |
RoleTokenIdentifier |
createTokenIdentifier(Optional<RoleModel.Policy> policy,
EncryptionSecrets encryptionSecrets,
org.apache.hadoop.io.Text renewer)
Create the Token Identifier.
|
String |
getDescription()
Return a description.
|
protected void |
serviceInit(org.apache.hadoop.conf.Configuration conf) |
deployUnbonded, getDuration, getExpirationDateTime, getInvoker, getTokenIdentifier, getUserAgentField, prepareSTSClient, serviceStart, serviceStop, setExpirationDateTime, setTokenIdentifierconvertTokenIdentifier, createDelegationToken, createSecretMananger, getKind, getOwnerText, getSecretManagerPasssword, getTokenIssuingPolicy, toStringbindToFileSystem, getCanonicalUri, getOwner, getPolicyProvider, getStoreContext, requireServiceStarted, requireServiceStateclose, getBlockers, getConfig, getFailureCause, getFailureState, getLifecycleHistory, getName, getServiceState, getStartTime, init, isInState, noteFailure, putBlocker, registerGlobalListener, registerServiceListener, removeBlocker, setConfig, start, stop, unregisterGlobalListener, unregisterServiceListener, waitForServiceToStoppublic static final String E_NO_ARN
public static final String COMPONENT
public RoleTokenBinding()
NAME; token kind is
DelegationConstants.ROLE_TOKEN_KIND.protected void serviceInit(org.apache.hadoop.conf.Configuration conf)
throws Exception
serviceInit in class AbstractDTServiceExceptionpublic AWSCredentialProviderList bindToTokenIdentifier(AbstractS3ATokenIdentifier retrievedIdentifier) throws IOException
MarshalledCredentialProvider which
requires the marshalled credentials to contain session secrets.bindToTokenIdentifier in class SessionTokenBindingretrievedIdentifier - the incoming identifier.IOException - on failure@Retries.RetryTranslated public RoleTokenIdentifier createTokenIdentifier(Optional<RoleModel.Policy> policy, EncryptionSecrets encryptionSecrets, org.apache.hadoop.io.Text renewer) throws IOException
DelegationConstants.DELEGATION_TOKEN_ROLE_ARN
in the config and fail if it is not set.createTokenIdentifier in class SessionTokenBindingpolicy - the policy which will be used for the requested token.encryptionSecrets - encryption secrets.renewer - the principal permitted to renew the token.IllegalArgumentException - if there is no role defined.IOException - any problem acquiring the role.public RoleTokenIdentifier createEmptyIdentifier()
AbstractDelegationTokenBindingAbstractS3ATokenIdentifier.
This is used in the secret manager.createEmptyIdentifier in class SessionTokenBindingpublic String getDescription()
AbstractDelegationTokenBindinggetDescription in class SessionTokenBindingprotected String bindingName()
SessionTokenBindingbindingName in class SessionTokenBindingCopyright © 2008–2022 Apache Software Foundation. All rights reserved.