-
Notifications
You must be signed in to change notification settings - Fork 511
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
documentation misleading for Application Default Credentials #685
Comments
Hi @eeaton - this isn't entirely correct.
|
Sorry if my initial phrasing was unclear. re #1, I understand that the The text that is likely to be misinterpreted is:
A reader who needs to run code on a client library, which will pick up the credentials provided by ADC, is likely to misinterpret this to mean the client library can only be authenticated if they setup self-hosted runners on GCP. I understand the intent here was to say "When you're using a self-hosted runner, both gcloud and ADC automatically get their credentials from the GCE metadata server based on the attached service account", but as written it's ambiguous. The actual behavior is that they could authenticate the code on client library (ADC) using any of the listed options for the |
Ya, correct 😄 |
<!-- Thank you for proposing a pull request! Please note that SOME TESTS WILL LIKELY FAIL due to how GitHub exposes secrets in Pull Requests from forks. Someone from the team will review your Pull Request and respond. Please describe your change and any implementation details below. --> Fixes to readme for inaccurate guidance on setting Application Default Credentials. #685 --------- Signed-off-by: eeaton <ellioteaton@gmail.com>
TL;DR
Documentation is confusing about Application Default Credentials, implying they can only be used with self-hosted runners in a GCP environment. This is inaccurate because the other methods, including WIF and service account, also set ADC.
setup-gcloud/README.md
Line 168 in 87fba63
Expected behavior
This statement is misleading because Application Default Credentials are set by 'google-github-actions/auth@v2' with the provided credentials, and the statement implies that the only way to use ADC is with a self-hosted runner.
Observed behavior
My tests demonstrate that ADC is already set using Workload Identity Federation after 'google-github-actions/auth@v2'.
I can run a python script using Python Cloud Client Libraries that correctly authenticates as the service account configured by WIF, and the client Libraries rely on ADC for authentication.
Suggested fix:
Authorization
header like: "The google-github-actions/auth action configures both gcloud credentials and Application Default Credentials"Action YAML
Log output
No response
Additional information
No response
The text was updated successfully, but these errors were encountered: