googleapis / googleapis/google-cloud-python

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

Ouverte
#15,194 2 commentaires 9 réactions 0 personnes assignées Voir sur GitHub
auth priority: p3 type: feature request
Langage dominant
Python
Étoiles
5.4k
Forks
1.8k
Merge moyen
3 j 4 h
PR mergées (30 j)
122

Description

**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.

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.