[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-2014?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15641216#comment-15641216
 ] 

ASF GitHub Bot commented on ZOOKEEPER-2014:
-------------------------------------------

Github user breed commented on a diff in the pull request:

    https://github.com/apache/zookeeper/pull/96#discussion_r86679034
  
    --- Diff: src/java/main/org/apache/zookeeper/server/DataTree.java ---
    @@ -245,15 +245,25 @@ public DataTree() {
             addConfigNode();
         }
     
    -     public void addConfigNode() {
    -            DataNode zookeeperZnode = nodes.get(procZookeeper);
    -         if (zookeeperZnode!=null) { // should always be the case
    -            zookeeperZnode.addChild(configChildZookeeper);
    -         } else {
    -            LOG.error("There's no /zookeeper znode - this should never 
happen");
    -         }
    -         nodes.put(configZookeeper, configDataNode);   
    -     }
    +    public void addConfigNode() {
    +        DataNode zookeeperZnode = nodes.get(procZookeeper);
    +        if (zookeeperZnode!=null) { // should always be the case
    +            zookeeperZnode.addChild(configChildZookeeper);
    +        } else {
    +            LOG.error("There's no /zookeeper znode - this should never 
happen.");
    +        }
    +
    +        nodes.put(configZookeeper, configDataNode);
    +        try {
    +            // Reconfig node is access controlled by default 
(ZOOKEEPER-2014).
    +            setACL(configZookeeper, ZooDefs.Ids.READ_ACL_UNSAFE, -1);
    +        } catch (KeeperException.NoNodeException e) {
    +            LOG.error("Fail to set ACL on {} - this should never happen: 
{}", configZookeeper, e);
    --- End diff --
    
    actually if we are asserting above, perhaps we should also assert here.


> Only admin should be allowed to reconfig a cluster
> --------------------------------------------------
>
>                 Key: ZOOKEEPER-2014
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2014
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 3.5.0
>            Reporter: Raul Gutierrez Segales
>            Assignee: Michael Han
>            Priority: Blocker
>             Fix For: 3.5.3
>
>         Attachments: ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, 
> ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, 
> ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, 
> ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, 
> ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch, ZOOKEEPER-2014.patch
>
>
> ZOOKEEPER-107 introduces reconfiguration support via the reconfig() call. We 
> should, at the very least, ensure that only the Admin can reconfigure a 
> cluster. Perhaps restricting access to /zookeeper/config as well, though this 
> is debatable. Surely one could ensure Admin only access via an ACL, but that 
> would leave everyone who doesn't use ACLs unprotected. We could also force a 
> default ACL to make it a bit more consistent (maybe).
> Finally, making reconfig() only available to Admins means they have to run 
> with zookeeper.DigestAuthenticationProvider.superDigest (which I am not sure 
> if everyone does, or how would it work with other authentication providers). 
> Review board https://reviews.apache.org/r/51546/



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to