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: Handle S3 decryption using AWS SES #40

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. A problem occurs when we use AWS SES encryption rule set because it doesn't populate this metadata field to the S3 encrypted object. We added another if statement to handle this missing use case. 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