Skip to content

feat: support v4 signed url endpoint#10490

Open
7hokerz wants to merge 4 commits into
firebase:mainfrom
7hokerz:7hokerz/emulator-support-v4-endpoint
Open

feat: support v4 signed url endpoint#10490
7hokerz wants to merge 4 commits into
firebase:mainfrom
7hokerz:7hokerz/emulator-support-v4-endpoint

Conversation

@7hokerz

@7hokerz 7hokerz commented May 12, 2026

Copy link
Copy Markdown

Description

I added the endpoint and also added test code for the endpoint.

Additional Context

Actually, the latest version of the package has been released, but the existing method,
npm i @google-cloud/storage@latest, failed to download the package.
@google-cloud/storage v7.20.0 release

@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 implements support for signed post policy uploads in the GCS emulator by adding a new POST endpoint and a custom multipart/form-data parser. The feedback identifies a bug where the parser could truncate data if a trailing line separator is missing and suggests adding a verification check. Additionally, the reviewer recommends against trimming custom metadata values to maintain parity with GCS behavior and suggests making the boundary extraction logic more robust to handle extra Content-Type parameters.

Comment thread src/emulator/storage/multipart.ts
Comment thread src/emulator/storage/apis/gcloud.ts Outdated
Comment thread src/emulator/storage/multipart.ts Outdated
@7hokerz

7hokerz commented May 13, 2026

Copy link
Copy Markdown
Author

@aalej @cabljac , Could you please take a look at this when you have a moment?

@aalej

aalej commented May 14, 2026

Copy link
Copy Markdown
Contributor

Thanks for submitting this PR @7hokerz! I don't have a good understanding of the Storage emulator, but let me try checking with our engineering team to see if anyone more familiar with the Storage emulator would be able to take a look.

Just to set expectations, we're going on a code freeze, so it might take some time for this PR to get merged.

@7hokerz

7hokerz commented May 14, 2026

Copy link
Copy Markdown
Author

Thanks for submitting this PR @7hokerz! I don't have a good understanding of the Storage emulator, but let me try checking with our engineering team to see if anyone more familiar with the Storage emulator would be able to take a look.

Just to set expectations, we're going on a code freeze, so it might take some time for this PR to get merged.

@aalej , Thank you for your response. I will gladly wait until a storage emulator expert is available. I appreciate your assistance!

@annajowang annajowang 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.

(i am also not a "storage emulator expert". I don't think there currently is one. but if bugs come up after this is merged they can always be fixed)

Left some comments, please address them and the gemini ones as well.
Thanks for your contribution!

Comment thread src/emulator/storage/multipart.ts Outdated
Comment thread src/emulator/storage/apis/gcloud.ts
Comment thread src/emulator/storage/multipart.ts Outdated
@7hokerz

7hokerz commented May 14, 2026

Copy link
Copy Markdown
Author

(i am also not a "storage emulator expert". I don't think there currently is one. but if bugs come up after this is merged they can always be fixed)

Left some comments, please address them and the gemini ones as well. Thanks for your contribution!

@annajowang , Thank you for your feedback! I will take the time to review it and make improvements soon.

@7hokerz 7hokerz requested a review from annajowang June 9, 2026 03:32
@7hokerz

7hokerz commented Jun 9, 2026

Copy link
Copy Markdown
Author

Note that @google-cloud/storage v7.21.0 is officially out, resolving the path-related issues.

@wiz-9635d3485b

Copy link
Copy Markdown

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings 2 Medium
Software Management Finding Software Management Findings -
Total 2 Medium

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants