Skip to content

Conversation

bagbag
Copy link

@bagbag bagbag commented May 23, 2025

Align ignored headers for signing to current aws sdks.

Current V3 JS-SDK only ignores content-type: https://github.com/aws/aws-sdk-js-v3/blob/86a26c6e93a79415385443cece377d4761dba770/packages/s3-request-presigner/src/presigner.ts#L80

AWS Rust SDK removed filtering out content-length: awslabs/aws-sdk-rust#466

https://github.com/awslabs/aws-sdk-rust/blob/98d89ab5a93ef71d260c8399c4e9be58175d7269/sdk/aws-sigv4/src/http_request/canonical_request.rs#L982

This change is useful to allow enforcement of max file sizes when an untrusted client is in charge of uploading files through presigned put urls.

If this change is approved, I'm looking forward to extend the presign methods to allow specifying the headers.

@bagbag bagbag force-pushed the allow-more-signed-headers branch from 9d9ed4c to cbb7a9d Compare May 23, 2025 20:46
@bagbag bagbag changed the title allow signing of some previously ignored headers allow signing of content-length header May 23, 2025
@prakashsvmx
Copy link
Member

@bagbag - Please address the CI test failures

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.

2 participants