GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: allow signed url version v4 without signed credentials by guillaumeblaquiere · Pull Request #356 · googleapis/python-storage

This repository was archived by the owner on Mar 31, 2026. It is now read-only.

Conversation

@guillaumeblaquiere

@guillaumeblaquiere guillaumeblaquiere commented Jan 4, 2021

Copy link
Copy Markdown
Contributor

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 or service_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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
guillaumeblaquiere added 2 commits January 4, 2021 22:56
@guillaumeblaquiere
Fix: signed_url_v4 to accept credentials without private key. Preserv…
f698394
…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.
@guillaumeblaquiere
fix typo: 2 new lines before new test class
a3a3b54
@guillaumeblaquiere
guillaumeblaquiere requested a review from a team January 4, 2021 22:03
@product-auto-label product-auto-label Bot added the api: storage Issues related to the googleapis/python-storage API. label Jan 4, 2021
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Jan 4, 2021
@guillaumeblaquiere 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
tseaver previously requested changes Jan 20, 2021
View reviewed changes
Comment thread google/cloud/storage/_signing.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread tests/unit/test__signing.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@tseaver
Merge branch 'master' into fix/355
26cc31b
@tseaver tseaver added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 20, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Jan 20, 2021
@tseaver 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
@cajoek

cajoek commented Jan 21, 2021

Copy link
Copy Markdown

I really want this!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

guillaumeblaquiere added 4 commits January 28, 2021 23:27
@guillaumeblaquiere
Merge branch 'master' into fix/355
55d19a8
@guillaumeblaquiere
fix doc: Improve docstring to explain the use of the access_token AND…
127787d
… the service_account_email, or the signer email.
@guillaumeblaquiere
fix: test coverage with the new IF branch
53aa9af
@guillaumeblaquiere
Merge remote-tracking branch 'origin/fix/355' into fix/355
1ed32a8
@guillaumeblaquiere

guillaumeblaquiere commented Jan 28, 2021

Copy link
Copy Markdown
Contributor Author

Sorry for the delay, the week was awful!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@guillaumeblaquiere

guillaumeblaquiere commented Feb 9, 2021

Copy link
Copy Markdown
Contributor Author

@tseaver any review possible on this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@frankyn
Merge branch 'master' into fix/355
abdb9cc
@frankyn
frankyn requested a review from a team February 18, 2021 18:24
frankyn
frankyn approved these changes Feb 18, 2021
View reviewed changes

@frankyn frankyn left a comment

Copy link
Copy Markdown
Contributor

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@frankyn frankyn added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 18, 2021
@frankyn
frankyn requested a review from tseaver February 18, 2021 18:28
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 18, 2021
Frank Natividad
lint
28f2b10
@frankyn frankyn added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 19, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Feb 19, 2021
@frankyn
frankyn dismissed tseaver’s stale review February 19, 2021 21:58

Feedback has been addressed

@frankyn
frankyn merged commit 3e69bf9 into googleapis:master Feb 19, 2021
@dependabot dependabot Bot mentioned this pull request Mar 11, 2021
build(deps): bump google-cloud-storage from 1.35.0 to 1.36.2 exesse/mongodump-s3#58
Closed
This was referenced Mar 11, 2021
Bump google-cloud-storage from 1.35.0 to 1.36.2 in /requirements allan-silva/balrog#58
Closed
Bump google-cloud-storage from 1.36.0 to 1.36.2 RasaHQ/rasa#8171
Closed
build(deps): bump google-cloud-storage from 1.35.0 to 1.36.2 in /bot mozilla/code-coverage#829
Merged
build(deps): bump google-cloud-storage from 1.35.0 to 1.36.2 in /backend mozilla/code-coverage#830
Merged
Bump google-cloud-storage from 1.36.0 to 1.36.2 CC-Wolke7/app-microservice#41
Closed
cojenco pushed a commit to cojenco/python-storage that referenced this pull request Oct 13, 2021
@guillaumeblaquiere @tseaver
@frankyn Frank Natividad @cojenco
fix: allow signed url version v4 without signed credentials (googleap…
0aa944c
…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
@guillaumeblaquiere @tseaver
@frankyn Frank Natividad @cojenco
fix: allow signed url version v4 without signed credentials (googleap…
b68425b
…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]>
@release-please release-please Bot mentioned this pull request Jan 12, 2022
chore(main): release 3.0.0 #688
Closed
@yohannes15 yohannes15 mentioned this pull request Jul 6, 2024
fix(cred): Use in built library instead of forced cred jschneier/django-storages#1340
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@tseaver tseaver Awaiting requested review from tseaver
1 more reviewer
@frankyn frankyn frankyn approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: storage Issues related to the googleapis/python-storage API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Impossible to use signed url v4 and the Service Account Credential APIs

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@guillaumeblaquiere @cajoek @tseaver @frankyn @yoshi-kokoro
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.