HBASE-6068 Secure HBase cluster : Client not able to call some admin APIs

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1344456 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2012-05-30 20:46:23 +00:00
parent 0586d64bd5
commit 65fc2953bd
1 changed files with 9 additions and 4 deletions

View File

@ -723,10 +723,15 @@ public class ZKUtil {
private static ArrayList<ACL> createACL(ZooKeeperWatcher zkw, String node) {
if (isSecureZooKeeper(zkw.getConfiguration())) {
// Certain znodes must be readable by non-authenticated clients
if ((node.equals(zkw.rootServerZNode) == true) ||
// Certain znodes are accessed directly by the client,
// so they must be readable by non-authenticated clients
if ((node.equals(zkw.baseZNode) == true) ||
(node.equals(zkw.rootServerZNode) == true) ||
(node.equals(zkw.getMasterAddressZNode()) == true) ||
(node.equals(zkw.clusterIdZNode) == true)) {
(node.equals(zkw.clusterIdZNode) == true) ||
(node.equals(zkw.rsZNode) == true) ||
(node.equals(zkw.backupMasterAddressesZNode) == true) ||
(node.startsWith(zkw.tableZNode) == true)) {
return ZooKeeperWatcher.CREATOR_ALL_AND_WORLD_READABLE;
}
return Ids.CREATOR_ALL_ACL;
@ -1238,4 +1243,4 @@ public class ZKUtil {
ke.initCause(e);
return ke;
}
}
}