public abstract class SecureRpcHelper extends Object
Modifier and Type | Field and Description |
---|---|
protected ClientAuthProvider |
client_auth_provider
The authentication provider, e.g.
|
protected Config |
config
The HBaseClient config to pull values from
|
protected String |
host_ip
The IP of the region client
|
protected org.hbase.async.RegionClient |
region_client
The region client this helper will be working with
|
static String |
RPC_QOP_KEY |
protected SaslClient |
sasl_client
The Sasl client if used
|
static String |
SECURITY_AUTHENTICATION_KEY |
protected boolean |
use_wrap
Whether or not to encrypt/decrypt the payload on the socket
|
Constructor and Description |
---|
SecureRpcHelper(HBaseClient hbase_client,
org.hbase.async.RegionClient region_client,
SocketAddress remote_endpoint)
Ctor that instantiates the authentication provider and attempts to
authenticate at the same time.
|
Modifier and Type | Method and Description |
---|---|
abstract org.jboss.netty.buffer.ChannelBuffer |
handleResponse(org.jboss.netty.buffer.ChannelBuffer buf,
org.jboss.netty.channel.Channel chan)
Handles a buffer received from the region server.
|
protected byte[] |
processChallenge(byte[] b)
Handles passing a buffer off to the sasl client for challenge evaluation
|
abstract void |
sendHello(org.jboss.netty.channel.Channel channel)
Sends the initial handshake and/or SASL challenge to the region server
|
org.jboss.netty.buffer.ChannelBuffer |
unwrap(org.jboss.netty.buffer.ChannelBuffer payload)
When QOP of auth-int or auth-conf is selected
This is used to unwrap the contents from the passed buffer payload.
|
org.jboss.netty.buffer.ChannelBuffer |
wrap(org.jboss.netty.buffer.ChannelBuffer content)
When QOP of auth-int or auth-conf is selected
This is used to wrap the contents into the proper payload (ie encryption,
signature, etc) and should be called just before sending the buffer to Netty.
|
public static final String SECURITY_AUTHENTICATION_KEY
public static final String RPC_QOP_KEY
protected final Config config
protected final org.hbase.async.RegionClient region_client
protected final String host_ip
protected ClientAuthProvider client_auth_provider
protected SaslClient sasl_client
protected boolean use_wrap
public SecureRpcHelper(HBaseClient hbase_client, org.hbase.async.RegionClient region_client, SocketAddress remote_endpoint)
hbase_client
- The Hbase client we belong toregion_client
- The region client we're dealing withremote_endpoint
- The remote endpoint of the HBase Region server.public org.jboss.netty.buffer.ChannelBuffer unwrap(org.jboss.netty.buffer.ChannelBuffer payload)
payload
- A wrapper around content.IllegalStateException
- if the sasl client was unable to unwrap
the payloadpublic org.jboss.netty.buffer.ChannelBuffer wrap(org.jboss.netty.buffer.ChannelBuffer content)
content
- The content to be wrapped.IllegalStateException
- if the sasl client was unable to wrap
the payloadpublic abstract void sendHello(org.jboss.netty.channel.Channel channel)
channel
- The channel to write topublic abstract org.jboss.netty.buffer.ChannelBuffer handleResponse(org.jboss.netty.buffer.ChannelBuffer buf, org.jboss.netty.channel.Channel chan)
buf
- The buffer off the channelchan
- The channel that we received the buffer fromprotected byte[] processChallenge(byte[] b)
b
- The buffer to processIllegalStateException
- when processing of the action failed due to
a PrivilegedActionExceptionCopyright © 2010-2017, The Async HBase Authors