Skip to content

req: Encryption enforcement on the Bucket Policy #3

Closed
badra001 opened this issue Jun 19, 2020 · 3 comments
Closed

req: Encryption enforcement on the Bucket Policy #3

badra001 opened this issue Jun 19, 2020 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@badra001
Copy link
Contributor

#1 When the bucket is created, encryption will be enabled. If an existing KMS key is not provided, it will be created.

@badra001 badra001 added the documentation Improvements or additions to documentation label Jun 19, 2020
@badra001
Copy link
Contributor Author

This goes along with this requirement

  • Dedicated KMS Customer Master Key (CMK) created per S3 bucket

It may be better not even to permit the passing of a key and just create with the bucket.

Format would be k-kms-{bucket_name}

@ashle001
Copy link
Contributor

ashle001 commented Jun 22, 2020

Encryption enforced with Bucket Policy:

{
     "Version": "2012-10-17",
     "Id": "PutObjPolicy",
     "Statement": [
           {
                "Sid": "DenyIncorrectEncryptionHeader",
                "Effect": "Deny",
                "Principal": "*",
                "Action": "s3:PutObject",
                "Resource": "arn:aws:s3:::<bucket_name>/*",
                "Condition": {
                        "StringNotEquals": {
                               "s3:x-amz-server-side-encryption": "AES256"
                         }
                }
           },
           {
                "Sid": "DenyUnEncryptedObjectUploads",
                "Effect": "Deny",
                "Principal": "*",
                "Action": "s3:PutObject",
                "Resource": "arn:aws:s3:::<bucket_name>/*",
                "Condition": {
                        "Null": {
                               "s3:x-amz-server-side-encryption": true
                        }
               }
           }
}

@badra001
Copy link
Contributor Author

Closed in 5e51436

Sign in to join this conversation on GitHub.
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants