Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to suppress warning about Google Cloud SDK credentials? #193

Closed
lbergelson opened this issue Sep 11, 2018 · 2 comments
Closed

How to suppress warning about Google Cloud SDK credentials? #193

lbergelson opened this issue Sep 11, 2018 · 2 comments
Assignees
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@lbergelson
Copy link
Contributor

I'm wondering how to suppress the warning:

WARNING: 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/.

Our application is a desktop application that uses the users default credentials to access files on the cloud and this warning is confusing to users. Is there a way to suppress it? I thought I'd found one but I accidentally asked in the php version of the auth library and not the java one.

Would it be possible to port the patch that they implemented to suppress the warning when the environment variable SUPPRESS_GCLOUD_CREDS_WARNING is set to true?

googleapis/google-auth-library-php#199 (comment)

@JustinBeckwith JustinBeckwith added the triage me I really want to be triaged. label Sep 12, 2018
@chingor13 chingor13 added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Sep 12, 2018
@JustinBeckwith JustinBeckwith removed the triage me I really want to be triaged. label Sep 12, 2018
@chingor13 chingor13 changed the title How to suppress user How to suppress warning about Google Cloud SDK credentials? Sep 13, 2018
@chingor13
Copy link
Contributor

There is currently not a way to suppress the warning. PHP has a unique situation where triggered warnings can make tests fail so we provided a mechanism to suppress the warning. We really advise using service accounts if it's a production application.

That said, we can take a look.

@lbergelson
Copy link
Contributor Author

It's an application that users tend to run on their own laptops on their own files. Getting them to set up a service account is a difficult undertaking. We use service accounts in our large scale production setting with the same tools, but the personal account use is an important one.

lbergelson added a commit to lbergelson/google-auth-library-java that referenced this issue Nov 9, 2018
Defining a new environment variable SUPPRESS_GCLOUD_CREDS_WARNING.
Setting this to true suppresses the end user credentials warning.
Fixes googleapis#193
chingor13 pushed a commit that referenced this issue Nov 13, 2018
* Option to suppress end user credentials warning.

Defining a new environment variable SUPPRESS_GCLOUD_CREDS_WARNING.
Setting this to true suppresses the end user credentials warning.
Fixes #193

* reordering checks to respond to comment
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

3 participants