This rule ensures a log metric filter and alarm exist for disabling or scheduled deletion of customer managed keys.
Rule | Ensure a log metric filter and alarm exist for disabling or scheduled deletion of customer managed keys |
Framework | NIST Cybersecurity Framework (CSF) v1.1 |
Severity | ✔ Low |
Rule Description:
This rule ensures that a log metric filter and alarm exist to detect any disabling or scheduled deletion of customer-managed keys. It aligns with the NIST Cybersecurity Framework (CSF) v1 guidelines to enhance security measures for protecting sensitive data.
Troubleshooting Steps:
If the log metric filter or alarm does not exist or is not configured properly, follow these troubleshooting steps:
Verify AWS CloudTrail logging is enabled:
Check for existing metric filters and alarms:
Validate the log metric filter's pattern:
Verify the associated alarm settings:
Necessary Codes:
No specific code is required for this rule.
Step-by-Step Guide for Remediation:
Follow these steps to ensure the log metric filter and alarm exist for disabling or scheduled deletion of customer-managed keys:
Open the AWS Management Console.
Navigate to the CloudWatch service.
Select "Logs" from the left-hand menu.
Click on the log group that contains the relevant CloudTrail logs.
Select the "Actions" button and choose "Create metric filter."
Define a filter pattern that matches disabling or scheduled deletion of customer-managed keys events. Example pattern:
{($.eventSource = kms.amazonaws.com) && (($.eventName = DisableKey) || ($.eventName = ScheduleKeyDeletion))}
Test the pattern to ensure it matches the desired events by using the provided log samples.
Specify a name for the metric filter.
Define the filter's destination as "Metric."
Add a corresponding metric namespace and metric name to identify the filter's monitoring data accurately.
Click on "Create filter."
Once the filter is created, return to the log group page.
Locate the created metric filter and click on the associated alarm link.
Configure the alarm based on your desired threshold(s) and evaluation period.
Define the action(s) to be taken when the alarm is triggered, such as sending a notification to relevant stakeholders.
Click on "Create alarm."
Test the alarm by generating appropriate events or wait for the regular logs to populate.
Monitor the alarm for any triggering events related to disabling or scheduled deletion of customer-managed keys.
Note: Repeat these steps for each relevant log group if multiple exist.
By following these steps, you can ensure the presence of a log metric filter and alarm for disabling or scheduled deletion of customer-managed keys, aligning with the NIST Cybersecurity Framework (CSF) v1 requirements.