Skip to content

Conversation

@qxprakash
Copy link
Collaborator

This PR replaces signed headers with presigned urls , for signing.

  • I implemented this along with the uploader rewrite , but raised PR for this it separately to reduce diffs.
  • signer.ts now returns signed url , which is directly used by _presignedRequest method to make calls to s3
  • tested it with uploader rewrite working fine.

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

⚠️ No Changeset found

Latest commit: 31c6b98

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@qxprakash
Copy link
Collaborator Author

@codex review

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b6a77263d7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@qxprakash qxprakash marked this pull request as draft January 10, 2026 05:28
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors the S3mini client to use presigned URLs instead of signed headers for authentication. Presigned URLs include the AWS signature in the query string rather than in request headers, simplifying the request flow and enabling easier URL sharing.

Changes:

  • Replaced signed header authentication with presigned URL generation in the S3 signing mechanism
  • Simplified the request flow by removing header-based signing logic and query parameter filtering
  • Updated tests to verify presigned URL functionality instead of checksum validation

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
packages/@uppy/aws-s3/src/s3-client/types.ts Replaced signableRequest/signedHeaders types with presignableRequest/presignedResponse types; removed SSECHeaders and AWSHeaders interfaces
packages/@uppy/aws-s3/src/s3-client/signer.ts Completely rewrote signature generation to produce presigned URLs with query string signatures; added required endpoint parameter to SignerConfig
packages/@uppy/aws-s3/src/s3-client/S3.ts Replaced _signedRequest with _presignedRequest method; removed support for custom headers and query parameters in favor of presigned URLs
packages/@uppy/aws-s3/tests/s3-client/minio.test.js Replaced checksum validation tests with simpler presigned URL functionality tests
packages/@uppy/aws-s3/tests/s3-client/_shared.test.js Updated to pass endpoint parameter to createSigV4Signer
packages/@uppy/aws-s3/src/index.ts Added AwsS3Part interface export (appears unrelated to presigned URL changes)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@qxprakash qxprakash self-assigned this Jan 10, 2026
@qxprakash qxprakash marked this pull request as ready for review January 10, 2026 10:16
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b80483a6d5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +354 to 358
const res = await this._presignedRequest('PUT', key, {
uploadId,
partNumber,
body,
headers: {
[C.HEADER_CONTENT_LENGTH]: U.getByteSize(data),
...ssecHeaders,
},
})

Choose a reason for hiding this comment

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

P2 Badge Preserve uploadPart opts in presigned request

The uploadPart method still accepts an opts object, but the presigned request is generated only with uploadId, partNumber, and body. Any extra query parameters a caller previously relied on (e.g., backend-specific flags or pagination/checksum extensions) are now silently dropped and therefore not included in the signed URL, which can make the upload fail or behave differently. Consider threading opts into the presigning input or removing the parameter if it is no longer supported.

Useful? React with 👍 / 👎.

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.

1 participant