|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.security.token.SecretManager<T>
T - The type of the token identifierpublic abstract class SecretManager<T extends TokenIdentifier>
The server-side secret manager for each token type.
| Nested Class Summary | |
|---|---|
static class |
SecretManager.InvalidToken
The token was invalid and the message explains why. |
| Constructor Summary | |
|---|---|
SecretManager()
|
|
| Method Summary | |
|---|---|
abstract T |
createIdentifier()
Create an empty token identifier. |
protected static byte[] |
createPassword(byte[] identifier,
SecretKey key)
Compute HMAC of the identifier using the secret key and return the output as password |
protected abstract byte[] |
createPassword(T identifier)
Create the password for the given identifier. |
protected static SecretKey |
createSecretKey(byte[] key)
Convert the byte[] to a secret key |
protected SecretKey |
generateSecret()
Generate a new random secret key. |
abstract byte[] |
retrievePassword(T identifier)
Retrieve the password for the given token identifier. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SecretManager()
| Method Detail |
|---|
protected abstract byte[] createPassword(T identifier)
identifier - the identifier to use
public abstract byte[] retrievePassword(T identifier)
throws SecretManager.InvalidToken
identifier - the identifier to validate
SecretManager.InvalidToken - the token was invalidpublic abstract T createIdentifier()
protected SecretKey generateSecret()
protected static byte[] createPassword(byte[] identifier,
SecretKey key)
identifier - the bytes of the identifierkey - the secret key
protected static SecretKey createSecretKey(byte[] key)
key - the byte[] to create a secret key from
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||