Skip to content
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

Preflight check fails with ACL wildcard in path for kv get command #6525

Closed
nathkn opened this issue Apr 3, 2019 · 2 comments · Fixed by #6532
Closed

Preflight check fails with ACL wildcard in path for kv get command #6525

nathkn opened this issue Apr 3, 2019 · 2 comments · Fixed by #6532
Milestone

Comments

@nathkn
Copy link

nathkn commented Apr 3, 2019

Describe the bug
When using the new ACL wildcard paths like secret/data/foo/+/baz, the preflight check will fail, at least in the CLI using vault kv get, even though the vault read command succeeds

To Reproduce
Steps to reproduce the behavior:

  1. Run vault dev server with the KV v2 secrets engine enabled at secret/
  2. Run vault kv put secret/foo/bar/baz value=data
  3. Run
vault policy write policy -<<EOF
path "secret/data/foo/+/baz" {
  capabilities = ["read"]
}
EOF
  1. Create a token with that policy: vault token create -orphan -policy=policy
  2. Using that token, run the following commands and receive the following results:
$ vault kv get secret/foo/bar/baz
Error making API request.

URL: GET http://localhost:8200/v1/sys/internal/ui/mounts/secret/foo/bar/baz
Code: 403. Errors:

* preflight capability check returned 403, please ensure client's policies grant access to path "secret/foo/bar/baz/"

$ vault read secret/data/foo/bar/baz
Key         Value
---         -----
data        map[value:data]
metadata    map[deletion_time: destroyed:false version:1 created_time:2019-04-03T13:59:28.5410372Z]

Expected behavior
The preflight check should succeed.

Environment:

  • Vault Server Version (retrieve with vault status): 1.1.0
  • Vault CLI Version (retrieve with vault version): 1.1.0
  • Server Operating System/Architecture: Debian Stretch
@jefferai
Copy link
Member

jefferai commented Apr 4, 2019

Edit: I'm tired, ignore my claim of non-reproduction.

@jefferai
Copy link
Member

jefferai commented Apr 4, 2019

Thanks for the complete reproduction steps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants