googleapis/google-cloud-java

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

开放

#12,604 创建于 2022年8月11日

 (2 条评论) (0 个反应) (1 位负责人)Java (1,082 个派生)batch import
help wantedpriority: p3type: feature request

仓库指标

星标
 (1,763 个星标)
PR 合并指标
 (平均合并 5天 7小时) (30 天内合并 195 个 PR)

描述

Is your feature request related to a problem? Please describe. ImpersonatedCredentials accepts a quota project in its builder, and the quota project is properly overridden when generating an access token. However, when generating id token with the idTokenWithAudience() method, it won't perform such override. The impact is that if a service does impersonate many IdTokens on its own quota - it exceeds a default limit of 60k.

Describe the solution you'd like It seems to me that providing the quota project in the additionalFields argument when invoking the IamUtils.getIdToken() method would work

Describe alternatives you've considered There doesn't seem to be good alternatives.

贡献者指南