-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ZOOKEEPER-2590:exists() should check read ACL permission #1298
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall okay
What about adding a configuration parameter?
The check will be enabled by default.
Maybe this additional check may break (broken) applications.
We should leave a way to let the system work in production while fixing the broken application
@eolivelli |
@maoling @eolivelli Would you mind resurrecting this patch? Patch looks good to me, but it's not enough alone to fix the original issue. Currently For instance:
In this case an unauthorized user should not be able to see anything under
I suggest the following:
cc @phunt |
That's good insight Andor. I think we should also document this, and perhaps consider changing the default behaviour of the feature flag at some point? Eg we could add as you suggest in 3.10, and change the default to "protected by default" in 3.11? That would give people sufficient warning to upgrade their client code. |
(Ported from f11f8e5 / apache#1298 to 'master' by Damien Diederen; no other changes.) Co-Authored-By: Damien Diederen <[email protected]>
Hi @maoling, @eolivelli, @anmolnar, I have forward-ported @maoling's patch here: https://github.com/ztzg/zookeeper/tree/ZOOKEEPER-2590-exists-acl-check Here is the specific commit: (I have not opened another PR; this one is perfectly fine. @maoling, don't hesitate to update it with the contents of my tree.) |
I changed my mind, implementing the parent ACL check doesn't make much sense. The same 'scan' issue can be achieved with get too:
Scanning with get:
There's no point fixing exists() recursively. ZooKeeper ACLs are not recursive means that such protection against scanning attacks cannot be provided. I tend to accept @maoling 's patch as it is, because doing anything more will increase complexity without adding value. |
Makes sense. |
Unfortunately @maoling is not active on this patch, I suggest to fork his patch and create a new PR to move forward with the fix. |
I agree. But I don't have cycles |
No worries, I'll do it. |
Closing this PR in favor of #2093 |
exist
is a kind of read operation, so it should check read ACL permission. In the original release, only two operation don't check ACL permission(exist
andgetAcl
) which is an omission. I sawgetAcl
had also amended it