Debian Codegraph @

hub1/parsers/s01-parse/jusabatier/apereo-cas-audit-logs.yaml

raw symbols SCIP
1 onsuccess: next_stage
2 #debug: true
3 filter: "evt.Parsed.program == 'cas'"
4 name: jusabatier/apereo-cas-audit-logs
5 description: "Parse apereo CAS Audits logs"
6 pattern_syntax:
7 # The IP grok pattern that ships with crowdsec is buggy and does not capture the last digit of an IP if it is the last thing it matches, and the last octet starts with a 2
8 # https://github.com/crowdsecurity/crowdsec/issues/938
9 IPv4_WORKAROUND: (?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)
10 IP_WORKAROUND: (?:%{IPV6}|%{IPv4_WORKAROUND})
11 SECOND_WORKAROUND: '(?:[0-5]?[0-9]|60)?'
12 TIMESTAMP_WORKAROUND: '%{YEAR}-%{MONTHNUM}-%{MONTHDAY}[T ]%{HOUR}:?%{MINUTE}(?::?%{SECOND_WORKAROUND})?%{ISO8601_TIMEZONE}?'
13 CAS_AUTH_FAIL: '^%{TIMESTAMP_WORKAROUND:time}(?:,\d+)? %{LOGLEVEL:loglevel} \[%{DATA:threadname}\] - (.*)\|CAS\|(.*)\|AUTHENTICATION_FAILED\|%{USERNAME:cas_invalid_user}\|%{IP_WORKAROUND:cas_client_ip}\|(.*)$'
14 nodes:
15 - grok:
16 name: "CAS_AUTH_FAIL"
17 apply_on: message
18 statics:
19 - meta: log_type
20 value: cas_failed-auth
21 - meta: target_user
22 expression: "evt.Parsed.cas_invalid_user"
23 - target: evt.StrTime
24 expression: evt.Parsed.time
25 statics:
26 - meta: service
27 value: cas
28 - meta: source_ip
29 expression: "evt.Parsed.cas_client_ip"