Package org.apache.hadoop.hbase.security
Class HBaseSaslRpcServer
java.lang.Object
org.apache.hadoop.hbase.security.HBaseSaslRpcServer
A utility class that encapsulates SASL logic for RPC server. Copied from
org.apache.hadoop.security-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate CryptoAESprivate final SaslServerprivate final AttemptingUserProvidingSaslServer -
Constructor Summary
ConstructorsConstructorDescriptionHBaseSaslRpcServer(SaslServerAuthenticationProvider provider, Map<String, String> saslProps, org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.security.token.TokenIdentifier> secretManager) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()Release resources used by wrapped saslServerbyte[]evaluateResponse(byte[] response) static <T extends org.apache.hadoop.security.token.TokenIdentifier>
TgetIdentifier(String id, org.apache.hadoop.security.token.SecretManager<T> secretManager) booleanvoidswitchToCryptoAES(CryptoAES cryptoAES) byte[]unwrap(byte[] buf, int off, int len) static ThrowableUnwrap InvalidToken exception, otherwise return the one passed in.byte[]wrap(byte[] buf, int off, int len)
-
Field Details
-
serverWithProvider
-
saslServer
-
cryptoAES
-
-
Constructor Details
-
HBaseSaslRpcServer
public HBaseSaslRpcServer(SaslServerAuthenticationProvider provider, Map<String, String> saslProps, org.apache.hadoop.security.token.SecretManager<org.apache.hadoop.security.token.TokenIdentifier> secretManager) throws IOException- Throws:
IOException
-
-
Method Details
-
isComplete
-
evaluateResponse
- Throws:
SaslException
-
dispose
Release resources used by wrapped saslServer -
switchToCryptoAES
-
getAttemptingUser
-
wrap
- Throws:
SaslException
-
unwrap
- Throws:
SaslException
-
getNegotiatedQop
-
getAuthorizationID
-
getIdentifier
public static <T extends org.apache.hadoop.security.token.TokenIdentifier> T getIdentifier(String id, org.apache.hadoop.security.token.SecretManager<T> secretManager) throws org.apache.hadoop.security.token.SecretManager.InvalidToken - Throws:
org.apache.hadoop.security.token.SecretManager.InvalidToken
-
unwrap
Unwrap InvalidToken exception, otherwise return the one passed in.
-