googleapis / googleapis/google-cloud-python

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

未关闭
#15,194 2 条评论 9 个 reaction 已指派 0 人 在 GitHub 查看
auth priority: p3 type: feature request
主要语言
Python
星标
5.4k
派生
1.8k
平均合并
3 天 4 小时
30 天内合并 PR
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 摘要。