Log error messages on authentication errors
Since the got node-module throws an error on HTTP 400 we need to catch that to show the original error message from vault.
This should at least partly fix #273
Using this version of the action instead of the latest official one made me fix the error I've been struggling with for hours in 10 seconds. Thanks a lot! Better error messages are badly needed when debugging roles :)
I had a partly wrong repository name in bound_claims...
Using this version of the action instead of the latest official one made me fix the error I've been struggling with for hours in 10 seconds. Thanks a lot! Better error messages are badly needed when debugging roles :)
I had a partly wrong repository name in bound_claims...
@gazab So you were able to track the error down and get it working? I've tried using this branch and I do see it reporting Error: Unable to retrieve token from jwt's login endpoint. rather than the generic HTTP 400 error but I'm not certain if the issue I'm dealing with is in the action config or the JWT config on Vault itself.
Hi, @Centzilius. Thanks for this contribution! We're planning to take #409 at this point. Let me know your thoughts on this.
As long as we get a solution merged for the problem its fine with me. It would've been great to have some feedback on why this PR was not taken into account in 2021 for the future.
@Centzilius - Unfortunately, I'm looking at this repository with fresh eyes and don't have context as to why this wasn't taken in the past. I decided the other PR was favorable by looking at each side-by-side. The other PR avoids the need to enable debug logging and includes a more detailed error message. I'm happy to consider this PR in favor of the other if given reasons that this is better for users 🙂
I'm going to close this since https://github.com/hashicorp/vault-action/pull/409 has been merged. Thanks again!