org.apache.hadoop.crypto.key
Class KeyProviderDelegationTokenExtension
java.lang.Object
org.apache.hadoop.crypto.key.KeyProvider
org.apache.hadoop.crypto.key.KeyProviderExtension<KeyProviderDelegationTokenExtension.DelegationTokenExtension>
org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension
public class KeyProviderDelegationTokenExtension
- extends KeyProviderExtension<KeyProviderDelegationTokenExtension.DelegationTokenExtension>
A KeyProvider extension with the ability to add a renewer's Delegation
Tokens to the provided Credentials.
Methods inherited from class org.apache.hadoop.crypto.key.KeyProviderExtension |
createKey, createKey, deleteKey, flush, getCurrentKey, getExtension, getKeyProvider, getKeys, getKeysMetadata, getKeyVersion, getKeyVersions, getMetadata, isTransient, rollNewVersion, rollNewVersion, toString |
addDelegationTokens
public org.apache.hadoop.security.token.Token<?>[] addDelegationTokens(String renewer,
org.apache.hadoop.security.Credentials credentials)
throws IOException
- Passes the renewer and Credentials object to the underlying
KeyProviderDelegationTokenExtension.DelegationTokenExtension
- Parameters:
renewer
- the user allowed to renew the delegation tokenscredentials
- cache in which to add new delegation tokens
- Returns:
- list of new delegation tokens
- Throws:
IOException
- thrown if IOException if an IO error occurs.
createKeyProviderDelegationTokenExtension
public static KeyProviderDelegationTokenExtension createKeyProviderDelegationTokenExtension(KeyProvider keyProvider)
- Creates a
KeyProviderDelegationTokenExtension
using a given
KeyProvider
.
If the given KeyProvider
implements the
KeyProviderDelegationTokenExtension.DelegationTokenExtension
interface the KeyProvider
itself will provide the extension functionality, otherwise a default
extension implementation will be used.
- Parameters:
keyProvider
- KeyProvider
to use to create the
KeyProviderDelegationTokenExtension
extension.
- Returns:
- a
KeyProviderDelegationTokenExtension
instance
using the given KeyProvider
.
Copyright © 2014 Apache Software Foundation. All Rights Reserved.