-
Notifications
You must be signed in to change notification settings - Fork 9.8k
s3lockout #45105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3lockout #45105
Conversation
- Add blocked_encryption_types_list field to bucket server-side encryption configuration - Support blocking SSE-C uploads (SSE-C) or unblocking all types (NONE) - Add acceptance test for blocking/unblocking encryption types - Update documentation with example usage - Add replace directives for local AWS SDK Go v2 with S3 Lockout support
Removes the '_list' suffix from the attribute name to follow Terraform's convention of using plural names for list attributes without the suffix.
Only set blocked_encryption_types in state when there are actual values to prevent empty lists from appearing in the plan unexpectedly.
Community GuidelinesThis comment is added to every new Pull Request to provide quick reference to how the Terraform AWS Provider is maintained. Please review the information below, and thank you for contributing to the community that keeps the provider thriving! 🚀 Voting for Prioritization
Pull Request Authors
|
|
This is waiting for aws-sdk-go v2 s3 update that includes the new feature. |
|
Requires AWS SDK for Go v2 Release 2025-11-19: #45144. |
|
Thanks @ewbankkit 🎉 |
This reverts commit c11633a.
ewbankkit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🚀.
% make testacc TESTARGS='-run=TestAccS3BucketServerSideEncryptionConfiguration_' PKG=s3 ACCTEST_PARALLELISM=4
make: Verifying source code with gofmt...
==> Checking that code complies with gofmt requirements...
make: Running acceptance tests on branch: 🌿 f-s3lockout 🌿...
TF_ACC=1 go1.24.10 test ./internal/service/s3/... -v -count 1 -parallel 4 -run=TestAccS3BucketServerSideEncryptionConfiguration_ -timeout 360m -vet=off
2025/11/19 16:13:15 Creating Terraform AWS Provider (SDKv2-style)...
2025/11/19 16:13:15 Initializing Terraform AWS Provider (SDKv2-style)...
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_Identity_Basic
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_Identity_Basic
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_Identity_RegionOverride
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_Identity_RegionOverride
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource_NoRefresh_NoChange
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource_NoRefresh_NoChange
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_basic
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_basic
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_blockedEncryptionTypes
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_blockedEncryptionTypes
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySEEByDefault_AES256
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySEEByDefault_AES256
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMS
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMS
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSDSSE
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSDSSE
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_UpdateSSEAlgorithm
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_UpdateSSEAlgorithm
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyARN
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyARN
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyID
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyID
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_BucketKeyEnabled
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_BucketKeyEnabled
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_BucketKeyEnabled
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_BucketKeyEnabled
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_migrate_noChange
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_migrate_noChange
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_migrate_withChange
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_migrate_withChange
=== RUN TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket
=== PAUSE TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_Identity_Basic
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_UpdateSSEAlgorithm
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_blockedEncryptionTypes
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMS
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMS (18.94s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSDSSE
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_Identity_Basic (30.44s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySEEByDefault_AES256
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_blockedEncryptionTypes (31.27s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_BucketKeyEnabled
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_UpdateSSEAlgorithm (34.29s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSDSSE (19.09s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_migrate_withChange
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySEEByDefault_AES256 (17.48s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_migrate_noChange
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_directoryBucket (21.27s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyID
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_migrate_withChange (25.26s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_BucketKeyEnabled
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_BucketKeyEnabled (33.98s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource_NoRefresh_NoChange
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_migrate_noChange (32.72s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_basic
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyID (29.14s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyARN
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_basic (28.98s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_BucketKeyEnabled (50.26s)
=== CONT TestAccS3BucketServerSideEncryptionConfiguration_Identity_RegionOverride
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_ApplySSEByDefault_KMSWithMasterKeyARN (29.35s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource_NoRefresh_NoChange (60.59s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_Identity_RegionOverride (23.40s)
--- PASS: TestAccS3BucketServerSideEncryptionConfiguration_Identity_ExistingResource (53.73s)
PASS
ok github.com/hashicorp/terraform-provider-aws/internal/service/s3 169.307s|
Warning This Issue has been closed, meaning that any additional comments are much easier for the maintainers to miss. Please assume that the maintainers will not see them. Ongoing conversations amongst community members are welcome, however, the issue will be locked after 30 days. Moving conversations to another venue, such as the AWS Provider forum, is recommended. If you have additional concerns, please open a new issue, referencing this one where needed. |
Rollback Plan
If a change needs to be reverted, we will publish an updated version of the library.
Changes to Security Controls
Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.
Description
S3 Lockout introduces a new default security setting that blocks uploads using server-side encryption with customer-provided keys (SSE-C) for all new S3 buckets. Upload requests (
PutObject,CopyObject,MultipartUpload) that specify SSE-C will now fail with HTTP 403 AccessDenied. This behavior is configurable through a new parameter in thePutBucketEncryptionAPI.Relations
Closes #0000
References
Output from Acceptance Testing