aws / amazon-s3-encryption-client-dotnet

An encryption client that allows you to secure your sensitive data before you send it to Amazon S3.
https://aws.github.io/amazon-s3-encryption-client-dotnet/
Apache License 2.0
15 stars 10 forks source link

Bug fix: remove unnecessary materialDescription validation #39

Closed CamileDahdah closed 1 year ago

CamileDahdah commented 1 year ago

Bug fix: remove unnecessary materialDescription validation when decrypting S3 object using metadata

Description

This commit will resolve the error that occurs when encrypting an email through AWS SES using KMS, then decrypting it using this library. We are checking if materialDescription metadata field contains a certain value before we decrypt it. However, we don't need this validation because we are validating another field as well. A problem occurs when we use AWS SES encryption rule set because it doesn't populate this metadata field to the S3 encrypted object. Note that other SDK languages already support SES decryption though KMS; hence why, this is a bug.

Motivation and Context

Decrypting an email, which was encrypted using AWS SES with KMS, fails because we are validating a metadata field that isn't populated by AWS SES https://github.com/aws/amazon-s3-encryption-client-dotnet/issues/26 ## Testing Ran all unit and integration tests locally and they all succeeded ## Types of changes

Checklist

License