Skip to content

Conversation

@mbainter
Copy link
Contributor

@mbainter mbainter commented Jan 23, 2025

Description

There have been incidents where leaked credentials have led to attackers encrypting S3 buckets with their own keys in a form of ransomware attack. AWS recommends implementing policy to prevent using SSEC if that is not a feature that you use in a given bucket. This PR adds an optional policy attachment that implements AWS' recommendation.

Reference:
https://aws.amazon.com/blogs/security/preventing-unintended-encryption-of-amazon-s3-objects/

Motivation and Context

Enable users to easily block the use of SSEC in their buckets, mitigating a potential avenue of attack in the event of leaked credentials.

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

I have updated one of the examples, but I won't be able to test it until later. I will try to follow up soon with the results.

There have been incidents where leaked credentials have led to attackers encrypting S3 buckets with their own keys in
a form of ransomware attack. AWS recommends implementing policy to prevent using SSEC if that is not a feature that
you use in a given bucket.

Reference:
https://aws.amazon.com/blogs/security/preventing-unintended-encryption-of-amazon-s3-objects/
Copy link
Member

@antonbabenko antonbabenko left a comment

Choose a reason for hiding this comment

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

👍

@antonbabenko antonbabenko merged commit cfd1452 into terraform-aws-modules:master Jan 23, 2025
2 checks passed
antonbabenko pushed a commit that referenced this pull request Jan 23, 2025
## [4.5.0](v4.4.0...v4.5.0) (2025-01-23)

### Features

* Add optional policy to deny ssec encrypted uploads ([#307](#307)) ([cfd1452](cfd1452))
@antonbabenko
Copy link
Member

This PR is included in version 4.5.0 🎉

@mbainter
Copy link
Contributor Author

As an FYI - I did just successfully test this, with and without the policy to make sure it applied correctly and that it does block attempts to put objects with SSEC.

@mbainter mbainter deleted the deny-ssec-policy branch January 23, 2025 18:56
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 23, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants