Skip to content

feat: add -impersonate-service-account flag#53

Open
pokutuna wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
pokutuna:impersonate-service-account
Open

feat: add -impersonate-service-account flag#53
pokutuna wants to merge 2 commits intoGoogleCloudPlatform:mainfrom
pokutuna:impersonate-service-account

Conversation

@pokutuna
Copy link

Resolves #52

This builds on #51.

The error message from idtoken.NewTokenSource() changed in
google.golang.org/api v0.106.0 from "credential must be service_account"
to "unsupported credentials type". This broke ADC fallback when using
gcloud auth application-default login.

Update the error message check in findTokenSource() to match the new
error format.
Add -impersonate-service-account flag to enable obtaining ID tokens as a specific service account using google.golang.org/api/impersonate package. This allows users to authenticate as a service account rather than using their own credentials.
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.

Proposal: Add -impersonate-service-account flag

1 participant