-
Notifications
You must be signed in to change notification settings - Fork 431
Populate scopes for gce.AppAssertionCredentials #524
Conversation
We found a Contributor License Agreement for you (the sender of this pull request) and all commit authors, but as best as we can tell these commits were authored by someone else. If that's the case, please add them to this pull request and have them confirm that they're okay with these commits being contributed to Google. If we're mistaken and you did author these commits, just reply here to confirm. |
@jonparrott I seem to have fouled up the tree somehow. Not sure why this isn't based cleanly on metadata, (which should be even with master)... |
@elibixby can you give me access to your fork? I can fix the tree. |
@jonparrott you should already have it! |
CLAs look good, thanks! |
@elibixby tree fixed, please verify. You'll probably need to delete your local branch and pull the new version of it. |
raise NotImplementedError( | ||
'Cannot serialize credentials for GCE service accounts.') | ||
|
||
def _retrieve_scopes(self, http_request): |
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.
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.
return_value={'email': '[email protected]'}) | ||
def test_service_account_email(self, metadata): | ||
return_value=SERVICE_ACCOUNT_INFO) | ||
def test_retrieve_scopes(self, metadata): |
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.
@elibixby getting close. 👍 |
Metadata server is extremely picky about trailing slashes
@@ -53,10 +50,14 @@ class AppAssertionCredentials(AssertionCredentials): | |||
This credential does not require a flow to instantiate because it | |||
represents a two legged flow, and therefore has all of the required | |||
information to generate and refresh its own access tokens. | |||
|
|||
Note that credentials.service_account_email and credentials.scopes |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
I'm pretty satisfied with this. @nathanielmanistaatgoogle do you want to take a look? |
@jonparrott @nathanielmanistaatgoogle friendly ping, I know y'all are busy. |
I'll give @nathanielmanistaatgoogle until tomorrow afternoon to respond before merging, and we can always address any post-merge comments. @elibixby feel free to nag me tomorrow to merge. |
@jonparrott Ping to merge =) |
Additionally provides support for custom GCE service accounts though an
email
kwarg, and fixes #523