This rule ensures that S3 buckets enforce SSL for secure data transfer.
Rule | S3 buckets should enforce SSL |
Framework | NIST 800-53 Revision 5 |
Severity | ✔ Medium |
Rule Description
The rule NIST 800-53 Revision 5 mandates that all S3 buckets should enforce the use of SSL (Secure Sockets Layer) encryption to enhance the security of data in transit. SSL ensures that data transferred between clients and S3 buckets remains encrypted and protected from unauthorized access.
Troubleshooting Steps
If there are any issues with enforcing SSL for S3 buckets, you can follow these troubleshooting steps:
Necessary Codes
The following code snippet can be used to enforce SSL for an S3 bucket using the AWS Command Line Interface (CLI):
aws s3api put-bucket-policy --bucket YOUR_BUCKET_NAME --policy '{ "Version": "2012-10-17", "Statement": [ { "Sid": "EnforceSSLAccess", "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::YOUR_BUCKET_NAME/*", "arn:aws:s3:::YOUR_BUCKET_NAME" ], "Condition": { "Bool": { "aws:SecureTransport": "false" } } } ] }'
Step-by-Step Guide for Remediation
Follow these steps to enforce SSL for an S3 bucket:
YOUR_BUCKET_NAME
with the actual name of your S3 bucket:
aws s3api put-bucket-policy --bucket YOUR_BUCKET_NAME --policy '{ "Version": "2012-10-17", "Statement": [ { "Sid": "EnforceSSLAccess", "Effect": "Deny", "Principal": "*", "Action": "s3:*", "Resource": [ "arn:aws:s3:::YOUR_BUCKET_NAME/*", "arn:aws:s3:::YOUR_BUCKET_NAME" ], "Condition": { "Bool": { "aws:SecureTransport": "false" } } } ] }'
Note: Enforcing SSL may impact existing applications or services that do not support SSL connections. Ensure that all clients accessing the S3 bucket are configured to use SSL for uninterrupted access.