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

path-help doesn't work on some paths #18566

Closed
jacob-faber opened this issue Dec 28, 2022 · 0 comments · Fixed by #18568
Closed

path-help doesn't work on some paths #18566

jacob-faber opened this issue Dec 28, 2022 · 0 comments · Fixed by #18568
Labels
bug Used to indicate a potential bug

Comments

@jacob-faber
Copy link

jacob-faber commented Dec 28, 2022

Describe the bug
path-help doesn't work on some paths, for example: vault path-help sys/auth/userpass/tune.

To Reproduce
Steps to reproduce the behavior:

  1. Create vault policy (see admin-policy) and associate it to the user
  2. Login to vault as a user (vault login -method=userpass username=user)
  3. Try vault path-help sys/auth/userpass/tune

Expected behavior
I can read sys/auth/userpass/tune, it should be also possible to see help with path-help.

Environment:

  • Vault Server Version (retrieve with vault status): 1.12.2
  • Vault CLI Version (retrieve with vault version): v1.12.2
  • Server Operating System/Architecture: External vault in docker container

Vault server configuration file(s):

admin-policy

path "*" {
	capabilities = ["create", "read", "update", "delete", "list", "patch","sudo"]
}

Login with user that has admin-policy.

➜  ~ vault login -method=userpass username=user
Password (will be hidden): 
Initiating Interactive MFA Validation...
Enter the passphrase for methodID "2d8ae368-de86-bed8-2604-9d417891b42f" of type "totp": 
Success! You are now authenticated. The token information displayed below
is already stored in the token helper. You do NOT need to run "vault login"
again. Future Vault requests will automatically use this token.

Key                    Value
---                    -----
token                  hvs.CAESIDqSgwjga3xfj_CYnRm1HfaAYNt8goZXpvDDU5vk7ET9Gh4KHGh2cy41aUVyY2hFSWtBOXXXXXXXXXXXXXXX
token_accessor         wNavuIhpO5yqVHEjOXXXXX
token_duration         72h
token_renewable        true
token_policies         ["default"]
identity_policies      ["admin-policy"]
policies               ["admin-policy" "default"]
token_meta_username    user

I can read sys/auth/userpass/tune path.

➜  ~ vault read sys/auth/userpass/tune
Key                   Value
---                   -----
default_lease_ttl     72h
description           n/a
force_no_cache        false
listing_visibility    hidden
max_lease_ttl         720h
token_type            default-service

I can't get path-help of sys/auth/userpass/tune path - it works with root login.

➜  ~ vault path-help sys/auth/userpass/tune
Error retrieving help: Error making API request.

URL: GET https://vault.example.com:8200/v1/sys/auth/userpass/tune?help=1
Code: 403. Errors:

* 1 error occurred:
	* permission denied

maxb added a commit to maxb/vault that referenced this issue Dec 28, 2022
@heatherezell heatherezell added the bug Used to indicate a potential bug label Jan 4, 2023
ltcarbonell pushed a commit that referenced this issue Jan 10, 2023
* Fix HelpOperation on sudo-protected paths

Fixes #18566

* Add changelog
AnPucel pushed a commit that referenced this issue Jan 14, 2023
* Fix HelpOperation on sudo-protected paths

Fixes #18566

* Add changelog
AnPucel pushed a commit that referenced this issue Feb 3, 2023
* Fix HelpOperation on sudo-protected paths

Fixes #18566

* Add changelog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Used to indicate a potential bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants