@InterfaceAudience.Private public class HBaseSaslRpcClient extends java.lang.Object
org.apache.hadoop.security| Modifier and Type | Field and Description |
|---|---|
static Log |
LOG |
| Constructor and Description |
|---|
HBaseSaslRpcClient(AuthMethod method,
<any> token,
java.lang.String serverPrincipal,
boolean fallbackAllowed)
Create a HBaseSaslRpcClient for an authentication method
|
HBaseSaslRpcClient(AuthMethod method,
<any> token,
java.lang.String serverPrincipal,
boolean fallbackAllowed,
java.lang.String rpcProtection)
Create a HBaseSaslRpcClient for an authentication method
|
| Modifier and Type | Method and Description |
|---|---|
protected javax.security.sasl.SaslClient |
createDigestSaslClient(java.lang.String[] mechanismNames,
java.lang.String saslDefaultRealm,
javax.security.auth.callback.CallbackHandler saslClientCallbackHandler) |
protected javax.security.sasl.SaslClient |
createKerberosSaslClient(java.lang.String[] mechanismNames,
java.lang.String userFirstPart,
java.lang.String userSecondPart) |
void |
dispose()
Release resources used by wrapped saslClient
|
java.io.InputStream |
getInputStream(java.io.InputStream in)
Get a SASL wrapped InputStream.
|
java.io.OutputStream |
getOutputStream(java.io.OutputStream out)
Get a SASL wrapped OutputStream.
|
boolean |
saslConnect(java.io.InputStream inS,
java.io.OutputStream outS)
Do client side SASL authentication with server via the given InputStream
and OutputStream
|
public HBaseSaslRpcClient(AuthMethod method, <any> token, java.lang.String serverPrincipal, boolean fallbackAllowed) throws java.io.IOException
method - the requested authentication methodtoken - token to use if needed by the authentication methodserverPrincipal - the server principal that we are trying to set the connection up tofallbackAllowed - does the client allow fallback to simple authenticationjava.io.IOExceptionpublic HBaseSaslRpcClient(AuthMethod method, <any> token, java.lang.String serverPrincipal, boolean fallbackAllowed, java.lang.String rpcProtection) throws java.io.IOException
method - the requested authentication methodtoken - token to use if needed by the authentication methodserverPrincipal - the server principal that we are trying to set the connection up tofallbackAllowed - does the client allow fallback to simple authenticationrpcProtection - the protection level ("authentication", "integrity" or "privacy")java.io.IOExceptionprotected javax.security.sasl.SaslClient createDigestSaslClient(java.lang.String[] mechanismNames,
java.lang.String saslDefaultRealm,
javax.security.auth.callback.CallbackHandler saslClientCallbackHandler)
throws java.io.IOException
java.io.IOExceptionprotected javax.security.sasl.SaslClient createKerberosSaslClient(java.lang.String[] mechanismNames,
java.lang.String userFirstPart,
java.lang.String userSecondPart)
throws java.io.IOException
java.io.IOExceptionpublic boolean saslConnect(java.io.InputStream inS,
java.io.OutputStream outS)
throws java.io.IOException
inS - InputStream to useoutS - OutputStream to usejava.io.IOExceptionpublic java.io.InputStream getInputStream(java.io.InputStream in)
throws java.io.IOException
in - the InputStream to wrapjava.io.IOExceptionpublic java.io.OutputStream getOutputStream(java.io.OutputStream out)
throws java.io.IOException
out - the OutputStream to wrapjava.io.IOExceptionpublic void dispose()
throws javax.security.sasl.SaslException
javax.security.sasl.SaslException