public class TestHBaseSaslRpcClient extends Object
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
(package private) static String |
DEFAULT_USER_NAME |
(package private) static String |
DEFAULT_USER_PASSWORD |
org.junit.rules.ExpectedException |
exception |
private static org.apache.log4j.Logger |
LOG |
Constructor and Description |
---|
TestHBaseSaslRpcClient() |
Modifier and Type | Method and Description |
---|---|
private void |
assertAuthMethodRead(org.apache.hadoop.io.DataInputBuffer in,
org.apache.hadoop.hbase.security.AuthMethod authMethod) |
private void |
assertAuthMethodWrite(org.apache.hadoop.io.DataOutputBuffer out,
org.apache.hadoop.hbase.security.AuthMethod authMethod) |
private boolean |
assertIOExceptionThenSaslClientIsNull(String principal,
String password) |
private boolean |
assertIOExceptionWhenGetStreamsBeforeConnectCall(String principal,
String password) |
private boolean |
assertSuccessCreationDigestPrincipal(String principal,
String password) |
private boolean |
assertSuccessCreationKerberosPrincipal(String principal) |
private boolean |
assertSuccessCreationSimplePrincipal(String principal,
String password) |
static void |
before() |
private org.apache.hadoop.hbase.security.HBaseSaslRpcClient |
createSaslRpcClientForKerberos(String principal) |
private org.apache.hadoop.hbase.security.HBaseSaslRpcClient |
createSaslRpcClientSimple(String principal,
String password) |
private org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> |
createTokenMock() |
private org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> |
createTokenMockWithCredentials(String principal,
String password) |
void |
testAuthMethodReadWrite() |
void |
testDigestSaslClientCallbackHandler() |
void |
testDigestSaslClientCallbackHandlerWithException() |
void |
testFailedEvaluateResponse() |
void |
testHBaseSaslRpcClientCreation() |
void |
testSaslClientUsesGivenRpcProtection() |
public static final HBaseClassTestRule CLASS_RULE
static final String DEFAULT_USER_NAME
static final String DEFAULT_USER_PASSWORD
private static final org.apache.log4j.Logger LOG
public org.junit.rules.ExpectedException exception
public TestHBaseSaslRpcClient()
public static void before()
public void testSaslClientUsesGivenRpcProtection() throws Exception
Exception
public void testDigestSaslClientCallbackHandler() throws UnsupportedCallbackException
UnsupportedCallbackException
public void testDigestSaslClientCallbackHandlerWithException()
public void testHBaseSaslRpcClientCreation() throws Exception
Exception
public void testAuthMethodReadWrite() throws IOException
IOException
private void assertAuthMethodRead(org.apache.hadoop.io.DataInputBuffer in, org.apache.hadoop.hbase.security.AuthMethod authMethod) throws IOException
IOException
private void assertAuthMethodWrite(org.apache.hadoop.io.DataOutputBuffer out, org.apache.hadoop.hbase.security.AuthMethod authMethod) throws IOException
IOException
private boolean assertIOExceptionWhenGetStreamsBeforeConnectCall(String principal, String password) throws IOException
IOException
private boolean assertIOExceptionThenSaslClientIsNull(String principal, String password)
private boolean assertSuccessCreationKerberosPrincipal(String principal)
private boolean assertSuccessCreationDigestPrincipal(String principal, String password)
private boolean assertSuccessCreationSimplePrincipal(String principal, String password)
private org.apache.hadoop.hbase.security.HBaseSaslRpcClient createSaslRpcClientForKerberos(String principal) throws IOException
IOException
private org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> createTokenMockWithCredentials(String principal, String password) throws IOException
IOException
private org.apache.hadoop.hbase.security.HBaseSaslRpcClient createSaslRpcClientSimple(String principal, String password) throws IOException
IOException
private org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> createTokenMock()
public void testFailedEvaluateResponse() throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.