make "role" input optional#291
Conversation
tomhjp
left a comment
There was a problem hiding this comment.
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. |
tomhjp
left a comment
There was a problem hiding this comment.
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