Package org.apache.hadoop.hbase.security
Class HBaseSaslRpcClient
java.lang.Object
org.apache.hadoop.hbase.security.AbstractHBaseSaslRpcClient
org.apache.hadoop.hbase.security.HBaseSaslRpcClient
A utility class that encapsulates SASL logic for RPC client. Copied from
org.apache.hadoop.security-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) class(package private) class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CryptoAESprivate booleanprivate InputStreamprivate OutputStreamprivate booleanprivate static final org.slf4j.Loggerprivate InputStreamprivate OutputStreamFields inherited from class org.apache.hadoop.hbase.security.AbstractHBaseSaslRpcClient
fallbackAllowed, saslClient, saslProps -
Constructor Summary
ConstructorsConstructorDescriptionHBaseSaslRpcClient(org.apache.hadoop.conf.Configuration conf, SaslClientAuthenticationProvider provider, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token, InetAddress serverAddr, String servicePrincipal, boolean fallbackAllowed) HBaseSaslRpcClient(org.apache.hadoop.conf.Configuration conf, SaslClientAuthenticationProvider provider, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token, InetAddress serverAddr, String servicePrincipal, boolean fallbackAllowed, String rpcProtection, boolean initStreamForCrypto) -
Method Summary
Modifier and TypeMethodDescriptionGet a SASL wrapped InputStream.Get a SASL wrapped OutputStream.voidinitCryptoCipher(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.CryptoCipherMeta cryptoCipherMeta, org.apache.hadoop.conf.Configuration conf) private static voidreadStatus(DataInputStream inStream) booleansaslConnect(InputStream inS, OutputStream outS) Do client side SASL authentication with server via the given InputStream and OutputStreamMethods inherited from class org.apache.hadoop.hbase.security.AbstractHBaseSaslRpcClient
dispose, evaluateChallenge, getInitialResponse, isComplete, verifyNegotiatedQop
-
Field Details
-
LOG
-
cryptoAesEnable
-
cryptoAES
-
saslInputStream
-
cryptoInputStream
-
saslOutputStream
-
cryptoOutputStream
-
initStreamForCrypto
-
-
Constructor Details
-
HBaseSaslRpcClient
public HBaseSaslRpcClient(org.apache.hadoop.conf.Configuration conf, SaslClientAuthenticationProvider provider, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token, InetAddress serverAddr, String servicePrincipal, boolean fallbackAllowed) throws IOException - Throws:
IOException
-
HBaseSaslRpcClient
public HBaseSaslRpcClient(org.apache.hadoop.conf.Configuration conf, SaslClientAuthenticationProvider provider, org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> token, InetAddress serverAddr, String servicePrincipal, boolean fallbackAllowed, String rpcProtection, boolean initStreamForCrypto) throws IOException - Throws:
IOException
-
-
Method Details
-
readStatus
- Throws:
IOException
-
saslConnect
Do client side SASL authentication with server via the given InputStream and OutputStream- Parameters:
inS- InputStream to useoutS- OutputStream to use- Returns:
- true if connection is set up, or false if needs to switch to simple Auth.
- Throws:
IOException
-
getSaslQOP
-
initCryptoCipher
public void initCryptoCipher(org.apache.hadoop.hbase.shaded.protobuf.generated.RPCProtos.CryptoCipherMeta cryptoCipherMeta, org.apache.hadoop.conf.Configuration conf) throws IOException - Throws:
IOException
-
getInputStream
Get a SASL wrapped InputStream. Can be called only after saslConnect() has been called.- Returns:
- a SASL wrapped InputStream
- Throws:
IOException
-
getOutputStream
Get a SASL wrapped OutputStream. Can be called only after saslConnect() has been called.- Returns:
- a SASL wrapped OutputStream
- Throws:
IOException
-