Class FanOutOneBlockAsyncDFSOutputSaslHelper
java.lang.Object
org.apache.hadoop.hbase.io.asyncfs.FanOutOneBlockAsyncDFSOutputSaslHelper
Helper class for adding sasl support for
FanOutOneBlockAsyncDFSOutput
.-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static final class
private static final class
private static interface
private static final class
Sets user name and password when asked by the client-side SASL object.private static final class
private static final class
private static final class
private static interface
-
Field Summary
Modifier and TypeFieldDescriptionprivate static final org.slf4j.Logger
private static final String
private static final String
private static final String
private static final FanOutOneBlockAsyncDFSOutputSaslHelper.SaslAdaptor
private static final int
private static final String
private static final FanOutOneBlockAsyncDFSOutputSaslHelper.TransparentCryptoHelper
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static char[]
buildClientPassword
(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> blockToken) private static String
buildUsername
(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> blockToken) (package private) static org.apache.hadoop.crypto.Encryptor
createEncryptor
(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hdfs.protocol.HdfsFileStatus stat, org.apache.hadoop.hdfs.DFSClient client) private static FanOutOneBlockAsyncDFSOutputSaslHelper.SaslAdaptor
createSaslPropertiesForEncryption
(String encryptionAlgorithm) private static void
doSaslNegotiation
(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.channel.Channel channel, int timeoutMs, String username, char[] password, Map<String, String> saslProps, org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void> saslPromise, org.apache.hadoop.hdfs.DFSClient dfsClient) private static char[]
encryptionKeyToPassword
(byte[] encryptionKey) private static String
getUserNameFromEncryptionKey
(org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey encryptionKey) (package private) static void
trySaslNegotiate
(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.channel.Channel channel, org.apache.hadoop.hdfs.protocol.DatanodeInfo dnInfo, int timeoutMs, org.apache.hadoop.hdfs.DFSClient client, org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> accessToken, org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void> saslPromise)
-
Field Details
-
LOG
-
SERVER_NAME
- See Also:
-
PROTOCOL
- See Also:
-
MECHANISM
- See Also:
-
SASL_TRANSFER_MAGIC_NUMBER
- See Also:
-
NAME_DELIMITER
- See Also:
-
SASL_ADAPTOR
-
TRANSPARENT_CRYPTO_HELPER
private static final FanOutOneBlockAsyncDFSOutputSaslHelper.TransparentCryptoHelper TRANSPARENT_CRYPTO_HELPER
-
-
Constructor Details
-
FanOutOneBlockAsyncDFSOutputSaslHelper
private FanOutOneBlockAsyncDFSOutputSaslHelper()
-
-
Method Details
-
createSaslAdaptor
private static FanOutOneBlockAsyncDFSOutputSaslHelper.SaslAdaptor createSaslAdaptor() throws NoSuchFieldException, NoSuchMethodException -
createTransparentCryptoHelperWithoutHDFS12396
private static FanOutOneBlockAsyncDFSOutputSaslHelper.TransparentCryptoHelper createTransparentCryptoHelperWithoutHDFS12396() throws NoSuchMethodException- Throws:
NoSuchMethodException
-
createTransparentCryptoHelperWithHDFS12396
-
createTransparentCryptoHelper
-
getUserNameFromEncryptionKey
private static String getUserNameFromEncryptionKey(org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey encryptionKey) -
encryptionKeyToPassword
-
buildUsername
private static String buildUsername(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> blockToken) -
buildClientPassword
private static char[] buildClientPassword(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> blockToken) -
createSaslPropertiesForEncryption
-
doSaslNegotiation
private static void doSaslNegotiation(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.channel.Channel channel, int timeoutMs, String username, char[] password, Map<String, String> saslProps, org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void> saslPromise, org.apache.hadoop.hdfs.DFSClient dfsClient) -
trySaslNegotiate
static void trySaslNegotiate(org.apache.hadoop.conf.Configuration conf, org.apache.hbase.thirdparty.io.netty.channel.Channel channel, org.apache.hadoop.hdfs.protocol.DatanodeInfo dnInfo, int timeoutMs, org.apache.hadoop.hdfs.DFSClient client, org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> accessToken, org.apache.hbase.thirdparty.io.netty.util.concurrent.Promise<Void> saslPromise) throws IOException - Throws:
IOException
-
createEncryptor
static org.apache.hadoop.crypto.Encryptor createEncryptor(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hdfs.protocol.HdfsFileStatus stat, org.apache.hadoop.hdfs.DFSClient client) throws IOException - Throws:
IOException
-