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

Stop reading Cloud SDK's configuration to obtain the project ID #146

Closed
theacodes opened this issue Mar 23, 2017 · 1 comment
Closed

Stop reading Cloud SDK's configuration to obtain the project ID #146

theacodes opened this issue Mar 23, 2017 · 1 comment
Assignees
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Milestone

Comments

@theacodes
Copy link
Contributor

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"
  }
}

Note: we should not use the auth token provided here at all. We should keep our existing logic of reading ~/.config/gcloud/application_default_credentials.json because those credentials are populated exclusively by gcloud auth application-default login and intended for Application Default Credentials.

@theacodes theacodes added the bug label Mar 23, 2017
@theacodes theacodes added this to the 1.0.0 milestone Mar 23, 2017
@theacodes theacodes self-assigned this Mar 23, 2017
@theacodes
Copy link
Contributor Author

/cc @markpell @bshaffer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🚨 This issue needs some love. triage me I really want to be triaged.
Projects
None yet
Development

No branches or pull requests

2 participants