public class KeyAuthorizationKeyProvider
extends org.apache.hadoop.crypto.key.KeyProviderCryptoExtension
KeyProvider proxy that checks whether the current user derived via
UserGroupInformation, is authorized to perform the following
type of operations on a Key :
| Modifier and Type | Class and Description |
|---|---|
static interface |
KeyAuthorizationKeyProvider.KeyACLs
Interface that needs to be implemented by a client of the
KeyAuthorizationKeyProvider. |
static class |
KeyAuthorizationKeyProvider.KeyOpType |
org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension, org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion| Constructor and Description |
|---|
KeyAuthorizationKeyProvider(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension keyProvider,
KeyAuthorizationKeyProvider.KeyACLs acls)
The constructor takes a
KeyProviderCryptoExtension and an
implementation of KeyACLs. |
| Modifier and Type | Method and Description |
|---|---|
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
createKey(String name,
byte[] material,
org.apache.hadoop.crypto.key.KeyProvider.Options options) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
createKey(String name,
org.apache.hadoop.crypto.key.KeyProvider.Options options) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
decryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion encryptedKeyVersion) |
void |
deleteKey(String name) |
void |
flush() |
org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion |
generateEncryptedKey(String encryptionKeyName) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
getCurrentKey(String name) |
protected org.apache.hadoop.crypto.key.KeyProvider |
getKeyProvider() |
List<String> |
getKeys() |
org.apache.hadoop.crypto.key.KeyProvider.Metadata[] |
getKeysMetadata(String... names) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
getKeyVersion(String versionName) |
List<org.apache.hadoop.crypto.key.KeyProvider.KeyVersion> |
getKeyVersions(String name) |
org.apache.hadoop.crypto.key.KeyProvider.Metadata |
getMetadata(String name) |
void |
invalidateCache(String name) |
boolean |
isTransient() |
org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion |
reencryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion ekv) |
void |
reencryptEncryptedKeys(List<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion> ekvs) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
rollNewVersion(String name) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
rollNewVersion(String name,
byte[] material) |
String |
toString() |
void |
warmUpEncryptedKeys(String... names) |
close, createKeyProviderCryptoExtension, drainpublic static final String KEY_ACL
public KeyAuthorizationKeyProvider(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension keyProvider,
KeyAuthorizationKeyProvider.KeyACLs acls)
KeyProviderCryptoExtension and an
implementation of KeyACLs. All calls are delegated to the
provider keyProvider after authorization check (if required)keyProvider - the key provideracls - the Key ACLspublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion createKey(String name, org.apache.hadoop.crypto.key.KeyProvider.Options options) throws NoSuchAlgorithmException, IOException
createKey in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>NoSuchAlgorithmExceptionIOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion createKey(String name, byte[] material, org.apache.hadoop.crypto.key.KeyProvider.Options options) throws IOException
createKey in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException
rollNewVersion in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>NoSuchAlgorithmExceptionIOExceptionpublic void deleteKey(String name) throws IOException
deleteKey in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion rollNewVersion(String name, byte[] material) throws IOException
rollNewVersion in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic void invalidateCache(String name) throws IOException
invalidateCache in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic void warmUpEncryptedKeys(String... names) throws IOException
warmUpEncryptedKeys in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtensionIOExceptionpublic org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion generateEncryptedKey(String encryptionKeyName) throws IOException, GeneralSecurityException
generateEncryptedKey in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtensionIOExceptionGeneralSecurityExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion decryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion encryptedKeyVersion)
throws IOException,
GeneralSecurityException
decryptEncryptedKey in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtensionIOExceptionGeneralSecurityExceptionpublic org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion reencryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion ekv)
throws IOException,
GeneralSecurityException
reencryptEncryptedKey in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtensionIOExceptionGeneralSecurityExceptionpublic void reencryptEncryptedKeys(List<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion> ekvs) throws IOException, GeneralSecurityException
reencryptEncryptedKeys in class org.apache.hadoop.crypto.key.KeyProviderCryptoExtensionIOExceptionGeneralSecurityExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion getKeyVersion(String versionName) throws IOException
getKeyVersion in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic List<String> getKeys() throws IOException
getKeys in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic List<org.apache.hadoop.crypto.key.KeyProvider.KeyVersion> getKeyVersions(String name) throws IOException
getKeyVersions in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.Metadata getMetadata(String name) throws IOException
getMetadata in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.Metadata[] getKeysMetadata(String... names) throws IOException
getKeysMetadata in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion getCurrentKey(String name) throws IOException
getCurrentKey in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic void flush()
throws IOException
flush in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>IOExceptionpublic boolean isTransient()
isTransient in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>protected org.apache.hadoop.crypto.key.KeyProvider getKeyProvider()
getKeyProvider in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>public String toString()
toString in class org.apache.hadoop.crypto.key.KeyProviderExtension<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension>Copyright © 2008–2020 Apache Software Foundation. All rights reserved.