Way to disable _CLOUD_SDK_CREDENTIALS_WARNING
See original GitHub issueIs there a way to disable the warning _CLOUD_SDK_CREDENTIALS_WARNING, maybe by setting an environment variable? We have an application where we want users to use their gcloud user credentials since it is run on their local machine. If we ran the app as a service on a server, then a service account would make more sense.
UserWarning: Your application has authenticated using end user credentials from Google Cloud SDK. We recommend that most server applications use service accounts instead. If your application continues to use end user credentials from Cloud SDK, you might receive a “quota exceeded” or “API not enabled” error. For more information about service accounts, see https://cloud.google.com/docs/authentication/.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:17 (2 by maintainers)
Top Results From Across the Web
Disable warning when using end user credentials in GCP scripts
I did the suggested gcloud auth application-default login but the same warning message still appears repeatedly. How do I disable this warning?
Read more >gcloud auth application-default login
API -first integration to connect existing data and applications. ... Solution to bridge existing care systems and apps on Google Cloud. ... No-code...
Read more >Stop Downloading Google Cloud Service Account Keys!
Consider turning on the “Disable service account key creation” Organization policy to prevent users from downloading service account keys. Read more about Short ......
Read more >Setting up OAuth 2.0 - Google Cloud Platform Console Help
You won't be prompted to configure the consent screen after you do it the first time. Click Create client ID. To delete a...
Read more >Authentication - Carbon Black Cloud Python SDK
This method should be used with caution, taking care to not share your API credentials when managing code with source control.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Incase anyone else is looking for the warning suppression mentioned in https://github.com/GoogleCloudPlatform/google-auth-library-python/issues/271#issuecomment-395838430 this seems to do the trick:
@theacodes I think there is a scenario your not taking into account: we (and many other) provide tools that allow the user to use his own resources (gcs bucket, vm, etc) and the fact that he already has gcloud setup the authentication for hims is very convenient. The google auth lib (python in our case) goes into the application default authentication file and nothing needs to be setup for auth again. Moreover this is how the boto lib works in AWS, it will be a pain that each tool will need to be setup again and request the same permission as gcloud.