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

fix(storage): fix v4 url signing for hosts that specify ports #9347

Merged
merged 4 commits into from
Feb 1, 2024

Conversation

BrennaEpp
Copy link
Contributor

Previously, attempting to sign urls with the explicit hostname storage.googleapis.com:443 would work with v2 signing but with v4 would cause signature not match errors. This change strips the port from the signing headers.

@BrennaEpp BrennaEpp requested review from a team as code owners February 1, 2024 01:04
@product-auto-label product-auto-label bot added size: s Pull request size is small. api: storage Issues related to the Cloud Storage API. labels Feb 1, 2024
Copy link
Contributor

@tritone tritone left a comment

Choose a reason for hiding this comment

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

Nice catch on this one!

{
desc: "Hostname v4",
opts: SignedURLOptions{
Hostname: "storage.googleapis.com:443",
Copy link
Contributor

Choose a reason for hiding this comment

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

I didn't realize you could include a port for the prod endpoint like this; TIL.

@BrennaEpp BrennaEpp merged commit f127b46 into googleapis:main Feb 1, 2024
9 checks passed
@BrennaEpp BrennaEpp deleted the fix-signurl branch February 1, 2024 18:45
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 Cloud Storage API. size: s Pull request size is small.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants