Skip to content

Support impersonated ADC credentials#311

Open
botan wants to merge 2 commits into
r-lib:mainfrom
botan:impersonated-adc
Open

Support impersonated ADC credentials#311
botan wants to merge 2 commits into
r-lib:mainfrom
botan:impersonated-adc

Conversation

@botan
Copy link
Copy Markdown

@botan botan commented Apr 20, 2026

Fixes #266. Adds support for application default credentials with type = "impersonated_service_account".

When credentials_app_default() sees this ADC format, gargle now uses the nested authorized_user credentials to obtain a source token and exchanges that token against the IAM Credentials API to mint an impersonated access token. It also stops silently falling through for unknown ADC types and emits a debug message instead.

Also updates token_tokeninfo() so this token class is treated like the existing nonstandard refreshable token types.

Tests cover the new impersonated ADC flow, default scope behavior, unsupported source credential types, and the unsupported-ADC debug path.

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.

application_default_credentials() doesn't support "impersonated_service_account" credentials (and gives confusing messages)

1 participant