public abstract class CustomSaslAuthenticationProviderTestBase extends Object
Modifier and Type | Class and Description |
---|---|
static class |
CustomSaslAuthenticationProviderTestBase.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 |
CustomSaslAuthenticationProviderTestBase.InMemoryProviderSelector
Custom provider which can select our custom provider, amongst other tokens which may be
available.
|
static class |
CustomSaslAuthenticationProviderTestBase.InMemoryServerProvider
Server provider which validates credentials from an in-memory database.
|
static class |
CustomSaslAuthenticationProviderTestBase.PasswordAuthTokenIdentifier
A custom token identifier for our custom auth'n method.
|
Modifier and Type | Field and Description |
---|---|
private static org.apache.hadoop.hbase.LocalHBaseCluster |
CLUSTER |
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 |
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 |
---|
CustomSaslAuthenticationProviderTestBase() |
Modifier and Type | Method and Description |
---|---|
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) |
private void |
createTable() |
private static Map<String,String> |
createUserDatabase() |
private org.apache.hadoop.conf.Configuration |
getClientConf() |
static String |
getPassword(String user) |
static Collection<Object[]> |
parameters() |
void |
setUp() |
static void |
shutdownCluster() |
protected static void |
startCluster(String rpcServerImpl) |
void |
tearDown() |
void |
testNegativeAuthentication() |
void |
testPositiveAuthentication() |
private static final org.slf4j.Logger LOG
private static final Map<String,String> USER_DATABASE
private static final String USER1_PASSWORD
private static final String USER2_PASSWORD
public String rpcClientImpl
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
private org.apache.hadoop.hbase.TableName tableName
public CustomSaslAuthenticationProviderTestBase()
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)
private static void createBaseCluster(HBaseTestingUtility util, File keytabFile, org.apache.hadoop.minikdc.MiniKdc kdc) throws Exception
Exception
protected static void startCluster(String rpcServerImpl) throws Exception
Exception
public static void shutdownCluster() throws Exception
Exception
public void tearDown() throws IOException
IOException
private void createTable() throws Exception
Exception
private org.apache.hadoop.conf.Configuration getClientConf()
public void testPositiveAuthentication() throws Exception
Exception
public void testNegativeAuthentication() throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.