This rule ensures the existence of a log metric filter and alarm for IAM policy changes.
Rule | Ensure a log metric filter and alarm exist for IAM policy changes |
Framework | General Data Protection Regulation (GDPR) |
Severity | ✔ Low |
Rule Description
This rule ensures the presence of a log metric filter and alarm to track and notify IAM policy changes for compliance with the General Data Protection Regulation (GDPR). This helps organizations maintain control and transparency over access to personal data and ensure compliance with GDPR requirements.
Troubleshooting Steps (if any)
If you encounter issues while setting up the log metric filter and alarm for IAM policy changes related to GDPR, follow these troubleshooting steps:
Ensure IAM policy change logging is enabled: Check if IAM policy changes are being logged by verifying the CloudTrail configuration and log delivery settings. Make sure CloudTrail is activated and configured correctly for your AWS account.
Verify log metric filter configuration: Double-check the log metric filter settings to ensure the correct filter pattern is used to track IAM policy changes related to GDPR. Ensure that the correct CloudTrail log group is selected and that the filter pattern aligns with GDPR-specific IAM policy changes.
Review IAM policy permissions: Confirm that the IAM user or role you are using to create the log metric filter and alarm has the necessary permissions. Required permissions include "cloudwatch:PutMetricFilter" and "cloudwatch:PutMetricAlarm" as well as access to the CloudTrail logs.
Check alarm configuration: Examine the alarm configuration parameters such as threshold, evaluation period, and actions to ensure they are correctly set. Make sure the alarm triggers based on the desired conditions when IAM policy changes occur.
Necessary Codes (if any)
No specific code is required for this rule, as it pertains to the configuration and setup of log metric filters and alarms using AWS services.
Step-by-Step Guide for Remediation
To create a log metric filter and alarm for tracking IAM policy changes related to GDPR compliance, follow these steps:
Step 1: Enable CloudTrail
Step 2: Create a Log Metric Filter
{($.eventName = PutGroupPolicy) || ($.eventName = PutUserPolicy) || ($.eventName = PutRolePolicy)} && ($.additionalEventData.policyType = "IdentityPolicy") && ($.additionalEventData.compliance.relatedEventName = "EnableMfaForUser")
Step 3: Create a Log Metric Filter Alarm
Once the log metric filter and alarm are created, you will start tracking and receiving notifications for IAM policy changes related to GDPR compliance. This ensures better visibility and monitoring of access controls and maintains compliance with GDPR regulations.