Skip to content
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

Add support for authenticating with CLOUDSDK_AUTH_ACCESS_TOKEN #46

Open
sbakiu opened this issue Aug 21, 2023 · 1 comment
Open

Add support for authenticating with CLOUDSDK_AUTH_ACCESS_TOKEN #46

sbakiu opened this issue Aug 21, 2023 · 1 comment

Comments

@sbakiu
Copy link

sbakiu commented Aug 21, 2023

In my organization we are using temporary access tokens and it would be very helpful to have the authentication via CLOUDSDK_AUTH_ACCESS_TOKEN environment variable supported.

Probably related discussion on the google api auth library: googleapis/google-auth-library-python#1165

@michaelCTS
Copy link

Just ran into this issue and took a while to debug. The problem is that gauth.py first tries to use an API approach to get credentials and only falls back to gcloud (which respects CLOUDSDK_AUTH_ACCESS_TOKEN) when that fails. However, authentication succeeds when in environments where metadata.google.internal can be contacted! Credentials are automatically retrieved and CLOUDSDK_AUTH_ACCESS_TOKEN thus ignored.

Would be great if priority were given to CLOUDSDK_AUTH_ACCESS_TOKEN, then gcloud.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants