org.apache.hadoop.hive.thrift
Class DelegationTokenSecretManager
java.lang.Object
org.apache.hadoop.security.token.SecretManager<TokenIdent>
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<DelegationTokenIdentifier>
org.apache.hadoop.hive.thrift.DelegationTokenSecretManager
- Direct Known Subclasses:
- TokenStoreDelegationTokenSecretManager
public class DelegationTokenSecretManager
- extends org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager<DelegationTokenIdentifier>
A Hive specific delegation token secret manager.
The secret manager is responsible for generating and accepting the password
for each token.
| Nested classes/interfaces inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager |
org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager.DelegationTokenInformation |
| Nested classes/interfaces inherited from class org.apache.hadoop.security.token.SecretManager |
org.apache.hadoop.security.token.SecretManager.InvalidToken |
| Fields inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager |
allKeys, currentId, currentTokens, delegationTokenSequenceNumber, noInterruptsLock, running |
|
Constructor Summary |
DelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval)
Create a secret manager |
| Methods inherited from class org.apache.hadoop.security.token.delegation.AbstractDelegationTokenSecretManager |
addKey, cancelToken, createPassword, createSecretKey, getAllKeys, isRunning, logUpdateMasterKey, renewToken, retrievePassword, startThreads, stopThreads, verifyToken |
| Methods inherited from class org.apache.hadoop.security.token.SecretManager |
createPassword, generateSecret |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegationTokenSecretManager
public DelegationTokenSecretManager(long delegationKeyUpdateInterval,
long delegationTokenMaxLifetime,
long delegationTokenRenewInterval,
long delegationTokenRemoverScanInterval)
- Create a secret manager
- Parameters:
delegationKeyUpdateInterval - the number of seconds for rolling new
secret keys.delegationTokenMaxLifetime - the maximum lifetime of the delegation
tokensdelegationTokenRenewInterval - how often the tokens must be reneweddelegationTokenRemoverScanInterval - how often the tokens are scanned
for expired tokens
createIdentifier
public DelegationTokenIdentifier createIdentifier()
- Specified by:
createIdentifier in class org.apache.hadoop.security.token.SecretManager<DelegationTokenIdentifier>
cancelDelegationToken
public void cancelDelegationToken(String tokenStrForm)
throws IOException
- Throws:
IOException
renewDelegationToken
public long renewDelegationToken(String tokenStrForm)
throws IOException
- Throws:
IOException
getDelegationToken
public String getDelegationToken(String renewer)
throws IOException
- Throws:
IOException
getUserFromToken
public String getUserFromToken(String tokenStr)
throws IOException
- Throws:
IOException
Copyright © 2014 The Apache Software Foundation. All rights reserved.