@InterfaceAudience.Private
public class KMSClientProvider
extends org.apache.hadoop.crypto.key.KeyProvider
implements org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtension, org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.DelegationTokenExtension
KeyProvider implementation.| Modifier and Type | Class and Description |
|---|---|
static class |
KMSClientProvider.Factory
The factory to create KMSClientProvider, which is used by the
ServiceLoader.
|
static class |
KMSClientProvider.KMSEncryptedKeyVersion |
static class |
KMSClientProvider.KMSKeyVersion |
static class |
KMSClientProvider.KMSMetadata |
static class |
KMSClientProvider.KMSTokenRenewer
The KMS implementation of
TokenRenewer. |
| Modifier and Type | Field and Description |
|---|---|
static String |
AUTH_RETRY |
static int |
DEFAULT_AUTH_RETRY |
static String |
SCHEME_NAME |
static org.apache.hadoop.io.Text |
TOKEN_KIND |
static String |
TOKEN_KIND_STR |
| Constructor and Description |
|---|
KMSClientProvider(URI uri,
org.apache.hadoop.conf.Configuration conf) |
| Modifier and Type | Method and Description |
|---|---|
Void |
cancelDelegationToken(org.apache.hadoop.security.token.Token<?> dToken) |
void |
close()
Shutdown valueQueue executor threads
|
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 |
drain(String keyName) |
void |
flush() |
org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion |
generateEncryptedKey(String encryptionKeyName) |
String |
getCanonicalServiceName() |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
getCurrentKey(String name) |
org.apache.hadoop.security.token.Token<?> |
getDelegationToken(String renewer) |
protected static org.apache.hadoop.io.Text |
getDtService(URI uri) |
int |
getEncKeyQueueSize(String keyName) |
List<String> |
getKeys() |
org.apache.hadoop.crypto.key.KeyProvider.Metadata[] |
getKeysMetadata(String... keyNames) |
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) |
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) |
long |
renewDelegationToken(org.apache.hadoop.security.token.Token<?> dToken) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
rollNewVersion(String name) |
org.apache.hadoop.crypto.key.KeyProvider.KeyVersion |
rollNewVersion(String name,
byte[] material) |
org.apache.hadoop.security.token.Token<?> |
selectDelegationToken(org.apache.hadoop.security.Credentials creds) |
protected static org.apache.hadoop.security.token.Token<?> |
selectDelegationToken(org.apache.hadoop.security.Credentials creds,
org.apache.hadoop.io.Text service) |
protected void |
setClientTokenProvider(org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.DelegationTokenExtension provider) |
String |
toString() |
void |
warmUpEncryptedKeys(String... keyNames) |
buildVersionName, findProvider, generateKey, getBaseName, getConf, isTransient, needsPassword, noPasswordError, noPasswordWarning, optionspublic static final String TOKEN_KIND_STR
public static final org.apache.hadoop.io.Text TOKEN_KIND
public static final String SCHEME_NAME
public static final String AUTH_RETRY
public static final int DEFAULT_AUTH_RETRY
public KMSClientProvider(URI uri, org.apache.hadoop.conf.Configuration conf) throws IOException
IOExceptionprotected static org.apache.hadoop.io.Text getDtService(URI uri)
public org.apache.hadoop.crypto.key.KeyProvider.KeyVersion getKeyVersion(String versionName) throws IOException
getKeyVersion in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion getCurrentKey(String name) throws IOException
getCurrentKey in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic List<String> getKeys() throws IOException
getKeys in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.Metadata[] getKeysMetadata(String... keyNames) throws IOException
getKeysMetadata in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic 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.KeyProviderNoSuchAlgorithmExceptionIOExceptionpublic 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.KeyProviderIOExceptionpublic void invalidateCache(String name) throws IOException
invalidateCache in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion rollNewVersion(String name) throws NoSuchAlgorithmException, IOException
rollNewVersion in class org.apache.hadoop.crypto.key.KeyProviderNoSuchAlgorithmExceptionIOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion rollNewVersion(String name, byte[] material) throws IOException
rollNewVersion in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion generateEncryptedKey(String encryptionKeyName) throws IOException, GeneralSecurityException
generateEncryptedKey in interface org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtensionIOExceptionGeneralSecurityExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.KeyVersion decryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion encryptedKeyVersion)
throws IOException,
GeneralSecurityException
decryptEncryptedKey in interface org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtensionIOExceptionGeneralSecurityExceptionpublic org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion reencryptEncryptedKey(org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion ekv)
throws IOException,
GeneralSecurityException
reencryptEncryptedKey in interface org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtensionIOExceptionGeneralSecurityExceptionpublic void reencryptEncryptedKeys(List<org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.EncryptedKeyVersion> ekvs) throws IOException, GeneralSecurityException
reencryptEncryptedKeys in interface org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtensionIOExceptionGeneralSecurityExceptionpublic List<org.apache.hadoop.crypto.key.KeyProvider.KeyVersion> getKeyVersions(String name) throws IOException
getKeyVersions in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic org.apache.hadoop.crypto.key.KeyProvider.Metadata getMetadata(String name) throws IOException
getMetadata in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic void deleteKey(String name) throws IOException
deleteKey in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic void flush()
throws IOException
flush in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionpublic void warmUpEncryptedKeys(String... keyNames) throws IOException
warmUpEncryptedKeys in interface org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtensionIOExceptionpublic void drain(String keyName)
drain in interface org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.CryptoExtensionpublic int getEncKeyQueueSize(String keyName)
protected void setClientTokenProvider(org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.DelegationTokenExtension provider)
@InterfaceAudience.Private public org.apache.hadoop.security.token.Token<?> selectDelegationToken(org.apache.hadoop.security.Credentials creds)
selectDelegationToken in interface org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.DelegationTokenExtensionprotected static org.apache.hadoop.security.token.Token<?> selectDelegationToken(org.apache.hadoop.security.Credentials creds,
org.apache.hadoop.io.Text service)
public String getCanonicalServiceName()
getCanonicalServiceName in interface org.apache.hadoop.security.token.DelegationTokenIssuerpublic org.apache.hadoop.security.token.Token<?> getDelegationToken(String renewer) throws IOException
getDelegationToken in interface org.apache.hadoop.security.token.DelegationTokenIssuerIOExceptionpublic long renewDelegationToken(org.apache.hadoop.security.token.Token<?> dToken)
throws IOException
renewDelegationToken in interface org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.DelegationTokenExtensionIOExceptionpublic Void cancelDelegationToken(org.apache.hadoop.security.token.Token<?> dToken) throws IOException
cancelDelegationToken in interface org.apache.hadoop.crypto.key.KeyProviderDelegationTokenExtension.DelegationTokenExtensionIOExceptionpublic void close()
throws IOException
close in class org.apache.hadoop.crypto.key.KeyProviderIOExceptionCopyright © 2013–2022. All rights reserved.