-
Notifications
You must be signed in to change notification settings - Fork 139
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
make "role" input optional #291
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.
Seems reasonable to me. It would be great to get a test case added to the JWT integration tests to exercise this: https://github.com/hashicorp/vault-action/blob/master/integrationTests/basic/jwt_auth.test.js
Per Vault documentation it doesn't have to be provided, and the auth provider's "default_role" parameter is required precisely for this case. https://www.vaultproject.io/api/auth/jwt
c2d70ba
to
4bd5334
Compare
I've amended the commit with an extra testcase. |
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.
The test didn't look quite right to me - it needed the default_role
to be set on the mount config, but was passing. I took a look and realised the mocks were interfering across tests (the new test was actually sending "role": "default"
instead of null/empty). As it was only test code and I was in there anyway, I just pushed the fix, hope you don't mind.
Thanks for the contribution!
Thanks a lot for sorting out the tests. Pleasure to work with you. |
@tvoran How about releasing v2.5.0 now? |
Per Vault documentation it doesn't have to be provided,
and the auth provider's "default_role" parameter is required
precisely for this case.
https://www.vaultproject.io/api/auth/jwt