@Private
@Unstable
public final class HdfsKMSUtil
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static org.apache.hadoop.crypto.key.KeyProvider |
createKeyProvider(org.apache.hadoop.conf.Configuration conf) |
Creates a new KeyProvider from the given Configuration.
|
static org.apache.hadoop.crypto.CryptoInputStream |
createWrappedInputStream(java.io.InputStream is,
org.apache.hadoop.crypto.key.KeyProvider keyProvider,
org.apache.hadoop.fs.FileEncryptionInfo fileEncryptionInfo,
org.apache.hadoop.conf.Configuration conf) |
|
static org.apache.hadoop.crypto.CryptoCodec |
getCryptoCodec(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileEncryptionInfo feInfo) |
Obtain a CryptoCodec based on the CipherSuite set in a FileEncryptionInfo
and the available CryptoCodecs configured in the Configuration.
|
static org.apache.hadoop.crypto.CryptoProtocolVersion |
getCryptoProtocolVersion(org.apache.hadoop.fs.FileEncryptionInfo feInfo) |
Obtain the crypto protocol version from the provided FileEncryptionInfo,
checking to see if this version is supported by.
|
static org.apache.hadoop.crypto.key.KeyProvider |
getKeyProvider(org.apache.hadoop.crypto.key.KeyProviderTokenIssuer issuer,
org.apache.hadoop.conf.Configuration conf) |
|
static org.apache.hadoop.io.Text |
getKeyProviderMapKey(java.net.URI namenodeUri) |
Returns a key to map namenode uri to key provider uri.
|
static java.net.URI |
getKeyProviderUri(org.apache.hadoop.security.UserGroupInformation ugi,
java.net.URI namenodeUri,
java.lang.String keyProviderUriStr,
org.apache.hadoop.conf.Configuration conf) |
The key provider uri is searched in the following order.
|
public static org.apache.hadoop.crypto.key.KeyProvider createKeyProvider(org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
conf - Configurationjava.io.IOException - if the KeyProvider is improperly specified in
the Configurationpublic static org.apache.hadoop.crypto.CryptoProtocolVersion getCryptoProtocolVersion(org.apache.hadoop.fs.FileEncryptionInfo feInfo)
throws java.io.IOException
feInfo - FileEncryptionInfojava.io.IOException - if the protocol version is unsupported.public static org.apache.hadoop.crypto.CryptoCodec getCryptoCodec(org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.fs.FileEncryptionInfo feInfo)
throws java.io.IOException
conf - ConfigurationfeInfo - FileEncryptionInfojava.io.IOException - if no suitable CryptoCodec for the CipherSuite is
available.public static java.net.URI getKeyProviderUri(org.apache.hadoop.security.UserGroupInformation ugi,
java.net.URI namenodeUri,
java.lang.String keyProviderUriStr,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
java.io.IOExceptionpublic static org.apache.hadoop.crypto.key.KeyProvider getKeyProvider(org.apache.hadoop.crypto.key.KeyProviderTokenIssuer issuer,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
java.io.IOExceptionpublic static org.apache.hadoop.io.Text getKeyProviderMapKey(java.net.URI namenodeUri)
public static org.apache.hadoop.crypto.CryptoInputStream createWrappedInputStream(java.io.InputStream is,
org.apache.hadoop.crypto.key.KeyProvider keyProvider,
org.apache.hadoop.fs.FileEncryptionInfo fileEncryptionInfo,
org.apache.hadoop.conf.Configuration conf)
throws java.io.IOException
java.io.IOExceptionCopyright © 2008–2025 Apache Software Foundation. All rights reserved.