-
Notifications
You must be signed in to change notification settings - Fork 309
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for CLOUDSDK_AUTH_ACCESS_TOKEN environment variable #1165
Comments
Thanks for the report @jceresini. We will discuss this as a team. |
Looks like this has been on our radar. I'll post more updates to this issue as we make progress on supporting this. Thanks! |
Thank you for all your work on this library!!! Note that For reference
|
The proposed change would make it much easier to work with containerized applications in development environments. Currently, there is no easy way to pass GCP credentials to a containerized application, without code changes. Including the |
@clundin25 any chance of getting this one on the roadmap? |
Thanks for stopping by to let us know something could be better!
PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
Is your feature request related to a problem? Please describe.
We use vault to hand out tokens for GCP access.
Newer versions of gcloud support setting the environment variable
CLOUDSDK_AUTH_ACCESS_TOKEN
to our temporary token (see https://cloud.google.com/sdk/docs/authorizing).We do something similar with terraform via the
GOOGLE_OAUTH_ACCESS_TOKEN
environment variable. (see: https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference)We'd like to be able to do something similar with our python applications without having to modify them to do anything other than call a single function to get credentials (
google.auth.default()
). That would allow us to run them locally with our own service account credentials or gcp users, within GCP services such as compute or appengine, and also in our CI jobs that use the tokens, without modification.Describe alternatives you've considered
Currently we have to build our own credentials object via
google.oauth2.credentials.Credentials
. Here's a simplified example. The issue is we have to either put this logic in many of our apps, or build our own library to include in our apps:The text was updated successfully, but these errors were encountered: