google-auth-library-java icon indicating copy to clipboard operation
google-auth-library-java copied to clipboard

Generating ID token with ImpersonatedCredentials does not support overriding quota project

Open lzy-2022 opened this issue 3 years ago • 2 comments

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.

lzy-2022 avatar Aug 11 '22 17:08 lzy-2022

@sai-sunder-s what do you think?

TimurSadykov avatar Aug 30 '23 09:08 TimurSadykov