Reputation: 1551
Service accounts have .json key files that it is easy to point to so that google cloud applications use those credentials by setting the GOOGLE_APPLICATION_CREDENTIALS environment variable.
Is it possible to use the same environment variable but pointing it to a standard user account .json key file (like one belonging to my own gsuite account)?
Upvotes: 0
Views: 1284
Reputation: 75725
When you perform a gcloud auth application-default login
a JSON file is created
If you set your GOOGLE_APPLICATION_CREDENTIALS
to point to this user credential file, it works; the credential of the user will be used.
If the users are the only one logged on their computer, you can also unset the env var. The same file will be automatically retrieved by the library (well-known location)
Upvotes: 5