Skip to content

Commit

Permalink
Updated Cloud trail Parsing to mapp out addtional needed data
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-grabau committed Sep 12, 2024
1 parent 84463cf commit 2a5a5d0
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions config/processors/api_audit_aws.cloudtrail.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,18 +50,24 @@ filter {
rename => { "[aws][insightDetails][insight]" => "[rule][description]" }
rename => { "[aws][insightDetails][insightDuration]" => "[event][duration]" }
}
grok {
match => {
"[aws][userIdentity][arn]" => [
'^.*\/(?<[user][name]>.*?)$'
]
if [aws][userIdentity][arn] {
grok {
match => {
"[aws][userIdentity][arn]" => [
'^(?<[user][roles]>.*\/(?<[user][name]>.*?))$'
]
}
tag_on_failure => "_grokparsefailure_1"
}
}
grok {
match => {
"[aws][userIdentity][principalId]" => [
'^.*:(?<user_name>.*?)$'
]
if [aws][userIdentity][principalId] {
grok {
match => {
"[aws][userIdentity][principalId]" => [
'^.*:(?<[user][id]>.*?)$'
]
}
tag_on_failure => "_grokparsefailure_2"
}
}
mutate {
Expand All @@ -73,8 +79,8 @@ filter {
}
}
translate {
source => "[event][category]"
target => "[event][category]"
source => "[log][origin][function]"
target => "[log][origin][function]"
dictionary => {
"management" => "configuration"
"Data" => "database"
Expand Down

0 comments on commit 2a5a5d0

Please sign in to comment.