-
Notifications
You must be signed in to change notification settings - Fork 156
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
Custom URL Path Support? #415
Comments
This sounds like a vault api problem. What version of Vault are you running and what version of hvac is installed?
|
Version 0.11.2 for HVAC. |
Forgot to mention, I can do a rest call to the expected path in a external REST client and that works just fine. Are we running an older version of vault I'm guessing? So I might have to get older versions of your release? |
on /v1/auth/token/lookup on /v1/auth/token/lookup-self What is the difference in permissions/this endpoint? |
I don't see any details on lookup vs lookup-self, but probably permissions mostly https://www.vaultproject.io/api-docs/auth/token I would have thought if you provided the same token as you used, it should work just like -self |
First step is don't pass If that doesn't help, can you comment out these two lines in your module https://github.com/TerryHowe/ansible-modules-hashivault/blob/main/ansible/modules/hashivault/hashivault_token_lookup.py#L58:L59 because according to the hvac source https://github.com/hvac/hvac/blob/develop/hvac/v1/__init__.py#L445 if there is no token passed, it will use the self path |
If that works, maybe open a PR with those two lines removed or at least verify, thanks |
I need to authenticate somehow so not passing a token or lookup token didn't work for me. I did see in the logs when I didn't pass a token that it tried using that lookup-self path for starters. I tried commenting out those two lines and it worked for me by doing the original: I can open a PR if you want. I'll do more testing with this. |
For reasons unknown my organization uses semi different paths than what's expected/normal.
For example:
hashivault_token_lookup:
authtype: token
url: "https://vault.com"
token: "abcd"
This defaults to: https://vault.com/v1/auth/token/lookup
My organization uses: /v1/auth/token/lookup-self instead.
Is there anyway to add a custom path for these situations like the official community.hashi_vault modules do?
The text was updated successfully, but these errors were encountered: