Is your feature request related to a problem? Please describe.
Ideally, on error, return more information as the Vault CLI does.
I failed to give a valid role (role didn't exist) during a JWT authentication, but the error message from the Action wasn't clear enough to help me realise my mistake.
e.g. The action returns:
Error: Response code 400 (Bad Request)
To troubleshoot, I had to hack upload the JWT to GitHub Actions artifacts, download to my computer, and use the JWT with the Vault CLI to realise my mistake.
Describe the solution you'd like
On error return more information as the Vault CLI does.
e.g. on 400, the Vault CLI returns:
Code: 400. Errors:
* role "doesnotexist" could not be found
Describe alternatives you've considered
N/A
Additional context
Upon giving the Action an non-existent role for a JWT authentication, the action simply returns:
Error: Response code 400 (Bad Request)
When attempting the same action via the Vault CLI, the CLI lets me know like this:
Error writing data to auth/github/login: Error making API request.
URL: PUT https://vault-dev.example.org/v1/auth/github/login
Code: 400. Errors:
* role "doesnotexist" could not be found
The configuration of the action was like so (except I've replaced the real values of url and role):
- name: Retrieve secret from Vault (dev)
uses: hashicorp/vault-action@v2.4.0
with:
url: https://vault-dev.example.org/
role: doesnotexist
method: jwt
path: github
secrets: |
/auth/token/lookup-self display_name | NAME
Is your feature request related to a problem? Please describe.
Ideally, on error, return more information as the Vault CLI does.
I failed to give a valid role (role didn't exist) during a JWT authentication, but the error message from the Action wasn't clear enough to help me realise my mistake.
e.g. The action returns:
To troubleshoot, I had to
hackupload the JWT to GitHub Actions artifacts, download to my computer, and use the JWT with the Vault CLI to realise my mistake.Describe the solution you'd like
On error return more information as the Vault CLI does.
e.g. on 400, the Vault CLI returns:
Describe alternatives you've considered
N/A
Additional context
Upon giving the Action an non-existent role for a JWT authentication, the action simply returns:
When attempting the same action via the Vault CLI, the CLI lets me know like this:
The configuration of the action was like so (except I've replaced the real values of
urlandrole):