Class TestCoprocessorWhitelistMasterObserver
java.lang.Object
org.apache.hadoop.hbase.security.access.SecureTestUtil
org.apache.hadoop.hbase.security.access.TestCoprocessorWhitelistMasterObserver
Performs coprocessor loads for various paths and malformed strings
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Nested classes/interfaces inherited from class org.apache.hadoop.hbase.security.access.SecureTestUtil
SecureTestUtil.AccessTestAction, SecureTestUtil.MasterSyncObserver
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.slf4j.Logger
private static final byte[]
private static final org.apache.hadoop.hbase.TableName
private static final HBaseTestingUtility
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
negativeTestCase
(String[] whitelistedPaths, String coprocessorPath) Test a table modification adding a coprocessor path which is whitelistedprivate static void
positiveTestCase
(String[] whitelistedPaths, String coprocessorPath) Test a table modification adding a coprocessor path which is not whitelistedvoid
void
Test a table modification adding a coprocessor path which is whitelistedvoid
Test a table creation including a coprocessor path which is on the classpathvoid
Test a table creation including a coprocessor path which is not whitelistedvoid
Test a table modification adding a coprocessor path which is whitelistedvoid
Test a table modification adding a coprocessor path which is whitelistedvoid
Test a table creation including a coprocessor path which is not whitelistedvoid
Test a table modification adding a coprocessor path which is whitelistedvoid
Test a table modification adding a coprocessor path which is whitelistedvoid
Test a table modification adding a coprocessor path which is not whitelistedMethods inherited from class org.apache.hadoop.hbase.security.access.SecureTestUtil
checkGlobalPerms, checkTablePerms, checkTablePerms, configureSuperuser, convertToNamespace, createNamespace, createTable, createTable, createTable, createTable, createTable, deleteNamespace, deleteTable, deleteTable, enableSecurity, grantGlobal, grantGlobal, grantGlobalUsingAccessControlClient, grantOnNamespace, grantOnNamespace, grantOnNamespaceUsingAccessControlClient, grantOnTable, grantOnTable, grantOnTableUsingAccessControlClient, revokeFromNamespace, revokeFromNamespace, revokeFromNamespaceUsingAccessControlClient, revokeFromTable, revokeFromTable, revokeFromTableUsingAccessControlClient, revokeGlobal, revokeGlobal, revokeGlobalUsingAccessControlClient, verifyAllowed, verifyAllowed, verifyAllowed, verifyConfiguration, verifyDenied, verifyDenied, verifyIfEmptyList, verifyIfNull
-
Field Details
-
CLASS_RULE
-
LOG
-
UTIL
-
TEST_TABLE
-
TEST_FAMILY
-
-
Constructor Details
-
TestCoprocessorWhitelistMasterObserver
-
-
Method Details
-
tearDownTestCoprocessorWhitelistMasterObserver
- Throws:
Exception
-
positiveTestCase
private static void positiveTestCase(String[] whitelistedPaths, String coprocessorPath) throws Exception Test a table modification adding a coprocessor path which is not whitelisted- Parameters:
whitelistedPaths
- A String array of paths to add in for the whitelisting configurationcoprocessorPath
- A String to use as the path for a mock coprocessor- Throws:
Exception
-
negativeTestCase
private static void negativeTestCase(String[] whitelistedPaths, String coprocessorPath) throws Exception Test a table modification adding a coprocessor path which is whitelisted- Parameters:
whitelistedPaths
- A String array of paths to add in for the whitelisting configurationcoprocessorPath
- A String to use as the path for a mock coprocessor- Throws:
Exception
-
testSubstringNonWhitelisted
Test a table modification adding a coprocessor path which is not whitelisted- Throws:
Exception
-
testDifferentFileSystemNonWhitelisted
Test a table creation including a coprocessor path which is not whitelisted- Throws:
Exception
-
testSchemeAndDirectorywhitelisted
Test a table modification adding a coprocessor path which is whitelisted- Throws:
Exception
-
testSchemeWhitelisted
Test a table modification adding a coprocessor path which is whitelisted- Throws:
Exception
-
testDFSNameWhitelistedWorks
Test a table modification adding a coprocessor path which is whitelisted- Throws:
Exception
-
testDFSNameNotWhitelistedFails
Test a table modification adding a coprocessor path which is whitelisted- Throws:
Exception
-
testBlanketWhitelist
Test a table modification adding a coprocessor path which is whitelisted- Throws:
Exception
-
testCreationNonWhitelistedCoprocessorPath
Test a table creation including a coprocessor path which is not whitelisted- Throws:
Exception
-
testCreationClasspathCoprocessor
Test a table creation including a coprocessor path which is on the classpath- Throws:
Exception
-