Skip to content

Auth: stop reading gcloud's configuration directly #2272

@theacodes

Description

@theacodes

Instead, use gcloud config config-helper:

Instead, we should subprocess out to gcloud config config-helper --format json

Example output:

{
  "configuration": {
    "active_configuration": "default",
    "properties": {
      "core": {
        "account": "[ELIDED]",
        "disable_usage_reporting": "False",
        "project": "[ELIDED]"
      }
    }
  },
  "credential": {
    "access_token": "[ELIDED]",
    "token_expiry": "2017-03-23T23:09:49Z"
  },
  "sentinels": {
    "config_sentinel": "/Users/jonwayne/.config/gcloud/config_sentinel"
  }
}

Context: googleapis/google-auth-library-python#146

Metadata

Metadata

Assignees

Labels

authpriority: p2Moderately-important priority. Fix may not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions