This rule ensures the presence of a log metric filter and alarm for AWS Management Console authentication failures.
Rule | Ensure a log metric filter and alarm exist for AWS Management Console authentication failures |
Framework | cis_v140 |
Severity | ✔ Low |
Rule Description:
The rule ensures that there is a log metric filter and an alarm in place to detect AWS Management Console authentication failures for cis_v140. This helps to identify and respond to any unauthorized access attempts to the AWS Management Console, which could potentially lead to security breaches or unauthorized data exposure.
Troubleshooting Steps:
Necessary Codes:
To create a log metric filter and alarm for AWS Management Console authentication failures, you can use CloudFormation or AWS Command Line Interface (CLI) commands. Below are the necessary codes for CLI:
Log Metric Filter Creation:
aws logs put-metric-filter \ --log-group-name <log-group-name> \ --filter-name <filter-name> \ --filter-pattern "[timestamp=*, event=SignInFailed, *]" \ --metric-name <metric-name> \ --metric-namespace AWS/ConsoleSignIn \ --metric-value "1"
Replace the placeholders with the appropriate values:
<log-group-name>
: The name of the log group where the log events are stored.<filter-name>
: A name for the log metric filter.<metric-name>
: A name for the metric to be created.Alarm Creation:
aws cloudwatch put-metric-alarm \ --alarm-name <alarm-name> \ --alarm-description "AWS Management Console authentication failures" \ --metric-name <metric-name> \ --namespace AWS/ConsoleSignIn \ --statistic Sum \ --period 300 \ --threshold 1 \ --comparison-operator GreaterThanOrEqualToThreshold \ --evaluation-periods 1 \ --actions-enabled \ --alarm-actions <action-ARN>
Replace the placeholders with the appropriate values:
<alarm-name>
: A name for the alarm.<metric-name>
: The same metric name used in the log metric filter creation.<action-ARN>
: The ARN (Amazon Resource Name) of the action(s) to be taken when the alarm is triggered.Remediation Steps:
To remediate any issues or make changes to the existing configuration, follow the steps below:
Remember to regularly review and update the log metric filter and alarm configurations as per your organization's security policies and requirements.