Repository navigation
fix(storage)!: require v4 signing for response and generation parameters - #19245
Open
nidhiii-27 wants to merge 2 commits into
Open
nidhiii-27 wants to merge 2 commits into
nidhiii-27 wants to merge 2 commits into
Conversation
generate_signed_url_v2 now raises ValueError when response_type, response_disposition, or generation is specified, requiring V4 signing for those parameters. Existing V2 signed URL generation without these parameters and all V4 signed URL behavior remain unchanged. Updated unit tests in packages/google-cloud-storage/tests/unit/test__signing.py. BREAKING CHANGE: V2 signed URL generation raises ValueError when response_type, response_disposition, or generation is specified. [Generated-by: AI]
Contributor
There was a problem hiding this comment.
Code Review
This pull request restricts the use of 'response_type', 'response_disposition', and 'generation' parameters to V4 signed URLs. In 'generate_signed_url_v2', a ValueError is now raised if any of these parameters are provided, and the corresponding logic to append them to the query parameters has been removed. Docstrings in both '_signing.py' and 'blob.py' have been updated to reflect this requirement. Additionally, unit tests have been updated to assert that these parameters raise the expected ValueError when using V2 signing. There are no review comments to address, and I have no further feedback to provide.
Contributor
Author
|
/gcbrun |
Keep both the universe domain and V4 signing parameter docstring updates in Blob.generate_signed_url. [Generated-by: AI]
This branch has not been deployed
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
generate_signed_url_v2 now raises ValueError when response_type, response_disposition, or generation is specified, requiring V4 signing for those parameters. Existing V2 signed URL generation without these parameters and all V4 signed URL behavior remain unchanged. Updated unit tests in packages/google-cloud-storage/tests/unit/test__signing.py.
BREAKING CHANGE: V2 signed URL generation raises ValueError when response_type, response_disposition, or generation is specified.