googleapis / sdk-platform-java

Tooling and shared libraries for Cloud SDK for Java
https://cloud.google.com/java/docs/bom
Apache License 2.0
68 stars 54 forks source link

gax: investigate GoogleCredentialsProvider JWT with scopes with service account workflows #3127

Open zhumin8 opened 3 months ago

zhumin8 commented 3 months ago

In GoogleCredentialsProvider, getCredentials() has 2 JWT with scopes with service account workflows:

These 2 workflows looks suspicious to me, is there reasons why both are needed?

Separately, our guidance is to use ServiceAccountCredentials with SSJWT whenever possible. (see related issue). Thus if both are to keep, the first one can be updated to use ServiceAccountCredentials.