public class TestCustomSaslAuthenticationProvider extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestCustomSaslAuthenticationProvider.InMemoryClientProvider
Client provider that finds custom Token in the user's UGI and authenticates with the server
via DIGEST-MD5 using that password.
|
static class |
TestCustomSaslAuthenticationProvider.InMemoryProviderSelector
Custom provider which can select our custom provider, amongst other tokens which
may be available.
|
static class |
TestCustomSaslAuthenticationProvider.InMemoryServerProvider
Server provider which validates credentials from an in-memory database.
|
static class |
TestCustomSaslAuthenticationProvider.PasswordAuthTokenIdentifier
A custom token identifier for our custom auth'n method.
|
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.hbase.LocalHBaseCluster |
CLUSTER |
(package private) String |
clusterId |
private static org.apache.hadoop.conf.Configuration |
CONF |
private static File |
KEYTAB_FILE |
private static org.slf4j.Logger |
LOG |
TableNameTestRule |
name |
String |
rpcClientImpl |
String |
rpcServerImpl |
(package private) org.apache.hadoop.hbase.TableName |
tableName |
private static Map<String,String> |
USER_DATABASE |
private static String |
USER1_PASSWORD |
private static String |
USER2_PASSWORD |
private static HBaseTestingUtility |
UTIL |
Constructor and Description |
---|
TestCustomSaslAuthenticationProvider() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
createBaseCluster(HBaseTestingUtility util,
File keytabFile,
org.apache.hadoop.minikdc.MiniKdc kdc) |
static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> |
createPasswordToken(String username,
String password,
String clusterId) |
void |
createTable() |
private static Map<String,String> |
createUserDatabase() |
static String |
getPassword(String user) |
static Collection<Object[]> |
parameters() |
void |
setUpBeforeTest() |
static void |
setupCluster() |
void |
shutDownCluster() |
static void |
teardownCluster() |
void |
testNegativeAuthentication() |
void |
testPositiveAuthentication() |
private static final org.slf4j.Logger LOG
public static final HBaseClassTestRule CLASS_RULE
private static final Map<String,String> USER_DATABASE
private static final String USER1_PASSWORD
private static final String USER2_PASSWORD
public String rpcClientImpl
public String rpcServerImpl
private static final HBaseTestingUtility UTIL
private static final org.apache.hadoop.conf.Configuration CONF
private static org.apache.hadoop.hbase.LocalHBaseCluster CLUSTER
private static File KEYTAB_FILE
public TableNameTestRule name
org.apache.hadoop.hbase.TableName tableName
public TestCustomSaslAuthenticationProvider()
public static Collection<Object[]> parameters()
private static Map<String,String> createUserDatabase()
public static String getPassword(String user)
public static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> createPasswordToken(String username, String password, String clusterId)
static void createBaseCluster(HBaseTestingUtility util, File keytabFile, org.apache.hadoop.minikdc.MiniKdc kdc) throws Exception
Exception
public static void setupCluster() throws Exception
Exception
public void setUpBeforeTest() throws Exception
Exception
public static void teardownCluster() throws Exception
Exception
public void shutDownCluster() throws IOException
IOException
public void createTable() throws Exception
Exception
public void testPositiveAuthentication() throws Exception
Exception
public void testNegativeAuthentication() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.