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
Nested ClassesModifier and TypeClassDescriptionstatic classClient provider that finds custom Token in the user's UGI and authenticates with the server via DIGEST-MD5 using that password.static classCustom provider which can select our custom provider, amongst other tokens which may be available.static classServer provider which validates credentials from an in-memory database.static classA custom token identifier for our custom auth'n method. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static org.apache.hadoop.hbase.LocalHBaseClusterprivate Stringprivate static final org.apache.hadoop.conf.Configurationprivate static Fileprivate static final org.slf4j.Loggerprivate org.apache.hadoop.hbase.TableNameprivate static final Stringprivate static final Stringprivate static final HBaseTestingUtility -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidcreateBaseCluster(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 voidprivate org.apache.hadoop.conf.Configurationstatic StringgetPassword(String user) static Collection<Object[]>voidsetUp()static voidprotected static voidstartCluster(String rpcServerImpl) voidtearDown()voidvoid
-
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(HBaseTestingUtility 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
-