Skip to content

Commit c51a962

Browse files
[O365] Update the mapping of message ECS field for SecurityComplianceAlerts events (elastic#13918)
o365: populate ECS message field with alert titles from SecurityComplianceAlerts This PR updates the mapping of message ECS field for the SecurityComplianceAlerts events from o365audit.Comments to o365audit.Name field.
1 parent f32accf commit c51a962

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

packages/o365/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
# newer versions go on top
2+
- version: "2.16.0"
3+
changes:
4+
- description: Populate `message` field from the O365 Audit Log `Name` field instead of `Comments` in SecurityComplianceAlerts events to better reflect Alert Titles.
5+
type: enhancement
6+
link: https://github.com/elastic/integrations/pull/13918
27
- version: "2.15.2"
38
changes:
49
- description: Set subobjects false to `o365.audit.Parameters` and `o365.audit.ModifiedProperties` to avoid mapping conflicts.

packages/o365/data_stream/audit/_dev/test/pipeline/test-sec-comp-alerts-events.json-expected.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,12 @@
2424
"id": "b86ab9d4-fcf1-4b11-8a06-7a8f91b47fbd",
2525
"name": "mytenant.onmicrosoft.com"
2626
},
27-
"message": "New alert",
27+
"message": "Elevation of Exchange admin privilege",
2828
"o365": {
2929
"audit": {
3030
"AlertId": "5ba6e029-8b6e-13bd-b800-08d7b180173c",
3131
"AlertType": "System",
32+
"Comments": "New alert",
3233
"CreationTime": "2020-02-14T19:00:00",
3334
"Data": {
3435
@@ -117,11 +118,12 @@
117118
"id": "b86ab9d4-fcf1-4b11-8a06-7a8f91b47fbd",
118119
"name": "mytenant.onmicrosoft.com"
119120
},
120-
"message": "New alert",
121+
"message": "Elevation of Exchange admin privilege",
121122
"o365": {
122123
"audit": {
123124
"AlertId": "5ba6e029-8b6e-13bd-b800-08d7b180173c",
124125
"AlertType": "System",
126+
"Comments": "New alert",
125127
"CreationTime": "2020-02-14T19:00:00",
126128
"Data": {
127129
"ad": "This alert is triggered when someone in your organization becomes an Exchange admin or gets new Exchange admin permissions -V1.0.0.1",
@@ -216,11 +218,12 @@
216218
"id": "b86ab9d4-fcf1-4b11-8a06-7a8f91b47fbd",
217219
"name": "mytenant.onmicrosoft.com"
218220
},
219-
"message": "This is a phony threat alert",
221+
"message": "Phony Malware Alert",
220222
"o365": {
221223
"audit": {
222224
"AlertId": "1233344-8b6e-13bd-b800-08d7b180173c",
223225
"AlertType": "System",
226+
"Comments": "This is a phony threat alert",
224227
"CreationTime": "2020-02-14T19:00:00",
225228
"Data": {
226229
"flattened": {

packages/o365/data_stream/audit/_dev/test/pipeline/test-wl-securitycompliancecenter.json-expected.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,12 @@
2323
"host": {
2424
"id": "dddddddd-cccc-eeee-aaaa-bbbbbbbbbbbb"
2525
},
26-
"message": "New alert",
26+
"message": "User requested to release a quarantined message",
2727
"o365": {
2828
"audit": {
2929
"AlertId": "dddddddd-cccc-eeee-aaaa-bbbbbbbbbbbb",
3030
"AlertType": "System",
31+
"Comments": "New alert",
3132
"CreationTime": "2024-12-31T23:59:59",
3233
"Data": {
3334
"ad": "A user has requested to release an email from quarantine. -V1.0.0.1",
@@ -144,11 +145,12 @@
144145
"host": {
145146
"id": "dddddddd-cccc-eeee-aaaa-bbbbbbbbbbbb"
146147
},
147-
"message": "New alert",
148+
"message": "Email messages containing malicious file removed after delivery",
148149
"o365": {
149150
"audit": {
150151
"AlertId": "dddddddd-cccc-eeee-aaaa-bbbbbbbbbbbb",
151152
"AlertType": "System",
153+
"Comments": "New alert",
152154
"CreationTime": "2022-12-31T23:59:59",
153155
"Data": {
154156
"aii": "dddddddd-cccc-eeee-aaaa-bbbbbbbbbbbb",

packages/o365/data_stream/audit/elasticsearch/ingest_pipeline/default.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,9 @@ processors:
519519
value: creation
520520
if: 'ctx.event?.action != null && ["FileUploaded", "FolderCopied", "FolderCreated"].contains(ctx.event?.action)'
521521
# SecurityComplianceAlerts Schema
522-
- rename:
523-
field: o365audit.Comments
524-
target_field: message
525-
ignore_missing: true
522+
- set:
523+
field: message
524+
copy_from: o365audit.Name
526525
if: ctx.event?.code == "SecurityComplianceAlerts"
527526
- rename:
528527
field: o365audit.Name

packages/o365/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: o365
22
title: Microsoft Office 365
3-
version: "2.15.2"
3+
version: "2.16.0"
44
description: Collect logs from Microsoft Office 365 with Elastic Agent.
55
type: integration
66
format_version: "3.2.3"

0 commit comments

Comments
 (0)