-
Notifications
You must be signed in to change notification settings - Fork 4.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
Capability "deny" does not take precedence over "list" #5175
Comments
Listing always operates on prefixes, so the correct path to deny listing would be |
I wanted to add a note to this regarding something I discovered this evening using KV2. Going back to the example above, which mimicked a problem I was having pretty much exactly...
That will not actually work as described in KV2, nor will it work as I'd expect with the documented KV2 changes to policies. This lead to some frustrating troubleshooting trying to figure out exactly what policy would work to achieve this behavior. Per those documented changes, we now have a /data/ prefix. As such, I would have expected to have had to do the following to make the policy above continue to work in KV2:
However, doing that actually causes a permissions error when trying to access ANYTHING under the secret path. What does work, oddly, is the following:
I certainly get why you would need the data prefix in the deny policy. I just don't really understand why it causes a permissions error when used in the list policy? It seems like it should be needed in both policies or at the least, that it would still work if it were in the list policy (vs failing with permission denied). |
It's because as noted in the ACL Rules section, listing requires permissions on |
Yes, it need that permission, but granting it, makes every path and file listed, with no regards for any 'deny' policy in subpaths. |
Describe the bug
The token is allowed to list a sub-path while at the same time a restriction is in place which does not allow it to do so.
To Reproduce
Steps to reproduce the behavior:
Add the following policy to a new token:
Expected behavior
secret
secret/notvisible
as the documentation states that the more specific path takes precedence.Environment:
vault status
): 0.10.4vault version
): 0.10.4Vault server configuration file(s):
The text was updated successfully, but these errors were encountered: