Class CustomSaslAuthenticationProviderTestBase
java.lang.Object
org.apache.hadoop.hbase.security.provider.CustomSaslAuthenticationProviderTestBase
- Direct Known Subclasses:
TestCustomSaslAuthenticationProviderNettyRpcServer
,TestCustomSaslAuthenticationProviderSimpleRpcServer
Tests the pluggable authentication framework with SASL using a contrived authentication system.
This tests holds a "user database" in memory as a hashmap. Clients provide their password in the
client Hadoop configuration. The servers validate this password via the "user database".
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Client provider that finds custom Token in the user's UGI and authenticates with the server via DIGEST-MD5 using that password.static class
Custom provider which can select our custom provider, amongst other tokens which may be available.static class
Server provider which validates credentials from an in-memory database.static class
A custom token identifier for our custom auth'n method. -
Field Summary
Modifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.LocalHBaseCluster
private String
private static final org.apache.hadoop.conf.Configuration
private static File
private static final org.slf4j.Logger
private org.apache.hadoop.hbase.TableName
private static final String
private static final String
private static final HBaseTestingUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
createBaseCluster
(HBaseTestingUtil 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
private org.apache.hadoop.conf.Configuration
static String
getPassword
(String user) static Collection<Object[]>
void
setUp()
static void
protected static void
startCluster
(String rpcServerImpl) void
tearDown()
void
void
-
Field Details
-
LOG
-
USER_DATABASE
-
USER1_PASSWORD
- See Also:
-
USER2_PASSWORD
- See Also:
-
rpcClientImpl
-
UTIL
-
CONF
-
CLUSTER
-
KEYTAB_FILE
-
name
-
tableName
-
clusterId
-
-
Constructor Details
-
CustomSaslAuthenticationProviderTestBase
-
-
Method Details
-
parameters
-
createUserDatabase
-
getPassword
-
createPasswordToken
public static org.apache.hadoop.security.token.Token<? extends org.apache.hadoop.security.token.TokenIdentifier> createPasswordToken(String username, String password, String clusterId) -
createBaseCluster
private static void createBaseCluster(HBaseTestingUtil util, File keytabFile, org.apache.hadoop.minikdc.MiniKdc kdc) throws Exception - Throws:
Exception
-
startCluster
- Throws:
Exception
-
shutdownCluster
- Throws:
Exception
-
setUp
- Throws:
Exception
-
tearDown
- Throws:
IOException
-
createTable
- Throws:
Exception
-
getClientConf
-
testPositiveAuthentication
- Throws:
Exception
-
testNegativeAuthentication
- Throws:
Exception
-