Skip to content

Conversation

kuhe
Copy link
Contributor

@kuhe kuhe commented Sep 30, 2024

allows additive configuration over header hoisting with hoistableHeaders, where previously users could only configure the unhoistableHeaders.

For example, with S3, it was either incorrectly deduced or limited by S3 feature availability at the time that SSE headers were considered unhoistable. For backwards compatibility we will still default them to unhoisted, but as of today my testing shows this not to be true.

This change enables the following use case:

const params = {
  Key: "...",
  Bucket: "...",
  ServerSideEncryption: "aws:kms",
  SSEKMSKeyId: "arn:aws:kms:us-west-2:0000:key/abcd-1234-abcd",
};
const s3Client = new S3Client();
const command = new PutObjectCommand(params);

const preSignedUrl =
  (await getSignedUrl(s3Client, command, {
    hoistableHeaders: new Set(["x-amz-server-side-encryption", "x-amz-server-side-encryption-aws-kms-key-id"]),
  }));

context: aws/aws-sdk-js-v3#1701

@kuhe kuhe merged commit a4c1285 into smithy-lang:main Sep 30, 2024
11 checks passed
@kuhe kuhe deleted the fix/sigv4 branch September 30, 2024 17:58
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.

3 participants