This rule ensures log group encryption at rest is enabled for enhanced security.
Rule | Log group encryption at rest should be enabled |
Framework | NIST 800-171 Revision 2 |
Severity | ✔ High |
Log Group Encryption at Rest - NIST 800-171 Revision 2
Rule Description:
Log Group Encryption at Rest is a security measure that ensures the protection of sensitive data stored in AWS CloudWatch Logs. Enabling Log Group Encryption at Rest helps to comply with the NIST 800-171 Revision 2 security standard. This rule mandates that log data should be encrypted to prevent unauthorized access and to maintain data confidentiality.
Troubleshooting Steps:
If Log Group Encryption at Rest is not enabled, you may encounter the following issues:
Necessary Codes:
To enable Log Group Encryption at Rest for CloudWatch Logs, the following code can be used:
aws logs put-resource-policy --policy-name log-group-encryption-policy --policy-document '{ "Version":"2012-10-17", "Statement":[{ "Sid": "AllowLogGroupEncryption", "Effect": "Allow", "Principal": "*", "Action": "logs:PutResourcePolicy", "Resource": "arn:aws:logs:<region>:<account-id>:log-group:<log-group>:*", "Condition": { "Bool": { "aws:SecureTransport": "true" } } }] }'
Step-by-Step Guide for Remediation:
aws logs put-resource-policy --policy-name log-group-encryption-policy --policy-document '{ "Version":"2012-10-17", "Statement":[{ "Sid": "AllowLogGroupEncryption", "Effect": "Allow", "Principal": "*", "Action": "logs:PutResourcePolicy", "Resource": "arn:aws:logs:<region>:<account-id>:log-group:<log-group>:*", "Condition": { "Bool": { "aws:SecureTransport": "true" } } }] }'
<region>
with the AWS region where your CloudWatch Logs are located.<account-id>
with your AWS account ID.<log-group>
with the name of the specific log group you want to enable encryption for.Notes:
Enabling Log Group Encryption at Rest ensures that log data stored in CloudWatch Logs remains encrypted and secure. It helps organizations meet the requirements of the NIST 800-171 Revision 2 security standard and protects sensitive data from unauthorized access.
Conclusion:
Enabling Log Group Encryption at Rest for CloudWatch Logs is essential for compliance with NIST 800-171 Revision 2. By following the provided troubleshooting steps and utilizing the necessary code snippets, organizations can ensure the security and confidentiality of log data stored in AWS CloudWatch Logs.