public class RouterDelegationTokenSecretManager
extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
Constructor and Description |
---|
RouterDelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval,
org.apache.hadoop.conf.Configuration conf)
Create a Router Secret manager.
|
Modifier and Type | Method and Description |
---|---|
org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier |
createIdentifier() |
Set<org.apache.hadoop.security.token.delegation.DelegationKey> |
getAllMasterKeys() |
Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,Long> |
getAllTokens() |
protected int |
getCurrentKeyId() |
protected int |
getDelegationTokenSeqNum() |
int |
getLatestDTSequenceNumber() |
org.apache.hadoop.security.token.delegation.DelegationKey |
getMasterKeyByDelegationKey(org.apache.hadoop.security.token.delegation.DelegationKey key)
The Router supports obtaining the DelegationKey stored in the Router StateStote
according to the DelegationKey.
|
long |
getRenewDate(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) |
org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier |
getTokenByRouterStoreToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
Get RMDelegationTokenIdentifier according to RouterStoreToken.
|
protected org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation |
getTokenInfo(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) |
protected int |
incrementCurrentKeyId() |
protected int |
incrementDelegationTokenSeqNum() |
void |
removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey)
The Router Supports Remove the master key.
|
void |
removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier)
The Router Supports Remove Token.
|
protected void |
setDelegationTokenSeqNum(int seqNum) |
void |
setFederationFacade(org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade federationFacade) |
void |
storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey)
The Router Supports Store the New Master Key.
|
void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
The Router Supports Store new Token.
|
void |
storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
long renewDate)
The Router Supports Store new Token.
|
protected void |
storeToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) |
void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
The Router Supports Update Token.
|
void |
updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier id,
long renewDate)
The Router Supports Update Token.
|
protected void |
updateToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier,
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) |
addKey, addPersistedDelegationToken, addTokenForOwnerStats, cancelToken, checkToken, createPassword, createSecretKey, decodeTokenIdentifier, getAllKeys, getCandidateTokensForCleanup, getCurrentTokensSize, getDelegationKey, getMetrics, getTokenRenewInterval, getTokenTrackingId, getTopTokenRealOwners, getTrackingIdIfEnabled, isRunning, logExpireToken, logExpireTokens, logUpdateMasterKey, removeExpiredStoredToken, renewToken, reset, retrievePassword, rollMasterKey, setCurrentKeyId, startThreads, stopThreads, storeDelegationKey, syncTokenOwnerStats, updateDelegationKey, verifyToken
public RouterDelegationTokenSecretManager(long delegationKeyUpdateInterval, long delegationTokenMaxLifetime, long delegationTokenRenewInterval, long delegationTokenRemoverScanInterval, org.apache.hadoop.conf.Configuration conf)
delegationKeyUpdateInterval
- the number of milliseconds for rolling
new secret keys.delegationTokenMaxLifetime
- the maximum lifetime of the delegation
tokens in millisecondsdelegationTokenRenewInterval
- how often the tokens must be renewed
in millisecondsdelegationTokenRemoverScanInterval
- how often the tokens are scannedconf
- Configuration.public org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier createIdentifier()
createIdentifier
in class org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
public void storeNewMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey newKey)
storeNewMasterKey
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
newKey
- DelegationKeypublic void removeStoredMasterKey(org.apache.hadoop.security.token.delegation.DelegationKey delegationKey)
removeStoredMasterKey
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
delegationKey
- DelegationKeypublic void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, long renewDate) throws IOException
storeNewToken
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
identifier
- RMDelegationTokenrenewDate
- renewDateIOException
- IO exception occurred.public void storeNewToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
identifier
- RMDelegationToken.tokenInfo
- DelegationTokenInformation.public void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier id, long renewDate) throws IOException
updateStoredToken
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
id
- RMDelegationTokenrenewDate
- renewDateIOException
- IO exception occurredpublic void updateStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo)
identifier
- RMDelegationToken.tokenInfo
- DelegationTokenInformation.public void removeStoredToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier) throws IOException
removeStoredToken
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
identifier
- Delegation TokenIOException
- IO exception occurred.public org.apache.hadoop.security.token.delegation.DelegationKey getMasterKeyByDelegationKey(org.apache.hadoop.security.token.delegation.DelegationKey key) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
key
- Param DelegationKeyorg.apache.hadoop.yarn.exceptions.YarnException
- An internal conversion error occurred when getting the TokenIOException
- IO exception occurredpublic org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier getTokenByRouterStoreToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier identifier) throws org.apache.hadoop.yarn.exceptions.YarnException, IOException
identifier
- RMDelegationTokenIdentifierorg.apache.hadoop.yarn.exceptions.YarnException
- An internal conversion error occurred when getting the TokenIOException
- IO exception occurredpublic void setFederationFacade(org.apache.hadoop.yarn.server.federation.utils.FederationStateStoreFacade federationFacade)
@InterfaceAudience.Public @VisibleForTesting public int getLatestDTSequenceNumber()
@InterfaceAudience.Public @VisibleForTesting public Set<org.apache.hadoop.security.token.delegation.DelegationKey> getAllMasterKeys()
@InterfaceAudience.Public @VisibleForTesting public Map<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier,Long> getAllTokens()
public long getRenewDate(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident) throws org.apache.hadoop.security.token.SecretManager.InvalidToken
org.apache.hadoop.security.token.SecretManager.InvalidToken
protected int incrementDelegationTokenSeqNum()
incrementDelegationTokenSeqNum
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
protected void storeToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) throws IOException
storeToken
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
IOException
protected void updateToken(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier rmDelegationTokenIdentifier, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation tokenInfo) throws IOException
updateToken
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
IOException
protected org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation getTokenInfo(org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier ident)
getTokenInfo
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
protected int getDelegationTokenSeqNum()
getDelegationTokenSeqNum
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
protected void setDelegationTokenSeqNum(int seqNum)
setDelegationTokenSeqNum
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
protected int getCurrentKeyId()
getCurrentKeyId
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
protected int incrementCurrentKeyId()
incrementCurrentKeyId
in class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<org.apache.hadoop.yarn.security.client.RMDelegationTokenIdentifier>
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.