Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Auth issue when using revoked Cloud SDK creds with local test helpers. #710

@ajkannan

Description

@ajkannan

When running code that uses local service emulators, users that have Google Cloud SDK installed but have out-of-date or revoked credentials (and don't specify other credentials in any other way) will see error messages when making API calls that send requests to the local emulator. This is because we detect the Google Cloud SDK json credentials file exists, and use those to set credentials in ServiceOptions. As a result, requests attempt to use these credentials (even though they aren't necessary) and fail.

Should we:

  1. Document that you should use gcloud auth login when using local test helpers?
    or
  2. Figure out how to parse the credentials to figure out that they're valid or revoked?
    I notice that under ".config/gcloud/legacy_credentials", the folder corresponding to my gcloud email account is removed when I revoke credentials. However, I'm unsure that that's a valid way to check for revoked credentials. The other files related to credentials in that directory don't seem to indicate whether they are valid or revoked.

Metadata

Metadata

Assignees

Labels

authtype: questionRequest for information or clarification. Not an issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions