forked from elastic/integrations
-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.yml
145 lines (138 loc) · 3.63 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
---
description: Pipeline for normalizing 1Password Item Usage Events
processors:
- rename:
field: message
target_field: event.original
- json:
field: event.original
target_field: onepassword
- drop:
description: Drop if no timestamp (invalid json)
if: "ctx?.onepassword?.timestamp == null"
#######################
## ECS Event Mapping ##
#######################
- set:
field: ecs.version
value: '8.10.0'
# Sets event.created from the @timestamp field generated by filebeat before being overwritten further down
- set:
field: event.created
copy_from: "@timestamp"
- set:
field: event.kind
value: event
- append:
field: event.category
value: [file]
- append:
field: event.type
value: [access]
- rename:
field: onepassword.action
target_field: event.action
ignore_missing: true
#########################
## ECS Related Mapping ##
#########################
- append:
field: related.user
value: "{{onepassword.user.uuid}}"
allow_duplicates: false
if: ctx?.onepassword?.user?.uuid != null
- append:
field: related.user
value: "{{onepassword.user.email}}"
allow_duplicates: false
if: ctx?.onepassword?.user?.email != null
- append:
field: related.user
value: "{{onepassword.user.name}}"
allow_duplicates: false
if: ctx?.onepassword?.user?.name != null
- append:
field: related.ip
value: "{{onepassword.client.ip_address}}"
allow_duplicates: false
if: ctx?.onepassword?.client?.ip_address != null
######################
## ECS User Mapping ##
######################
- rename:
field: onepassword.user.uuid
target_field: user.id
ignore_missing: true
- rename:
field: onepassword.user.name
target_field: user.full_name
ignore_missing: true
- rename:
field: onepassword.user.email
target_field: user.email
ignore_missing: true
####################
## ECS OS Mapping ##
####################
- rename:
field: onepassword.client.os_name
target_field: os.name
ignore_missing: true
- rename:
field: onepassword.client.os_version
target_field: os.version
ignore_missing: true
########################
## ECS Source Mapping ##
########################
- rename:
field: onepassword.client.ip_address
target_field: source.ip
ignore_missing: true
- geoip:
field: source.ip
target_field: source.geo
- 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
######################
## ECS Base Mapping ##
######################
- date:
field: onepassword.timestamp
formats:
- ISO8601
#############
## Cleanup ##
#############
- remove:
field:
- onepassword.timestamp
- onepassword.user
- onepassword.location # Use the included GeoIP processor
ignore_missing: true
- remove:
field: event.original
if: "ctx?.tags == null || !(ctx.tags.contains('preserve_original_event'))"
ignore_failure: true
ignore_missing: true
on_failure:
- set:
field: event.kind
value: pipeline_error
- append:
field: error.message
value: '{{{ _ingest.on_failure_message }}}'