Class FanOutOneBlockAsyncDFSOutputSaslHelper
java.lang.Object
org.apache.hadoop.hbase.io.asyncfs.FanOutOneBlockAsyncDFSOutputSaslHelper
Helper class for adding sasl support for
FanOutOneBlockAsyncDFSOutput.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static final classprivate static final classprivate static interfaceprivate static final classSets user name and password when asked by the client-side SASL object.private static final classprivate static final classprivate static final classprivate static interface -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final org.slf4j.Loggerprivate static final Stringprivate static final Stringprivate static final Stringprivate static final FanOutOneBlockAsyncDFSOutputSaslHelper.SaslAdaptorprivate static final intprivate static final Stringprivate static final FanOutOneBlockAsyncDFSOutputSaslHelper.TransparentCryptoHelper -
Constructor Summary
Constructors -
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 StringbuildUsername(org.apache.hadoop.security.token.Token<org.apache.hadoop.hdfs.security.token.block.BlockTokenIdentifier> blockToken) (package private) static org.apache.hadoop.crypto.EncryptorcreateEncryptor(org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hdfs.protocol.HdfsFileStatus stat, org.apache.hadoop.hdfs.DFSClient client) private static FanOutOneBlockAsyncDFSOutputSaslHelper.SaslAdaptorcreateSaslPropertiesForEncryption(String encryptionAlgorithm) private static voiddoSaslNegotiation(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 StringgetUserNameFromEncryptionKey(org.apache.hadoop.hdfs.security.token.block.DataEncryptionKey encryptionKey) (package private) static voidtrySaslNegotiate(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
-
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
-