Skip to content
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

feat(storage): add support for signing URLs using token #9889

Conversation

HemangChothani
Copy link
Contributor

Fixes #7627

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 25, 2019
@HemangChothani HemangChothani changed the title Storage add support signing ur ls using iam tokens feat(storage): add support for signing URLs using token Nov 25, 2019
@HemangChothani
Copy link
Contributor Author

HemangChothani commented Nov 26, 2019

@crwilcox system test failed due to Permission denied for the IAM Service Account Cred. Could you add the permission for this project?

@HemangChothani
Copy link
Contributor Author

@crwilcox PTAL

@HemangChothani HemangChothani added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 24, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 24, 2020
@crwilcox crwilcox added kokoro:run Add this label to force Kokoro to re-run the tests. kokoro:force-run Add this label to force Kokoro to re-run the tests. and removed kokoro:run Add this label to force Kokoro to re-run the tests. labels Jan 28, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 30, 2020
@crwilcox crwilcox added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 30, 2020
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 30, 2020
@crwilcox crwilcox merged commit e710547 into googleapis:master Jan 30, 2020
@HemangChothani HemangChothani deleted the Storage_add_support_signing_URLs_using_IAM_tokens branch January 31, 2020 12:15
This was referenced Feb 4, 2020
@javiercornejo
Copy link

Hi guys Im pretty ignorant how to solve / report bugs. I found one with this added feature. I gonna try to solve next days (i hope). In this line https://github.com/q-logic/google-cloud-python/blob/f1f9e9ae6d0680d7864d3c771d82f7c9c795c246/storage/google/cloud/storage/_signing.py#L389 you are passing expiration as is sent but you have to use the convert function to put the value in a proper format otherwise the url is bad.

@javiercornejo
Copy link

SO far Im using it like this
signed_url = blob.generate_signed_url( expiration=get_expiration_seconds_v2(expiration), service_account_email=service_account_email, access_token=response.access_token, version="v2")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage: add support for signing URLs using IAM / tokens.
5 participants