-
Notifications
You must be signed in to change notification settings - Fork 155
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
fix: allow signed url version v4 without signed credentials #356
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…e checks for efficiency in case of neither access_token nor service_account_email are provided. Fix: tests v4 with token to take into account not Signing credential class.
product-auto-label
bot
added
the
api: storage
Issues related to the googleapis/python-storage API.
label
Jan 4, 2021
google-cla
bot
added
the
cla: yes
This human has signed the Contributor License Agreement.
label
Jan 4, 2021
guillaumeblaquiere
changed the title
Fix #355: allow signed url version v4 without service account email
fix: allow signed url version v4 without service account email
Jan 4, 2021
tseaver
previously requested changes
Jan 20, 2021
tseaver
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jan 20, 2021
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Jan 20, 2021
tseaver
changed the title
fix: allow signed url version v4 without service account email
fix: allow signed url version v4 without signed credentials
Jan 20, 2021
I really want this! |
Sorry for the delay, the week was awful! |
@tseaver any review possible on this? |
frankyn
approved these changes
Feb 18, 2021
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.
Thanks @guillaumeblaquiere LGTM
frankyn
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Feb 18, 2021
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Feb 18, 2021
frankyn
added
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Feb 19, 2021
yoshi-kokoro
removed
the
kokoro:force-run
Add this label to force Kokoro to re-run the tests.
label
Feb 19, 2021
This was referenced Mar 11, 2021
Merged
Merged
cojenco
pushed a commit
to cojenco/python-storage
that referenced
this pull request
Oct 13, 2021
…is#356) * Fix: signed_url_v4 to accept credentials without private key. Preserve checks for efficiency in case of neither access_token nor service_account_email are provided. Fix: tests v4 with token to take into account not Signing credential class. * fix typo: 2 new lines before new test class * fix doc: Improve docstring to explain the use of the access_token AND the service_account_email, or the signer email. * fix: test coverage with the new IF branch * lint Co-authored-by: Tres Seaver <[email protected]> Co-authored-by: Frank Natividad <[email protected]> Co-authored-by: Frank Natividad <[email protected]>
cojenco
pushed a commit
to cojenco/python-storage
that referenced
this pull request
Oct 13, 2021
…is#356) * Fix: signed_url_v4 to accept credentials without private key. Preserve checks for efficiency in case of neither access_token nor service_account_email are provided. Fix: tests v4 with token to take into account not Signing credential class. * fix typo: 2 new lines before new test class * fix doc: Improve docstring to explain the use of the access_token AND the service_account_email, or the signer email. * fix: test coverage with the new IF branch * lint Co-authored-by: Tres Seaver <[email protected]> Co-authored-by: Frank Natividad <[email protected]> Co-authored-by: Frank Natividad <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: storage
Issues related to the googleapis/python-storage API.
cla: yes
This human has signed the Contributor License Agreement.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #355 🦕
I used the service_account_email passed in method parameter as "signer" instead of taking it in the credentials.signer_email method. That allows to not use
google.auth.credentials.Signing
type as credential parameter and to use the Service Account credential API instead.I preserved the checks in case of
access_token
orservice_account_email
set to nil, to preserve the efficiency and the existing behavior.I also updated tests. Successful with python 3.8.
Open to comment and to improve this PR if needed