Support ADC json when impersonating service user #1382
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Is your feature request related to a problem? Please describe.
When generating an ADC json you are able to impersonate a service user which outputs a JSON file that is not currently handled.
e.g.
Which generates the following JSON format:
Currently the library throws the following error when doing this:
The incoming JSON object does not contain a client_email field
Describe the solution you'd like
I'd like the library to detect this format and handle it correctly
Describe alternatives you've considered
I can manually alter the file by putting the contents of
source_credentials
at the top level of the JSON (though unsure if this has any side-effect). I can also generate a key for the service user but since it's not recommended, impersonating the service user and using ADC would be preferred.Additional context
I'm very new to GCP and authentication in that regard and was trying to set up local development without generating keys but still using a service user. I found that you can impersonate a service user while generating the ADC JSON but it's not working with this library. I found that e.g.
google-auth-library-python
supports this format so I'm thinking the node library also should.The text was updated successfully, but these errors were encountered: