Class TestZooKeeperACL
java.lang.Object
org.apache.hadoop.hbase.zookeeper.TestZooKeeperACL
-
Nested Class Summary
Modifier and TypeClassDescriptionprivate static class
-
Field Summary
Modifier and TypeFieldDescriptionstatic final HBaseClassTestRule
private static final org.slf4j.Logger
private static boolean
private static final HBaseTestingUtility
private static org.apache.hadoop.hbase.zookeeper.ZKWatcher
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setUp()
static void
static void
void
void
When authentication is enabled on ZooKeeper, /hbase/hbaseid should be created with 2 ACLs: one specifies that the hbase user has full access to the node; the other, that it is world-readable.void
When authentication is enabled on ZooKeeper, /hbase/master should be created with 2 ACLs: one specifies that the hbase user has full access to the node; the other, that it is world-readable.void
When authentication is enabled on ZooKeeper, /hbase/root-region-server should be created with 2 ACLs: one specifies that the hbase user has full access to the node; the other, that it is world-readable.void
Create a node and check its ACL.void
Check if ZooKeeper JaasConfiguration is valid.void
Check if Programmatic way of setting zookeeper security settings is valid.void
Finally, we check the ACLs of a node outside of the /hbase hierarchy and verify that its ACL is simply 'hbase:Perms.ALL'.
-
Field Details
-
CLASS_RULE
-
LOG
-
TEST_UTIL
-
zkw
-
secureZKAvailable
-
-
Constructor Details
-
TestZooKeeperACL
public TestZooKeeperACL()
-
-
Method Details
-
setUpBeforeClass
- Throws:
Exception
-
tearDownAfterClass
- Throws:
Exception
-
setUp
- Throws:
Exception
-
testHBaseRootZNodeACL
Create a node and check its ACL. When authentication is enabled on ZooKeeper, all nodes (except /hbase/root-region-server, /hbase/master and /hbase/hbaseid) should be created so that only the hbase server user (master or region server user) that created them can access them, and this user should have all permissions on this node. For /hbase/root-region-server, /hbase/master, and /hbase/hbaseid the permissions should be as above, but should also be world-readable. First we check the general case of /hbase nodes in the following test, and then check the subset of world-readable nodes in the three tests after that.- Throws:
Exception
-
testHBaseRootRegionServerZNodeACL
When authentication is enabled on ZooKeeper, /hbase/root-region-server should be created with 2 ACLs: one specifies that the hbase user has full access to the node; the other, that it is world-readable.- Throws:
Exception
-
testHBaseMasterServerZNodeACL
When authentication is enabled on ZooKeeper, /hbase/master should be created with 2 ACLs: one specifies that the hbase user has full access to the node; the other, that it is world-readable.- Throws:
Exception
-
testHBaseIDZNodeACL
When authentication is enabled on ZooKeeper, /hbase/hbaseid should be created with 2 ACLs: one specifies that the hbase user has full access to the node; the other, that it is world-readable.- Throws:
Exception
-
testOutsideHBaseNodeACL
Finally, we check the ACLs of a node outside of the /hbase hierarchy and verify that its ACL is simply 'hbase:Perms.ALL'.- Throws:
Exception
-
testIsZooKeeperSecure
Check if ZooKeeper JaasConfiguration is valid.- Throws:
Exception
-
testIsZooKeeperSecureWithProgrammaticConfig
Check if Programmatic way of setting zookeeper security settings is valid.- Throws:
Exception
-
testAdminDrainAllowedOnSecureZK
- Throws:
Exception
-