Class ZKDelegationTokenSecretManagerImpl
java.lang.Object
org.apache.hadoop.security.token.SecretManager<TokenIdent>
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<TokenIdent>
org.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>
org.apache.hadoop.hdfs.server.federation.router.security.token.ZKDelegationTokenSecretManagerImpl
public class ZKDelegationTokenSecretManagerImpl
extends org.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>
Zookeeper based router delegation token store implementation.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformationNested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager
org.apache.hadoop.security.token.SecretManager.InvalidToken -
Field Summary
FieldsFields inherited from class org.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager
ZK_CONF_PREFIX, ZK_DTSM_TOKEN_SEQNUM_BATCH_SIZE, ZK_DTSM_TOKEN_SEQNUM_BATCH_SIZE_DEFAULT, ZK_DTSM_TOKEN_WATCHER_ENABLED, ZK_DTSM_TOKEN_WATCHER_ENABLED_DEFAULT, ZK_DTSM_TOKENS_ROOT, ZK_DTSM_ZK_AUTH_TYPE, ZK_DTSM_ZK_CONNECTION_STRING, ZK_DTSM_ZK_CONNECTION_TIMEOUT, ZK_DTSM_ZK_CONNECTION_TIMEOUT_DEFAULT, ZK_DTSM_ZK_KERBEROS_KEYTAB, ZK_DTSM_ZK_KERBEROS_PRINCIPAL, ZK_DTSM_ZK_KERBEROS_SERVER_PRINCIPAL, ZK_DTSM_ZK_NUM_RETRIES, ZK_DTSM_ZK_NUM_RETRIES_DEFAULT, ZK_DTSM_ZK_SESSION_TIMEOUT, ZK_DTSM_ZK_SESSION_TIMEOUT_DEFAULT, ZK_DTSM_ZK_SHUTDOWN_TIMEOUT, ZK_DTSM_ZK_SHUTDOWN_TIMEOUT_DEFAULT, ZK_DTSM_ZK_SSL_ENABLED, ZK_DTSM_ZK_SSL_KEYSTORE_LOCATION, ZK_DTSM_ZK_SSL_KEYSTORE_PASSWORD, ZK_DTSM_ZK_SSL_TRUSTSTORE_LOCATION, ZK_DTSM_ZK_SSL_TRUSTSTORE_PASSWORD, ZK_DTSM_ZNODE_WORKING_PATH, ZK_DTSM_ZNODE_WORKING_PATH_DEAFULT, zkClientFields inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager
allKeys, currentId, currentTokens, delegationTokenSequenceNumber, noInterruptsLock, running, storeTokenTrackingId, tokenOwnerStats -
Constructor Summary
ConstructorsConstructorDescriptionZKDelegationTokenSecretManagerImpl(org.apache.hadoop.conf.Configuration conf) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddOrUpdateToken(org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier ident, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation info, boolean isUpdate) org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifiercancelToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier> token, String canceller) org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifierprotected voidremoveStoredToken(org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier ident) voidvoidMethods inherited from class org.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager
getCurator, getCurrentKeyId, getDelegationKey, getDelegationTokenSeqNum, getTokenInfo, getTokenInfoFromZK, getTokenInfoFromZK, getTokenInfoFromZK, incrementCurrentKeyId, incrementDelegationTokenSeqNum, isTokenWatcherEnabled, processTokenAddOrUpdate, removeStoredMasterKey, removeStoredToken, setCurator, setDelegationTokenSeqNum, storeDelegationKey, storeToken, syncLocalCacheWithZk, updateDelegationKey, updateTokenMethods inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager
addKey, addPersistedDelegationToken, addTokenForOwnerStats, checkToken, createPassword, createSecretKey, decodeTokenIdentifier, getAllKeys, getCandidateTokensForCleanup, getCurrentTokensSize, getMetrics, getTokenRenewInterval, getTokenTrackingId, getTopTokenRealOwners, getTrackingIdIfEnabled, isRunning, logExpireToken, logExpireTokens, logUpdateMasterKey, removeExpiredStoredToken, renewToken, reset, retrievePassword, rollMasterKey, setCurrentKeyId, storeNewMasterKey, storeNewToken, syncTokenOwnerStats, updateStoredToken, verifyTokenMethods inherited from class org.apache.hadoop.security.token.SecretManager
checkAvailableForRead, createPassword, generateSecret, retriableRetrievePassword, update, validateSecretKeyLength
-
Field Details
-
ZK_DTSM_ROUTER_TOKEN_SYNC_INTERVAL
- See Also:
-
ZK_DTSM_ROUTER_TOKEN_SYNC_INTERVAL_DEFAULT
public static final int ZK_DTSM_ROUTER_TOKEN_SYNC_INTERVAL_DEFAULT- See Also:
-
-
Constructor Details
-
ZKDelegationTokenSecretManagerImpl
public ZKDelegationTokenSecretManagerImpl(org.apache.hadoop.conf.Configuration conf)
-
-
Method Details
-
startThreads
- Overrides:
startThreadsin classorg.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>- Throws:
IOException
-
stopThreads
public void stopThreads()- Overrides:
stopThreadsin classorg.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>
-
createIdentifier
public org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier createIdentifier()- Specified by:
createIdentifierin classorg.apache.hadoop.security.token.SecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>
-
cancelToken
public org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier cancelToken(org.apache.hadoop.security.token.Token<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier> token, String canceller) throws IOException - Overrides:
cancelTokenin classorg.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>- Throws:
IOException
-
removeStoredToken
protected void removeStoredToken(org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier ident) throws IOException - Overrides:
removeStoredTokenin classorg.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>- Throws:
IOException
-
addOrUpdateToken
protected void addOrUpdateToken(org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier ident, org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation info, boolean isUpdate) throws Exception - Overrides:
addOrUpdateTokenin classorg.apache.hadoop.security.token.delegation.ZKDelegationTokenSecretManager<org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdentifier>- Throws:
Exception
-