-
Notifications
You must be signed in to change notification settings - Fork 310
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signer and IDTokenCredentials implementation using default service account on GCE #236
Conversation
2101e9f
to
21a9f5b
Compare
- Add Signer and IDTokenCredentials implementation Signed-off-by: Christophe Taton <[email protected]>
@theacodes Could you take a look at this? I haven't added any test yet, but I'd like some feedback before spending more time on this. |
Hi @kryzthov - just a heads up that I'm currently OOO until next week but I'll take a quick lookl |
All good! No rush, it's been there for a while, and it's not blocking! Enjoy your time off! |
@@ -108,3 +117,163 @@ def service_account_email(self): | |||
def requires_scopes(self): | |||
"""False: Compute Engine credentials can not be scoped.""" | |||
return False | |||
|
|||
|
|||
class Signer(crypt.Signer): |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
class IDTokenCredentials(credentials.Credentials, credentials.Signing): | ||
"""Open ID Connect ID Token-based service account credentials. | ||
|
||
These credentials relies on the default service account of a GCE instance. |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
- Reuse google.auth.iam.Signer - Expose `request` and `service_account_email`.
Anymore feedback on this? |
|
||
self._signer = iam.Signer( | ||
request=request, | ||
credentials=Credentials(), |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good, but needs tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added some unit-tests
91da8fe
to
cb74258
Compare
Signed-off-by: Christophe Taton <[email protected]>
This branch includes: