Debian Codegraph @

hub1/parsers/s01-parse/LePresidente/authelia-logs.yaml

raw
1 onsuccess: next_stage
2 debug: false
3 name: LePresidente/authelia-logs
4 filter: "evt.Parsed.program == 'authelia'"
5 description: "Parse Authelia logs"
6 pattern_syntax:
7 AUTHELIA_BAD_AUTH: 'Unsuccessful 1FA authentication attempt by user \S(%{EMAILADDRESS:email}|%{USERNAME:username})\S'
8 AUTHELIA_BAD_DUO: 'Unsuccessful Duo authentication attempt by user \S(%{EMAILADDRESS:email}|%{USERNAME:username})\S'
9 AUTHELIA_BAD_TOTP: 'Unsuccessful TOTP authentication attempt by user \S(%{EMAILADDRESS:email}|%{USERNAME:username})\S'
10 AUTHELIA_CLF_BADAUTH: '^time="%{RFC3339:timestamp}".*?%{AUTHELIA_BAD_AUTH}.*?remote_ip=%{IP:remote_ip}'
11 AUTHELIA_CLF_DUO: '^time="%{RFC3339:timestamp}".*?%{AUTHELIA_BAD_DUO}.*?remote_ip=%{IP:remote_ip}'
12 AUTHELIA_CLF_TOTP: '^time="%{RFC3339:timestamp}".*?%{AUTHELIA_BAD_TOTP}.*?remote_ip=%{IP:remote_ip}'
13 nodes:
14 - grok:
15 name: "AUTHELIA_CLF_BADAUTH"
16 apply_on: message
17 statics:
18 - meta: log_type
19 value: authelia_failed_clf_auth
20 - grok:
21 name: "AUTHELIA_CLF_DUO"
22 apply_on: message
23 statics:
24 - meta: log_type
25 value: authelia_failed_clf_auth
26 - grok:
27 name: "AUTHELIA_CLF_TOTP"
28 apply_on: message
29 statics:
30 - meta: log_type
31 value: authelia_failed_clf_auth
32 - grok:
33 nodes:
34 - grok:
35 pattern: Unsuccessful (1FA|Duo|TOTP) authentication attempt by user '(%{EMAILADDRESS:email}|%{USERNAME:username})'
36 expression: JsonExtract(evt.Parsed.message, "msg")
37 statics:
38 - meta: log_type
39 value: authelia_failed_json_auth
40 - grok:
41 pattern: '%{IP:remote_ip}'
42 expression: JsonExtract(evt.Parsed.message, "remote_ip")
43 - grok:
44 pattern: '%{RFC3339:timestamp}'
45 expression: JsonExtract(evt.Parsed.message, "time")
46
47 statics:
48 - meta: service
49 value: authelia
50 - meta: user
51 expression: "evt.Parsed.username"
52 - meta: user
53 expression: "evt.Parsed.email"
54 - target: evt.StrTime
55 expression: evt.Parsed.timestamp
56 - meta: source_ip
57 expression: "evt.Parsed.remote_ip"