auth: Fail on invalid Google Service Account JSON #10429
Labels
status: investigating
The issue is under investigation, which is determined to be non-trivial.
triage me
I really want to be triaged.
Is your feature request related to a problem? Please describe.
In the previous oauth2 library, if the Google Service Account JSON is invalid, an error is thrown.
In the new oauth2 library, the error is silently dropped. This make troubleshooting service account JSON near impossible.
We're using external account JSON with emulated Google STS server that calls to HashiCorp Vault, so the JSON is written by hand.
Describe the solution you'd like
If GOOGLE_APPLICATION_CREDENTIALS is present and the JSON is invalid in anyway (unreadable, unparsable, invalid schema, etc.), then it should return an error message
Describe alternatives you've considered
Use a debugger to check the
err
, which is not possible in production.Other context
In our case the
audience
field is handled by Vault, so we leave it empty but the new SDK do not allow that. Perhaps that might not be all of the problems though since there's no concrete error message.The text was updated successfully, but these errors were encountered: