This addresses issue #441 where users encounter an error when trying to refresh credentials to retrieve an ID token in Python code. The error occurs because the Google Auth library requires scopes to be set when refreshing credentials for impersonation.
Changes:
- Added new troubleshooting section explaining the ID token refresh error
- Provided solution with code example showing how to add scopes before refreshing
- Added Python usage note in README.md with quick reference
- Enhanced examples with Python code demonstrating proper credential usage
Fixes#441
Fix doc regarding using assertion on IDs rather than names. They refer
to IDs as integers, where those are actually strings, so we need to
quote them.
I lost too many hours on this to let anyone else experience the same
issue :D
Signed-off-by: Joachim Jablon <ewjoachim@gmail.com>
This adds a new authentication mode, Direct Workload Identity
Federation. This new mode permits authenticating to Google Cloud
directly using the GitHub Actions OIDC token instead of proxying through
a Google Cloud Service Account.
<!--
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.
-->
Added another case that can cause `auth` to fail, helpful to users on
day one of using the tool and trying to understand what's happening.
Fixes
https://github.com/google-github-actions/auth/issues/260#issuecomment-1419662751
There's a chicken-and-egg problem here where we want to have the docs
reflect v1 (so the github marketplace shows the right thing), but we
can't cut v1 until the docs are updated.