Skip to content

fix(storage)!: require v4 signing for response and generation parameters - #19245

Open
nidhiii-27 wants to merge 2 commits into
mainfrom
fix/storage-v2-signed-url-query-params
Open

nidhiii-27 wants to merge 2 commits into
mainfrom
fix/storage-v2-signed-url-query-params

Conversation

@nidhiii-27

Copy link
Copy Markdown
Contributor

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.

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]

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@nidhiii-27

Copy link
Copy Markdown
Contributor Author

/gcbrun

@nidhiii-27
nidhiii-27 marked this pull request as ready for review November 27, 2026 11:50
@nidhiii-27
nidhiii-27 requested review from a team as code owners November 27, 2026 11:50
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

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants