chibenwa commented on code in PR #1743:
URL: https://github.com/apache/james-project/pull/1743#discussion_r1350110598
##########
third-party/crowdsec/sample-configuration/parsers/james-auth.yaml:
##########
@@ -0,0 +1,27 @@
+onsuccess: next_stage
+debug: true
+filter: "evt.Parsed.program == 'james'"
+name: linagora/james-connect-security-log
+description: "Parser for James Connect Security Log"
+
+pattern_syntax:
+ JAMES_AUTH_FAIL:
'\{"timestamp":"%{DATA:time}","level":"%{LOGLEVEL:level}","thread":"%{DATA:thread}","mdc":{"protocol":"%{DATA:protocol}","ip":"%{IPV4:ip}","host":"%{IPV4:host}","action":"LOGIN","login-user":"%{EMAILADDRESS:loginUser}","sessionId":"%{DATA:sessionId}","user":"%{DATA:user}"\},"logger":"%{JAVACLASS:logger}","message":"User
%{DATA:loginUser} failed authentication","context":"%{DATA:context}"\}'
Review Comment:
Did you open a bug report for your issue with JSON format?
> IMO, it is seldom when the field reorder but maybe there will be some new
added fields in the future so I will reconsider this pattern syntax
We already know it will break hard in the future. We should reconsider it
now.
What does it take to write a parser in CrowdSec?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]