googleapis / googleapis/google-cloud-java

[sdk-platform-java] gax: investigate GoogleCredentialsProvider JWT with scopes with service account workflows

オープン
#12,424 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
priority: p3 type: cleanup
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

In `GoogleCredentialsProvider`, getCredentials() has 2 JWT with scopes with service account workflows:
- One with [ServiceAccountJwtAccessCredentials](https://github.com/googleapis/sdk-platform-java/blob/eb7475c8fe16661a824d40c99c9bffec47060f24/gax-java/gax/src/main/java/com/google/api/gax/core/GoogleCredentialsProvider.java#L82-L92), which is added at https://github.com/googleapis/gax-java/pull/504. This one predates when ServiceAccountCredentials in auth supports JWT ([part 1](https://github.com/googleapis/google-auth-library-java/pull/572) and [part 2](https://github.com/googleapis/google-auth-library-java/pull/689))
- Another one with service account [here](https://github.com/googleapis/sdk-platform-java/blob/eb7475c8fe16661a824d40c99c9bffec47060f24/gax-java/gax/src/main/java/com/google/api/gax/core/GoogleCredentialsProvider.java#L98-L102) added in https://github.com/googleapis/gax-java/pull/1420, adopting https://google.aip.dev/auth/4111.

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](https://github.com/googleapis/google-cloud-java/issues/12593)). Thus if both are to keep, the first one can be updated to use ServiceAccountCredentials.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。