This rule ensures CloudTrail trail log file validation is enabled for compliance.
Rule | CloudTrail trail log file validation should be enabled |
Framework | CISA-cyber-essentials |
Severity | ✔ Critical |
CloudTrail Log File Validation
Rule Description
AWS CloudTrail is a service that provides a record of actions taken by a user, role, or AWS service in AWS environment. It is essential in ensuring that your AWS environment maintains a secure and compliant state as outlined in the CISA (Cybersecurity and Infrastructure Security Agency) Cyber Essentials.
Enabling log file validation in CloudTrail means that every log file written by CloudTrail will have a corresponding digital signature. This signature can be used to verify the integrity and authenticity of the log files, ensuring that they have not been tampered with after being delivered by CloudTrail.
This capability is paramount for security, as it assures that the activity records are kept intact and unchanged, providing a reliable tool for auditing, compliance, and forensic investigations.
Troubleshooting Steps
If you encounter issues when trying to enable log file validation for CloudTrail, follow these troubleshooting steps:
cloudtrail:UpdateTrail
) to configure CloudTrail settings.Necessary Codes and CLI Commands
To enable log file validation for an existing trail using AWS CLI:
aws cloudtrail update-trail --name YourTrailName --enable-log-file-validation
Replace
YourTrailName
with the actual name of your trail.Step by Step Guide for Remediation
Open the AWS CLI: Launch your command line tool that has AWS CLI installed and configured with the necessary access credentials.
Enable Log File Validation: Use the
update-trail
command with the --enable-log-file-validation
parameter to enable log file validation for your selected trail:aws cloudtrail update-trail --name YourTrailName --enable-log-file-validation
Upon success, this command will output the configuration of the trail including the updated settings.
Verify Changes: Verify if log file validation is enabled by describing the trails and checking the
LogFileValidationEnabled
flag:aws cloudtrail describe-trails --trail-name-list YourTrailName
In the output JSON, check for
"LogFileValidationEnabled": true
to confirm it is enabled.Integrity Verification Check: After logs are delivered, you can verify the integrity of log files by using the
validate-logs
command, which can be installed separately as part of the CloudTrail Processing Library.aws cloudtrail validate-logs --trail-arn YourTrailARN --start-time YYYY-MM-DDTHH:MM:SSZ
Replace
YourTrailARN
with the ARN of your trail and specify the start time for the period you want to validate.Conclusion
By ensuring CloudTrail log file validation is enabled, your AWS environment's security posture will be aligned with the CISA-cyber-essentials requirements, thus contributing to the overall integrity and trustworthiness of the logging mechanism. Ensure you periodically perform integrity checks on the logs and promptly investigate anomalies.