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 s3 checksum-mode header in presigned requests #4000

Merged
merged 7 commits into from
Feb 7, 2025

Conversation

landonxjames
Copy link
Contributor

@landonxjames landonxjames commented Feb 6, 2025

Motivation and Context

Fixes a bug reported in awslabs/aws-sdk-rust#1253 with flexible checksum headers sneaking into presigned requests.

Description

Short circuit the closure that mutates the checksum-mode header when we detect that we are making a presigned request.

Testing

Update our presigned canary tests to do both PUT and GET and have extra headers included that aren't in the query string that will expose this issue if there is a regression.

Checklist

  • For changes to the AWS SDK, generated SDK code, or SDK runtime crates, I have created a changelog entry Markdown file in the .changelog directory, specifying "aws-sdk-rust" in the applies_to key.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Also update our presigned canary tests to do both PUT and GET and have
extra headers included that aren't in the query string
Copy link

github-actions bot commented Feb 6, 2025

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

Copy link

github-actions bot commented Feb 6, 2025

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@landonxjames landonxjames force-pushed the landonxjames/presign-fix branch from 1e180e3 to a99e8bc Compare February 7, 2025 02:56
Copy link

github-actions bot commented Feb 7, 2025

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@landonxjames landonxjames changed the title Fix s3 checksum-mode header in presigned requests Fix s3 checksum-mode header in presigned requests Feb 7, 2025
Copy link

github-actions bot commented Feb 7, 2025

A new generated diff is ready to view.

  • AWS SDK (ignoring whitespace)
  • No codegen difference in the Client Test
  • No codegen difference in the Server Test
  • No codegen difference in the Server Test Python
  • No codegen difference in the Server Test Typescript

A new doc preview is ready to view.

@landonxjames landonxjames marked this pull request as ready for review February 7, 2025 04:25
@landonxjames landonxjames requested review from a team as code owners February 7, 2025 04:25
@landonxjames landonxjames added this pull request to the merge queue Feb 7, 2025
Merged via the queue into main with commit 8039247 Feb 7, 2025
43 of 44 checks passed
@landonxjames landonxjames deleted the landonxjames/presign-fix branch February 7, 2025 18:14
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