owasp-modsecurity / owasp-modsecurity/ModSecurity

Add interface in libModSecurity for reopening log files

Open
#1,968 3 comments 0 reactions 2 assignees View on GitHub

@victorhora is already working on this.

Since Nov 28, 2018.

3.x new feature RIP - libmodsecurity RIP - Type - Feature
Dominant language
C++
Stars
9.8k
Forks
1.8k
Avg merge
2h 46m
Merged PRs (30d)
1

Description

This is related with feature request https://github.com/SpiderLabs/ModSecurity-nginx/issues/121

Modsecurity should reopen audit log on these two signals for proper logrotate operation.

As noted at https://github.com/SpiderLabs/ModSecurity-nginx/issues/121#issuecomment-420619429, we could leverage a similar approach as described at https://forum.nginx.org/read.php?29,247488,247500#msg-247500 (i.e. use standard nginx API to open some stub-file with ngx_conf_open_file(), add required handler, and use it for detecting USR1 and HUP signals from master process)

But it seems like libModSecurity currently does not have a nice interface to initiate audit/debug log files reopening by connector's request.

There's a PoC on how we could accomplish that on the connector at https://github.com/SpiderLabs/ModSecurity-nginx/issues/121#issuecomment-442416602 as a starting point.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.