Skip to content

Commit

Permalink
x-pack/filebeat/processors/decode_cef - Fix ECS observer.ip
Browse files Browse the repository at this point in the history
Fix the ECS output format by making `observer.ip` into an array of strings
instead of string.

Fixes #35140
  • Loading branch information
andrewkroh committed Apr 20, 2023
1 parent b47e4fd commit 2078b45
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.next.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ https://github.com/elastic/beats/compare/v8.2.0\...main[Check the HEAD diff]
- Correctly collect TCP and UDP metrics for unspecified address values. {pull}35111[35111]
- Fix base for UDP and TCP queue metrics and UDP drops metric. {pull}35123[35123]
- Sanitize filenames for request tracer in httpjson and cel inputs. {pull}35143[35143]
- decode_cef processor: Fix ECS output by making `observer.ip` into an array of strings instead of string. {issue}35140[35140] {pull}35149[35149]

*Heartbeat*

Expand Down
7 changes: 6 additions & 1 deletion x-pack/filebeat/processors/decode_cef/keys.ecs.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,12 @@ var ecsExtensionMapping = map[string]mappedField{
"destinationUserName": {Target: "destination.user.name"},
"destinationUserPrivileges": {Target: "destination.user.group.name"},
"deviceAction": {Target: "event.action"},
"deviceAddress": {Target: "observer.ip"},
"deviceAddress": {
Target: "observer.ip",
Translate: func(in *cef.Field) (interface{}, error) {
return []string{in.String}, nil
},
},
"deviceDirection": {
Target: "network.direction",
Translate: func(in *cef.Field) (interface{}, error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@
},
"message": "AppControl detectOnly",
"observer": {
"ip": "192.168.33.128",
"ip": [
"192.168.33.128"
],
"product": "Deep Security Agent",
"vendor": "Trend Micro",
"version": "10.2.229"
Expand Down Expand Up @@ -1028,7 +1030,9 @@
},
"observer": {
"hostname": "super",
"ip": "111.111.111.99",
"ip": [
"111.111.111.99"
],
"product": "ASA",
"vendor": "CISCO"
},
Expand Down Expand Up @@ -1106,7 +1110,9 @@
"message": "File Opened",
"observer": {
"hostname": "VirtualXP",
"ip": "192.168.131.65",
"ip": [
"192.168.131.65"
],
"product": "ArcSight",
"vendor": "ArcSight",
"version": "7.0.5.7132.1"
Expand Down Expand Up @@ -1174,7 +1180,9 @@
"message": "Agent [NAT] type [sdkrfilereader] started",
"observer": {
"hostname": "VirtualXP",
"ip": "192.168.0.65",
"ip": [
"192.168.0.65"
],
"product": "ArcSight",
"vendor": "ArcSight",
"version": "7.0.5.7132.1"
Expand Down Expand Up @@ -1235,7 +1243,9 @@
"message": "File processing started",
"observer": {
"hostname": "VirtualXP",
"ip": "192.168.131.65",
"ip": [
"192.168.131.65"
],
"product": "ArcSight",
"vendor": "ArcSight",
"version": "7.0.5.7132.1"
Expand Down Expand Up @@ -1304,7 +1314,9 @@
"message": "Process Stopped by User",
"observer": {
"hostname": "VirtualXP",
"ip": "192.168.131.65",
"ip": [
"192.168.131.65"
],
"product": "ArcSight",
"vendor": "ArcSight",
"version": "7.0.5.7132.1"
Expand Down

0 comments on commit 2078b45

Please sign in to comment.