public class TestAccessController extends SecureTestUtil
| Modifier and Type | Class and Description |
|---|---|
private class |
TestAccessController.BulkLoadAccessTestAction |
static class |
TestAccessController.BulkLoadHelper |
static class |
TestAccessController.PingCoprocessor |
static class |
TestAccessController.TestTableDDLProcedure |
SecureTestUtil.AccessTestAction, SecureTestUtil.MasterSyncObserver| Modifier and Type | Field and Description |
|---|---|
private static org.apache.hadoop.hbase.security.access.AccessController |
ACCESS_CONTROLLER |
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.conf.Configuration |
conf |
private static org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment |
CP_ENV |
private static org.apache.hadoop.fs.permission.FsPermission |
FS_PERMISSION_ALL |
private static String |
GROUP_ADMIN |
private static String |
GROUP_CREATE |
private static String |
GROUP_READ |
private static String |
GROUP_WRITE |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment |
RCP_ENV |
private static org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessorEnvironment |
RSCP_ENV |
private static org.apache.hadoop.hbase.security.User |
SUPERUSER |
private static org.apache.hadoop.hbase.client.Connection |
systemUserConnection
The systemUserConnection created here is tied to the system user.
|
private static byte[] |
TEST_FAMILY |
private static byte[] |
TEST_QUALIFIER |
private static byte[] |
TEST_ROW |
private static org.apache.hadoop.hbase.TableName |
TEST_TABLE |
private static org.apache.hadoop.hbase.TableName |
TEST_TABLE2 |
private static HBaseTestingUtility |
TEST_UTIL |
private static org.apache.hadoop.hbase.security.User |
USER_ADMIN |
private static org.apache.hadoop.hbase.security.User |
USER_ADMIN_CF |
private static org.apache.hadoop.hbase.security.User |
USER_CREATE |
private static org.apache.hadoop.hbase.security.User |
USER_GROUP_ADMIN |
private static org.apache.hadoop.hbase.security.User |
USER_GROUP_CREATE |
private static org.apache.hadoop.hbase.security.User |
USER_GROUP_READ |
private static org.apache.hadoop.hbase.security.User |
USER_GROUP_WRITE |
private static org.apache.hadoop.hbase.security.User |
USER_NONE |
private static org.apache.hadoop.hbase.security.User |
USER_OWNER |
private static org.apache.hadoop.hbase.security.User |
USER_RO |
private static org.apache.hadoop.hbase.security.User |
USER_RW |
| Constructor and Description |
|---|
TestAccessController() |
checkGlobalPerms, checkTablePerms, checkTablePerms, checkTablePerms, checkTablePerms, configureSuperuser, convertToNamespace, createNamespace, createTable, createTable, createTable, createTable, createTable, deleteNamespace, deleteTable, deleteTable, enableSecurity, grantGlobal, grantGlobalUsingAccessControlClient, grantOnNamespace, grantOnNamespaceUsingAccessControlClient, grantOnTable, grantOnTableUsingAccessControlClient, revokeFromNamespace, revokeFromNamespaceUsingAccessControlClient, revokeFromTable, revokeFromTableUsingAccessControlClient, revokeGlobal, revokeGlobalUsingAccessControlClient, verifyAllowed, verifyAllowed, verifyAllowed, verifyConfiguration, verifyDenied, verifyDenied, verifyIfEmptyList, verifyIfNullpublic static final HBaseClassTestRule CLASS_RULE
private static final org.apache.hadoop.fs.permission.FsPermission FS_PERMISSION_ALL
private static final org.slf4j.Logger LOG
private static org.apache.hadoop.hbase.TableName TEST_TABLE
private static final HBaseTestingUtility TEST_UTIL
private static org.apache.hadoop.conf.Configuration conf
private static org.apache.hadoop.hbase.client.Connection systemUserConnection
private static org.apache.hadoop.hbase.security.User SUPERUSER
private static org.apache.hadoop.hbase.security.User USER_ADMIN
private static org.apache.hadoop.hbase.security.User USER_RW
private static org.apache.hadoop.hbase.security.User USER_RO
private static org.apache.hadoop.hbase.security.User USER_OWNER
private static org.apache.hadoop.hbase.security.User USER_CREATE
private static org.apache.hadoop.hbase.security.User USER_NONE
private static org.apache.hadoop.hbase.security.User USER_ADMIN_CF
private static final String GROUP_ADMIN
private static final String GROUP_CREATE
private static final String GROUP_READ
private static final String GROUP_WRITE
private static org.apache.hadoop.hbase.security.User USER_GROUP_ADMIN
private static org.apache.hadoop.hbase.security.User USER_GROUP_CREATE
private static org.apache.hadoop.hbase.security.User USER_GROUP_READ
private static org.apache.hadoop.hbase.security.User USER_GROUP_WRITE
private static org.apache.hadoop.hbase.TableName TEST_TABLE2
private static byte[] TEST_FAMILY
private static byte[] TEST_QUALIFIER
private static byte[] TEST_ROW
private static org.apache.hadoop.hbase.coprocessor.MasterCoprocessorEnvironment CP_ENV
private static org.apache.hadoop.hbase.security.access.AccessController ACCESS_CONTROLLER
private static org.apache.hadoop.hbase.coprocessor.RegionServerCoprocessorEnvironment RSCP_ENV
private static org.apache.hadoop.hbase.coprocessor.RegionCoprocessorEnvironment RCP_ENV
public org.junit.rules.TestName name
public TestAccessController()
public static void setupBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionprivate static void setUpTableAndUserPermissions() throws Exception
Exceptionpublic void testUnauthorizedShutdown() throws Exception
Exceptionpublic void testUnauthorizedStopMaster() throws Exception
Exceptionpublic void testSecurityCapabilities() throws Exception
Exceptionpublic void testTableCreate() throws Exception
Exceptionpublic void testTableModify() throws Exception
Exceptionpublic void testTableDelete() throws Exception
Exceptionpublic void testTableTruncate() throws Exception
Exceptionpublic void testTableDisable() throws Exception
Exceptionpublic void testTableEnable() throws Exception
Exceptionpublic void testAbortProcedure() throws Exception
Exceptionpublic void testGetProcedures() throws Exception
Exceptionpublic void testGetLocks() throws Exception
Exceptionpublic void testAssign() throws Exception
Exceptionpublic void testUnassign() throws Exception
Exceptionpublic void testRegionOffline() throws Exception
Exceptionpublic void testSetSplitOrMergeEnabled() throws Exception
Exceptionpublic void testBalance() throws Exception
Exceptionpublic void testBalanceSwitch() throws Exception
Exceptionpublic void testShutdown() throws Exception
Exceptionpublic void testStopMaster() throws Exception
Exceptionprivate void verifyWrite(SecureTestUtil.AccessTestAction action) throws Exception
Exceptionpublic void testSplitWithSplitRow() throws Exception
Exceptionpublic void testCompact() throws Exception
Exceptionprivate void verifyRead(SecureTestUtil.AccessTestAction action) throws Exception
Exceptionprivate void verifyReadWrite(SecureTestUtil.AccessTestAction action) throws Exception
Exceptionpublic void testReadWrite() throws Exception
Exceptionpublic void testBulkLoad() throws Exception
Exceptionpublic void testBulkLoadWithoutWritePermission() throws Exception
Exceptionpublic void testAppend() throws Exception
Exceptionpublic void testGrantRevoke() throws Exception
Exceptionpublic void testPostGrantRevoke() throws Exception
Exceptionprivate boolean hasFoundUserPermission(List<org.apache.hadoop.hbase.security.access.UserPermission> userPermissions, List<org.apache.hadoop.hbase.security.access.UserPermission> perms)
private boolean hasFoundUserPermission(org.apache.hadoop.hbase.security.access.UserPermission userPermission, List<org.apache.hadoop.hbase.security.access.UserPermission> perms)
public void testPostGrantRevokeAtQualifierLevel() throws Exception
Exceptionpublic void testPermissionList() throws Exception
Exceptionpublic void testGlobalPermissionList() throws Exception
Exceptionprivate void verifyGlobal(SecureTestUtil.AccessTestAction action) throws Exception
Exceptionpublic void testCheckPermissions() throws Exception
Exceptionpublic void testStopRegionServer() throws Exception
Exceptionpublic void testRollWALWriterRequest() throws Exception
Exceptionpublic void testOpenRegion() throws Exception
Exceptionpublic void testCloseRegion() throws Exception
Exceptionpublic void testSnapshot() throws Exception
Exceptionpublic void testSnapshotWithOwner() throws Exception
Exceptionpublic void testGlobalAuthorizationForNewRegisteredRS() throws Exception
Exceptionpublic void testTableDescriptorsEnumeration() throws Exception
Exceptionpublic void testTableNameEnumeration() throws Exception
Exceptionpublic void testTableDeletion() throws Exception
Exceptionprivate void createTestTable(org.apache.hadoop.hbase.TableName tname) throws Exception
Exceptionpublic void testNamespaceUserGrant() throws Exception
Exceptionpublic void testAccessControlClientGrantRevoke() throws Exception
Exceptionpublic void testAccessControlClientGlobalGrantRevoke() throws Exception
Exceptionpublic void testAccessControlClientMultiGrantRevoke() throws Exception
Exceptionpublic void testAccessControlClientGrantRevokeOnNamespace() throws Exception
Exceptionpublic void testCoprocessorExec() throws Exception
Exceptionpublic void testSetQuota() throws Exception
Exceptionpublic void testGetNamespacePermission() throws Exception
Exceptionprivate void getNamespacePermissionsAndVerify(String namespaceRegexWithoutPrefix, int expectedAmount, String expectedNamespace) throws org.apache.hadoop.hbase.exceptions.HBaseException
namespaceRegexWithoutPrefix - the regualar expression for namespace, without NAMESPACE_PREFIXexpectedAmount - the expected amount of user permissions returnedexpectedNamespace - the expected namespace of each user permission returnedorg.apache.hadoop.hbase.exceptions.HBaseException - in the case of any HBase exception when accessing hbase:acl tablepublic void testTruncatePerms() throws Exception
Exceptionprivate PrivilegedAction<List<org.apache.hadoop.hbase.security.access.UserPermission>> getPrivilegedAction(String regex)
public void testAccessControlClientUserPerms() throws Exception
Exceptionpublic void testAccessControllerUserPermsRegexHandling() throws Exception
Exceptionprivate void verifyAnyCreate(SecureTestUtil.AccessTestAction action) throws Exception
Exceptionpublic void testPrepareAndCleanBulkLoad() throws Exception
Exceptionpublic void testReplicateLogEntries() throws Exception
Exceptionpublic void testAddReplicationPeer() throws Exception
Exceptionpublic void testRemoveReplicationPeer() throws Exception
Exceptionpublic void testEnableReplicationPeer() throws Exception
Exceptionpublic void testDisableReplicationPeer() throws Exception
Exceptionpublic void testGetReplicationPeerConfig() throws Exception
Exceptionpublic void testUpdateReplicationPeerConfig() throws Exception
Exceptionpublic void testListReplicationPeers() throws Exception
Exceptionpublic void testRemoteLocks() throws Exception
Exceptionpublic void testAccessControlRevokeOnlyFewPermission() throws Throwable
Throwablepublic void testGetClusterStatus() throws Exception
Exceptionpublic void testExecuteProcedures() throws Exception
Exceptionpublic void testTableAdmin() throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.