Skip to content

Commit

Permalink
Update root login filter pattern Closes #284 (#285)
Browse files Browse the repository at this point in the history
  • Loading branch information
rajlearner17 authored Sep 23, 2021
1 parent f46bd7a commit 721f6af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion query/cloudwatch/log_metric_filter_root_login.sql
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ with filter_data as (
and se ->> 'ReadWriteType' = 'All'
and trail.log_group_arn is not null
and filter.log_group_name = split_part(trail.log_group_arn, ':', 7)
and filter.filter_pattern ~ '\s*\$\.userIdentity.type\s*=\s*"Root"'
and filter.filter_pattern ~ '\s*\$\.userIdentity\.type\s*=\s*"Root".+\$\.userIdentity\.invokedBy NOT EXISTS.+\$\.eventType\s*!=\s*"AwsServiceEvent"'
and alarm.metric_name = filter.metric_transformation_name
and subscription.topic_arn = action_arn
)
Expand Down

0 comments on commit 721f6af

Please sign in to comment.