[
https://issues.apache.org/jira/browse/ZOOKEEPER-2547?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15459499#comment-15459499
]
Edward Ribeiro commented on ZOOKEEPER-2547:
-------------------------------------------
Nice catch [~arshad.mohammad]! A few comments: in the snippet below you can use
the diamond operator -- {{ArrayList<>()}} -- and use
{{InetAddress.getLocalHost().getAddress().toString()}} instead of a fixed
String ({{127.0.0.1/8}}), right?
{quote}
List<ACL> acls = new ArrayList<ACL>();
acls.add(new ACL(ZooDefs.Perms.ALL, new Id("ip", "127.0.0.1/8")));
{quote}
Also, what do you think about adding a second unit test (or pair of to account
for both Netty and NIO) that fails with an invalid address, for example?
> IP ACL is not working with NettyServerCnxnFactory
> -------------------------------------------------
>
> Key: ZOOKEEPER-2547
> URL: https://issues.apache.org/jira/browse/ZOOKEEPER-2547
> Project: ZooKeeper
> Issue Type: Bug
> Affects Versions: 3.5.0
> Reporter: Arshad Mohammad
> Assignee: Arshad Mohammad
> Fix For: 3.5.3
>
> Attachments: ZOOKEEPER-2547-01.patch
>
>
> IP based ACL is not working with NettyServerCnxnFactory.
> Scenario:
> 1) Configure serverCnxnFactory=
> org.apache.zookeeper.server.NettyServerCnxnFactory and start ZooKeeper server
> 2) Create a znode "/n" with ACL(ZooDefs.Perms.ALL, new Id("ip",
> "127.0.0.1/8")
> 3) Create child node /n/n1. Child node creation fails.
> But the same above scenario works with NIOServerCnxnFactory
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)