-
Notifications
You must be signed in to change notification settings - Fork 444
/
default.yml
332 lines (332 loc) · 11.1 KB
/
default.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
---
description: Pipeline for parsing azure signin logs.
processors:
- set:
field: event.ingested
value: '{{_ingest.timestamp}}'
- set:
field: ecs.version
value: '1.11.0'
- rename:
field: azure
target_field: azure-eventhub
ignore_missing: true
- json:
field: message
target_field: azure.signinlogs
- drop:
if: ctx.azure.signinlogs.category != 'SignInLogs'
- date:
field: azure.signinlogs.time
target_field: '@timestamp'
ignore_failure: false
formats:
- ISO8601
- rename:
field: message
target_field: event.original
- remove:
field: azure.signinlogs.time
ignore_missing: true
- rename:
field: azure.signinlogs.resourceId
target_field: azure.resource_id
ignore_missing: true
- grok:
field: azure.signinlogs.callerIpAddress
patterns:
- \[%{IPORHOST:source.ip}\]:%{INT:source.port:int}
- "%{IPORHOST:source.ip}:%{INT:source.port:int}"
- "%{IPORHOST:source.ip}"
ignore_missing: true
ignore_failure: true
- remove:
field: azure.signinlogs.callerIpAddress
if: 'ctx.source?.ip != null'
ignore_missing: true
- set:
field: client.ip
value: '{{source.ip}}'
ignore_empty_value: true
- append:
field: related.ip
value: '{{source.ip}}'
allow_duplicates: false
if: 'ctx.source?.ip != null'
- rename:
field: azure.signinlogs.Level
target_field: log.level
ignore_missing: true
- rename:
field: azure.signinlogs.durationMs
target_field: event.duration
ignore_missing: true
- script:
lang: painless
source: ctx.event.duration = ctx.event.duration * params.param_nano
params:
param_nano: 1000000
- rename:
field: azure.signinlogs.location
target_field: geo.country_iso_code
ignore_missing: true
- rename:
field: azure.signinlogs.resultType
target_field: azure.signinlogs.result_type
ignore_missing: true
- rename:
field: azure.signinlogs.operationName
target_field: azure.signinlogs.operation_name
ignore_missing: true
- convert:
field: azure.signinlogs.operation_name
target_field: event.action
type: string
ignore_missing: true
- rename:
field: azure.signinlogs.resultSignature
target_field: azure.signinlogs.result_signature
ignore_missing: true
- rename:
field: azure.signinlogs.resultDescription
target_field: azure.signinlogs.result_description
ignore_missing: true
- rename:
field: azure.signinlogs.operationVersion
target_field: azure.signinlogs.operation_version
ignore_missing: true
- rename:
field: azure.signinlogs.tenantId
target_field: azure.tenant_id
ignore_missing: true
- rename:
field: azure.signinlogs.correlationId
target_field: azure.correlation_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.networkLocationDetails
target_field: azure.signinlogs.properties.network_location_details
ignore_missing: true
- rename:
field: azure.signinlogs.properties.resourceId
target_field: azure.signinlogs.properties.resource_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.appliedConditionalAccessPolicies
target_field: azure.signinlogs.properties.applied_conditional_access_policies
ignore_missing: true
- rename:
field: azure.signinlogs.properties.authenticationDetails
target_field: azure.signinlogs.properties.authentication_details
ignore_missing: true
- rename:
field: azure.signinlogs.properties.authenticationRequirementPolicies
target_field: azure.signinlogs.properties.authentication_requirement_policies
ignore_missing: true
- rename:
field: azure.signinlogs.properties.authenticationProcessingDetails
target_field: azure.signinlogs.properties.authentication_processing_details
ignore_missing: true
- rename:
field: azure.signinlogs.properties.deviceDetail
target_field: azure.signinlogs.properties.device_detail
ignore_missing: true
- rename:
field: azure.signinlogs.properties.device_detail.deviceId
target_field: azure.signinlogs.properties.device_detail.device_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.device_detail.operatingSystem
target_field: azure.signinlogs.properties.device_detail.operating_system
ignore_missing: true
- rename:
field: azure.signinlogs.properties.device_detail.displayName
target_field: azure.signinlogs.properties.device_detail.display_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.device_detail.trustType
target_field: azure.signinlogs.properties.device_detail.trust_type
ignore_missing: true
- rename:
field: azure.signinlogs.properties.createdDateTime
target_field: azure.signinlogs.properties.created_at
ignore_missing: true
- rename:
field: azure.signinlogs.properties.userDisplayName
target_field: azure.signinlogs.properties.user_display_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.correlationId
target_field: azure.signinlogs.properties.correlation_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.userPrincipalName
target_field: azure.signinlogs.properties.user_principal_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.userId
target_field: azure.signinlogs.properties.user_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.appId
target_field: azure.signinlogs.properties.app_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.appDisplayName
target_field: azure.signinlogs.properties.app_display_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.ipAddress
target_field: azure.signinlogs.properties.ip_address
ignore_missing: true
- rename:
field: azure.signinlogs.properties.clientAppUsed
target_field: azure.signinlogs.properties.client_app_used
ignore_missing: true
- rename:
field: azure.signinlogs.properties.conditionalAccessStatus
target_field: azure.signinlogs.properties.conditional_access_status
ignore_missing: true
- rename:
field: azure.signinlogs.properties.originalRequestId
target_field: azure.signinlogs.properties.original_request_id
ignore_missing: true
- rename:
field: azure.signinlogs.properties.isInteractive
target_field: azure.signinlogs.properties.is_interactive
ignore_missing: true
- rename:
field: azure.signinlogs.properties.tokenIssuerName
target_field: azure.signinlogs.properties.token_issuer_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.tokenIssuerType
target_field: azure.signinlogs.properties.token_issuer_type
ignore_missing: true
- rename:
field: azure.signinlogs.properties.processingTimeInMilliseconds
target_field: azure.signinlogs.properties.processing_time_ms
ignore_missing: true
- rename:
field: azure.signinlogs.properties.riskDetail
target_field: azure.signinlogs.properties.risk_detail
ignore_missing: true
- rename:
field: azure.signinlogs.properties.riskLevelAggregated
target_field: azure.signinlogs.properties.risk_level_aggregated
ignore_missing: true
- rename:
field: azure.signinlogs.properties.riskLevelDuringSignIn
target_field: azure.signinlogs.properties.risk_level_during_signin
ignore_missing: true
- rename:
field: azure.signinlogs.properties.riskState
target_field: azure.signinlogs.properties.risk_state
ignore_missing: true
- rename:
field: azure.signinlogs.properties.resourceDisplayName
target_field: azure.signinlogs.properties.resource_display_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.status.errorCode
target_field: azure.signinlogs.properties.status.error_code
ignore_missing: true
- rename:
field: azure.signinlogs.properties.status.failureReason
target_field: message
ignore_missing: true
- rename:
field: azure.signinlogs.properties.status.additionalDetails
target_field: message
ignore_missing: true
- rename:
field: azure.signinlogs.properties.location.city
target_field: geo.city_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.location.state
target_field: geo.country_name
ignore_missing: true
- rename:
field: azure.signinlogs.properties.location.geoCoordinates.latitude
target_field: geo.location.lat
ignore_missing: true
- rename:
field: azure.signinlogs.properties.location.geoCoordinates.longitude
target_field: geo.location.lon
ignore_missing: true
- rename:
field: azure.signinlogs.properties.servicePrincipalId
target_field: azure.signinlogs.properties.service_principal_id
ignore_missing: true
- remove:
field:
- azure.signinlogs.properties.location
ignore_missing: true
- set:
field: event.kind
value: event
- set:
field: event.category
value:
- authentication
- set:
field: event.type
value:
- info
- set:
field: event.outcome
value: success
if: "ctx?.azure?.signinlogs?.properties?.status?.error_code == null || ctx.azure.signinlogs.properties.status.error_code == 0"
- set:
field: event.outcome
value: failure
if: "ctx?.azure?.signinlogs?.properties?.status?.error_code != null && ctx.azure.signinlogs.properties.status.error_code > 0"
- grok:
field: azure.signinlogs.properties.user_principal_name
patterns:
- '%{USERNAME:user.name}@%{HOSTNAME:user.domain}'
- '%{GREEDYDATA:user.name}'
ignore_missing: true
ignore_failure: true
- convert:
field: azure.signinlogs.properties.user_display_name
target_field: user.full_name
ignore_missing: true
type: string
- convert:
field: azure.signinlogs.properties.user_id
target_field: user.id
ignore_missing: true
type: string
- geoip:
field: source.ip
target_field: source.geo
ignore_missing: true
- geoip:
database_file: GeoLite2-ASN.mmdb
field: source.ip
target_field: source.as
properties:
- asn
- organization_name
ignore_missing: true
- rename:
field: source.as.asn
target_field: source.as.number
ignore_missing: true
- rename:
field: source.as.organization_name
target_field: source.as.organization.name
ignore_missing: true
- pipeline:
name: '{{ IngestPipeline "azure-shared-pipeline" }}'
- remove:
field: event.original
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
ignore_failure: true
ignore_missing: true
on_failure:
- set:
field: error.message
value: '{{ _ingest.on_failure_message }}'