googleapis / googleapis/google-cloud-python

Fetch ID Token for an External Account Credential (w/Impersonation)

オープン
#15,194 コメント 2 件 リアクション 9 件 担当者 0 名 GitHub で見る
auth priority: p3 type: feature request
主要言語
Python
スター
5.4k
フォーク
1.8k
平均マージ
3日 4時間
マージ済み PR(30日)
122

説明

**Problem**

I want to retrieve an ID token for a Credential returned from google.auth.default(), specifically an aws.Credentials that is impersonating a Google Service Account.

Unfortunately, the most straightforward approach seems to be passing the private _impersonated_credentials of the underlying external_account.Credentials to google.auth.impersonated_credentials.IDTokenCredentials().

**Potential Solutions**

* Make the private _impersonated_credentials of the underlying external_account.Credentials a public property
* Add an id_token() method that makes the google.auth.impersonated_credentials.IDTokenCredentials() call with the private _impersonated_credentials.
* Add an external_account.IDTokenCredentials that takes an external_account.Credentials and does the necessary work to fetch an ID token it whatever way is most consistent with the rest of the google auth library.

Please let me know if I'm missing an existing simpler solution.

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

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

評価

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

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

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