-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Don't AuditLog Json format logging to one file in libmodsecurity? #1493
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @truman-test, That is an interesting question. A regular JSON is a self contained document. It demands a clear start and a clear end. For example:
Example 1. We have: { and }, starting and closing the document.
Example 2. We have: [ and ], starting and closing the document. So, having a single entry in a single file seems fine as it is written in a single shot. To have all the logs in a single JSON is more complicated, as it may demand to use the same techniques that are used on streaming JSON. It could be, for instance, a simple concatenated JSON, but I am afraid that it may not be what you are looking for. What is the target application that you are interested to use to read those logs? |
Hello @zimmerle , I use libmodsecurity to do full logging(Request / Response) on Nginx + HTTPS traffic The logged files are sent to OpenNIDS (ex Suricata, Snort) using tail or socat for security monitoring. + HTTPS Traffic Monitoring So I hope logging is supported as a single file in json format when SecAuditLogType: Serial |
Hi @truman-test, Can you provide the links for the documentation with the expected JSON type? |
Hello @zimmerle , link : https://gist.github.com/zimmerle/b22660ab33bd6df444fd ex) |
Closed as part of #1583. |
@victorhora @zimmerle |
As a result of testing with patch version, there is no Response body contents. |
To save the json format log in libmodsecurity, i know need to set it as follows: SecAuditLogType Parallel
( Parallel configuration is probably the same as setting up Concurrent. )
( https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#secauditlogtype )
However, when I set it to SecAuditLogType: Parallel, SecAuditLogStorageDir setting should be set, so can not logging to one file.
So, I set it to SecAuditLogType: Serial to logging in one file.
Serial can not be saved in Json format. Do you plan to support it?
Source Code: https://github.com/SpiderLabs/ModSecurity/blob/v3/master/src/audit_log/writer/serial.cc
====
owasp-modsecurity/ModSecurity-nginx#47 (comment)
The text was updated successfully, but these errors were encountered: