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

feat: support google service account for gke usage #63

Merged
merged 2 commits into from
Sep 4, 2023

Conversation

mabdh
Copy link
Member

@mabdh mabdh commented Aug 30, 2023

  • Support GKE-specific auth
  • Add 1 k8s config called provider_type
  • If provider_type does exist
    • The other auth flows like Token and Client Cert would be ignored
    • Only support gke type at the moment
    • Entropy will try to do auth with FindDefaultCredentials

FindDefaultCredentialsWithParams searches for "Application Default Credentials".
It looks for credentials in the following places, preferring the first location found:

  • A JSON file whose path is specified by the GOOGLE_APPLICATION_CREDENTIALS environment variable. For workload identity federation, refer to https://cloud.google.com/iam/docs/how-to#using-workload-identity-federation on how to generate the JSON configuration file for on-prem/non-Google cloud platforms.
  • A JSON file in a location known to the gcloud command-line tool. On Windows, this is %APPDATA%/gcloud/application_default_credentials.json. On other systems, $HOME/.config/gcloud/application_default_credentials.json.
  • On Google App Engine standard first generation runtimes (<= Go 1.9) it uses the appengine.AccessToken function.
  • On Google Compute Engine, Google App Engine standard second generation runtimes (>= Go 1.11), and Google App Engine flexible environment, it fetches credentials from the metadata server.

@mabdh mabdh force-pushed the gke-service-account branch 3 times, most recently from 8d47ac8 to cf5b3b7 Compare August 31, 2023 09:51
@mabdh mabdh marked this pull request as ready for review August 31, 2023 09:57
@mabdh mabdh merged commit 32547ef into main Sep 4, 2023
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants