Skip to content

fix(models): support impersonated ADC credentials in claude_code and codex_cli - #706

Open
ikenwan-dev wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
ikenwan-dev:fix-impersonated-adc-auth
Open

ikenwan-dev wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
ikenwan-dev:fix-impersonated-adc-auth

Conversation

@ikenwan-dev

Copy link
Copy Markdown
Contributor

Fixes MCP google_credentials authentication and Vertex AI ADC resolution when running with service account impersonation (/tmp_sessions/impersonated_adc.json + CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT) on GKE:

  • claude_code: Preserve explicit GOOGLE_APPLICATION_CREDENTIALS by copying it to the sandboxed ADC path before falling back to /etc/evalbench-sa-key/key.json.
  • claude_code & codex_cli: Propagate CLOUDSDK_AUTH_IMPERSONATE_SERVICE_ACCOUNT and point GOOGLE_APPLICATION_CREDENTIALS at the source key (/etc/evalbench-sa-key/key.json) when invoking gcloud auth application-default print-access-token in _fetch_gcloud_access_token() and Claude Code's headersHelper.

@ikenwan-dev
ikenwan-dev force-pushed the fix-impersonated-adc-auth branch from 74eb149 to b455cdd Compare November 6, 2026 20:00
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.

1 participant