This rule ensures that CloudTrail trail logs are encrypted with KMS CMK for enhanced security measures.
Rule | CloudTrail trail logs should be encrypted with KMS CMK |
Framework | GxP EU Annex 11 |
Severity | ✔ Critical |
Ensure CloudTrail Trail Logs are Encrypted with KMS CMK in Compliance with GxP EU Annex 11
Overview
GxP EU Annex 11 compliance requires that electronic records are protected. Encrypting AWS CloudTrail logs with a KMS Customer Master Key (CMK) ensures the integrity and confidentiality of log data. Enforcing encryption of CloudTrail logs is a step towards meeting regulatory requirements.
Importance of Encryption for Compliance
Configuring CloudTrail Log Encryption with KMS CMK
Step 1: Verify Existing Trails
CLI Command
aws cloudtrail describe-trails
Step 2: Create a KMS CMK
CLI Command
aws kms create-key --description "CloudTrail/GxP Annex 11 key"
Step 3: Assign Alias to KMS CMK
CLI Command
aws kms create-alias --alias-name alias/CloudTrailGxPKey --target-key-id <Key ID from previous step>
<Key ID from previous step>
with the generated Key ID.Step 4: Enable Log File Validation
CLI Command
aws cloudtrail update-trail --name <Your Trail Name> --enable-log-file-validation
<Your Trail Name>
with your CloudTrail name.Step 5: Apply KMS CMK Encryption to CloudTrail
CLI Command
aws cloudtrail update-trail --name <Your Trail Name> --kms-key-id <Key ID>
<Your Trail Name>
with your CloudTrail name and <Key ID>
with the Key ID from step 2.Troubleshooting
Trail Not Logging Events
CloudTrail Logs Not Encrypted
Access Denied Errors with KMS
Remediation
Final Steps
Conclusion
Encrypting CloudTrail logs with a KMS CMK is essential for GxP EU Annex 11 compliance. By following the steps provided, you can secure your trail logs in accordance with regulatory standards, enhancing the security posture of your AWS environment.