Skip to content

Conversation

algorban
Copy link
Contributor

@algorban algorban commented Jun 15, 2022

Description

Given PR adds missing x-amz-server-side-encryption and x-amz-server-side-encryption-aws-kms-key-id headers to the getObject and headObject responses.

Problem statement: Currently S3Mock doesn't return these headers in the getObject response (and partially returns in the headObject one). This leads to the exception to be thrown during the object integrity validation by AWS SDK while downloading encrypted object via getObject requests as x-amz-server-side-encryption-aws-kms-key-id header is used in the SkipMd5CheckStrategy.
Without this header object's etag value is compared to the InputStream digest and validation fails as etag of the encrypted object differs from the md5 checksum.

Related Issue

Tasks

  • I have signed the CLA.
  • I have written tests and verified that they fail without my change.

@afranken afranken self-requested a review June 15, 2022 06:13
Copy link
Member

@afranken afranken left a comment

Choose a reason for hiding this comment

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

looking good, thanks! :)

…ption-aws-kms-key-id headers to the getObject response
@algorban algorban force-pushed the add-missing-encryption-headers branch from d4726d1 to 29e3076 Compare June 15, 2022 06:30
@afranken afranken added the bug label Jun 15, 2022
@afranken
Copy link
Member

not sure why the CLA-bot does not recognize that @algorban is part of the Adobe organization...

@afranken afranken merged commit 5bf593c into adobe:main Jun 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants