Class TestZooKeeperACL

java.lang.Object
org.apache.hadoop.hbase.zookeeper.TestZooKeeperACL

@Tag("org.apache.hadoop.hbase.testclassification.ZKTests") @Tag("org.apache.hadoop.hbase.testclassification.MediumTests") public class TestZooKeeperACL extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • setUpBeforeClass

      @BeforeAll public static void setUpBeforeClass() throws Exception
      Throws:
      Exception
    • tearDownAfterClass

      @AfterAll public static void tearDownAfterClass() throws Exception
      Throws:
      Exception
    • setUp

      @BeforeEach public void setUp() throws Exception
      Throws:
      Exception
    • testHBaseRootZNodeACL

      @Test public void testHBaseRootZNodeACL() throws Exception
      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

      @Test public void testHBaseRootRegionServerZNodeACL() throws Exception
      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

      @Test public void testHBaseMasterServerZNodeACL() throws Exception
      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

      @Test public void testHBaseIDZNodeACL() throws Exception
      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

      @Test public void testOutsideHBaseNodeACL() throws Exception
      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

      @Test public void testIsZooKeeperSecure() throws Exception
      Check if ZooKeeper JaasConfiguration is valid.
      Throws:
      Exception
    • testIsZooKeeperSecureWithProgrammaticConfig

      Check if Programmatic way of setting zookeeper security settings is valid.
      Throws:
      Exception
    • testAdminDrainAllowedOnSecureZK

      @Test public void testAdminDrainAllowedOnSecureZK() throws Exception
      Throws:
      Exception