镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(auth): apply quota project to impersonated ID token requests - #14266

Open
afarber wants to merge 1 commit into
googleapis:mainfrom
afarber:12604-impersonated-credentials
Open

afarber wants to merge 1 commit into
googleapis:mainfrom
afarber:12604-impersonated-credentials

Conversation

@afarber

@afarber afarber commented Sep 4, 2026

Copy link
Copy Markdown

Apply the quota project configured on ImpersonatedCredentials to IAM generateIdToken requests.

The ID-token path currently uses the source credentials directly, so an impersonated credential's quota-project override is omitted. Use the existing credential metadata mechanism to send the target quota project in the x-goog-user-project header.

Adds a regression test verifying that the impersonated credential's quota project overrides the source credential's project.

Fixes #12604

@afarber
afarber requested review from a team as code owners September 4, 2026 15:29

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates ImpersonatedCredentials to ensure that if a quota project is configured, it is used for the IAM request when generating an ID token with an audience. It also adds a corresponding unit test to verify that the configured quota project ID correctly overrides the source credentials' quota project ID. I have no feedback to provide as there are no review comments.

@afarber
afarber force-pushed the 12604-impersonated-credentials branch from acda261 to d253717 Compare September 4, 2026 15:41
@afarber
afarber requested a review from a team as a code owner September 4, 2026 15:41
@afarber
afarber force-pushed the 12604-impersonated-credentials branch 5 times, most recently from 0e36fd6 to 625c583 Compare September 9, 2026 07:14
@afarber
afarber force-pushed the 12604-impersonated-credentials branch from 625c583 to 431b82d Compare September 22, 2026 12:24
@afarber
afarber force-pushed the 12604-impersonated-credentials branch from 431b82d to 2b16907 Compare October 4, 2026 16:51
@afarber

afarber commented Oct 5, 2026

Copy link
Copy Markdown
Author

Hi @mutianf why do I received 320 notification mails, even though I have unsubscribed from this PR?

image

This branch has not been deployed

No deployments
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.

[google-auth-library-java] Generating ID token with ImpersonatedCredentials does not support overriding quota project

1 participant