-
Notifications
You must be signed in to change notification settings - Fork 431
Conversation
* Now tracks Token Expire times * Adds project_id property in preparation for googleapis#471 PR * Allows usage of custom service accounts from in GCE accordance with the [beta capabilities](https://cloud.google.com/compute/docs/authentication#createcutomserviceaccount) * Now properly knows scopes of the service account
Also use v1 endpoint
# used by this class. | ||
self.scope = util.scopes_to_string(scope) | ||
|
||
self.scopes = None |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I am still in the process of adding tests for this PR. Do Not Merge. |
* consolidates requests for email field * provides a "expiresAt" field Will revert to v1 endpoint if GCE eng team says that there are plans to deprecate 0.1 Additionally made scopes an `@property` to avoid false readings of no scopes
'instance/service-accounts/default/') | ||
META = _METADATA_ROOT + 'token' | ||
_DEFAULT_EMAIL_METADATA = _METADATA_ROOT + 'email' | ||
_METADATA_ROOT = 'http://metadata.google.internal/0.1/meta-data' |
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.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* added a service_account_info property with more detailed information and to share code between service_account_email and _refresh_scopes
|
||
@property | ||
def serialization_data(self): | ||
return self.service_account_info |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
return False | ||
self.access_token, self.token_expiry = _get_access_token( | ||
http_request, | ||
self._service_account_info['email'] |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Be prepared at the end of the review to squash commits. |
https://github.com/blog/2141-squash-your-commits Is this option available to you now? Or do I still have to manually squash? |
A repository setting to require all pull requests to be one commit each probably is available to us, but I'm not sure that we'd want to enable it for all changes. Some are still appropriate to be done in multiple commits. |
@@ -16,60 +16,117 @@ | |||
|
|||
Utilities for making it easier to use OAuth 2.0 on Google Compute Engine. | |||
""" | |||
|
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
* Remove deserialization arg from constructor
@nathanielmanistaatgoogle Fixes pushed |
|
||
__author__ = '[email protected] (Joe Gregorio)' | ||
|
||
logger = logging.getLogger(__name__) | ||
|
||
# URI Template for the endpoint that returns access_tokens. | ||
_METADATA_ROOT = ('http://metadata.google.internal/computeMetadata/v1/' | ||
'instance/service-accounts/default/') | ||
META = _METADATA_ROOT + 'token' |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@nathanielmanistaatgoogle More fixes. |
After discussion with @jonparrott I'm going to break this into 3 smaller PRs:
|
This provides several much needed updates to GCE App Assertion Credentials