Skip to content

Commit 03ac6fe

Browse files
authored
azure: add related.entity field to activitylogs default ingest pipeline (elastic#11233)
1 parent 6c28eaa commit 03ac6fe

File tree

8 files changed

+47
-1
lines changed

8 files changed

+47
-1
lines changed

packages/azure/changelog.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
- version: "1.19.0"
2+
changes:
3+
- description: Add entity identifiers to `related.entity` in activitylogs.
4+
type: enhancement
5+
link: https://github.com/elastic/integrations/pull/11233
16
- version: "1.18.0"
27
changes:
38
- description: Add entity identifiers to `related.entity`.

packages/azure/data_stream/activitylogs/_dev/test/pipeline/test-activitylogs-edgecases.log-expected.json

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@
3535
"log": {
3636
"level": "Information"
3737
},
38+
"related": {
39+
"entity": [
40+
"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.domainRegistration"
41+
]
42+
},
3843
"tags": [
3944
"preserve_original_event"
4045
]
@@ -279,6 +284,9 @@
279284
}
280285
},
281286
"related": {
287+
"entity": [
288+
"/tenants/c7f1e3ce-ba66-40a7-91bd-9594b36223fc/providers/Microsoft.aadiam"
289+
],
282290
"ip": [
283291
"2a02:cf40:add:4002:91f2:a9b2:e09a:6fc6"
284292
]
@@ -529,6 +537,11 @@
529537
"geo": {
530538
"name": "GB"
531539
},
540+
"related": {
541+
"entity": [
542+
"/tenants/c7f1e3ce-ba66-40a7-91bd-9594b36223fc/providers/Microsoft.aadiam"
543+
]
544+
},
532545
"source": {
533546
"address": "127.0.0.0/8"
534547
},

packages/azure/data_stream/activitylogs/_dev/test/pipeline/test-activitylogs-identity.log-expected.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,9 @@
243243
"region_name": "England"
244244
},
245245
"related": {
246+
"entity": [
247+
"/tenants/c7f1e3ce-ba66-40a7-91bd-9594b36223fc/providers/Microsoft.aadiam"
248+
],
246249
"ip": [
247250
"81.2.69.143"
248251
]

packages/azure/data_stream/activitylogs/_dev/test/pipeline/test-activitylogs-raw.log-expected.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,10 @@
8484
"level": "Information"
8585
},
8686
"related": {
87+
"entity": [
88+
"/SUBSCRIPTIONS/8a4de8b5-095c-47d0-a96f-a75130c61d53/RESOURCEGROUPS/SA-HEMA/PROVIDERS/MICROSOFT.EVENTHUB/NAMESPACES/AZURELSEVENTS/AUTHORIZATIONRULES/ROOTMANAGESHAREDACCESSKEY",
89+
"8a4de8b5-095c-47d0-a96f-a75130c61d53"
90+
],
8791
"ip": [
8892
"81.2.69.144"
8993
]

packages/azure/data_stream/activitylogs/elasticsearch/ingest_pipeline/default.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,10 +313,23 @@ processors:
313313
- set:
314314
field: event.kind
315315
value: event
316+
- append:
317+
field: related.entity
318+
value: '{{{ azure.resource_id }}}'
319+
allow_duplicates: false
320+
if: ctx.azure?.resource_id != null && ctx.azure.resource_id != ''
321+
- append:
322+
field: related.entity
323+
value: '{{{ azure.activitylogs.identity.authorization.evidence.principal_id }}}'
324+
allow_duplicates: false
325+
if: >
326+
ctx.azure?.activitylogs?.identity?.authorization?.evidence?.principal_id != null &&
327+
ctx.azure.activitylogs.identity.authorization.evidence.principal_id != ''
316328
- pipeline:
317329
name: '{{ IngestPipeline "azure-shared-pipeline" }}'
318330
on_failure:
319331
- set:
320332
field: error.message
321333
value: |-
322334
Processor "{{ _ingest.on_failure_processor_type }}" with tag "{{ _ingest.on_failure_processor_tag }}" in pipeline "{{ _ingest.on_failure_pipeline }}" failed with message "{{ _ingest.on_failure_message }}"
335+

packages/azure/data_stream/activitylogs/fields/fields.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,3 +147,10 @@
147147
148148
Not typically used in automated geolocation.'
149149
level: extended
150+
- name: related.entity
151+
description: |
152+
All the entity identifiers related to the document. If the document
153+
contains multiple entities, identifiers belonging to different entities
154+
will be present. Example identifiers include cloud resource IDs, ARNs,
155+
email addresses, or hostnames.
156+
type: keyword

packages/azure/docs/activitylogs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,4 +213,5 @@ Please refer to the following [document](https://www.elastic.co/guide/en/ecs/cur
213213
| host.containerized | If the host is a container. | boolean |
214214
| host.os.build | OS build information. | keyword |
215215
| host.os.codename | OS codename, if any. | keyword |
216+
| related.entity | All the entity identifiers related to the document. If the document contains multiple entities, identifiers belonging to different entities will be present. Example identifiers include cloud resource IDs, ARNs, email addresses, or hostnames. | keyword |
216217

packages/azure/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: azure
22
title: Azure Logs
3-
version: 1.18.0
3+
version: 1.19.0
44
description: This Elastic integration collects logs from Azure
55
type: integration
66
icons:

0 commit comments

Comments
 (0)