conf: change default socket path to /var/run/logcorrelator/http.sock

- Update mod_reqin_log.conf example configuration
- Update README.md documentation and examples
- Update architecture.yml specification
- Update test_config_parsing.c test case

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Jacquin Antoine
2026-03-01 01:49:39 +01:00
parent baf8ed801b
commit 3e9ff25033
4 changed files with 9 additions and 9 deletions

View File

@ -66,7 +66,7 @@ LoadModule reqin_log_module modules/mod_reqin_log.so
JsonSockLogEnabled On
# Unix socket path
JsonSockLogSocket "/var/run/mod_reqin_log.sock"
JsonSockLogSocket "/var/run/logcorrelator/http.sock"
# Headers to log (be careful not to log sensitive data)
JsonSockLogHeaders X-Request-Id X-Trace-Id User-Agent Referer
@ -147,7 +147,7 @@ import socket
import os
import json
SOCKET_PATH = os.environ.get("MOD_REQIN_LOG_SOCKET", "/var/run/mod_reqin_log.sock")
SOCKET_PATH = os.environ.get("MOD_REQIN_LOG_SOCKET", "/var/run/logcorrelator/http.sock")
# Remove existing socket file
if os.path.exists(SOCKET_PATH):
@ -199,7 +199,7 @@ These headers are silently skipped (logged at DEBUG level only).
### Socket Security
- **Socket permissions**: Default to `0o660` (owner and group only)
- **Recommended path**: `/var/run/mod_reqin_log.sock` (not `/tmp`)
- **Recommended path**: `/var/run/logcorrelator/http.sock` (not `/tmp`)
- **Environment variable**: Use `MOD_REQIN_LOG_SOCKET` to configure path
- **Group membership**: Ensure Apache user is in the socket's group
@ -227,7 +227,7 @@ ls -la /usr/lib/apache2/modules/mod_reqin_log.so
### Socket connection failures
```
[mod_reqin_log] Unix socket connect failed: /var/run/mod_reqin_log.sock
[mod_reqin_log] Unix socket connect failed: /var/run/logcorrelator/http.sock
```
- Ensure the socket consumer is running

View File

@ -163,7 +163,7 @@ configuration:
type: string
context: server-config
required_when_enabled: true
example: "/var/run/mod_reqin_log.sock"
example: "/var/run/logcorrelator/http.sock"
description: >
Filesystem path of the Unix domain socket to which JSON log lines
will be written.
@ -294,7 +294,7 @@ constraints:
- Module includes built-in blacklist of sensitive headers to prevent
accidental credential leakage (Authorization, Cookie, X-Api-Key, etc.).
- Socket permissions default to 0o660 (owner+group only) for security.
- Recommended socket path: /var/run/mod_reqin_log.sock (not /tmp).
- Recommended socket path: /var/run/logcorrelator/http.sock (not /tmp).
- Use environment variable MOD_REQIN_LOG_SOCKET to configure socket path.
- Module does not anonymize IPs; data protection is delegated to configuration.
- No requests are rejected due to logging failures.

View File

@ -10,7 +10,7 @@ JsonSockLogEnabled On
# Unix domain socket path for JSON log output
# Important: if JsonSockLogEnabled is On and this directive is missing/empty,
# Apache startup fails due to strict configuration validation.
JsonSockLogSocket "/var/run/mod_reqin_log.sock"
JsonSockLogSocket "/var/run/logcorrelator/http.sock"
# HTTP headers to include in the JSON log
# Warning: Be careful not to log sensitive headers like Authorization, Cookie, etc.

View File

@ -116,8 +116,8 @@ static void test_parse_enabled_off(void **state)
static void test_parse_socket_path_valid(void **state)
{
(void)state;
const char *result = parse_socket_path("/var/run/mod_reqin_log.sock");
assert_string_equal(result, "/var/run/mod_reqin_log.sock");
const char *result = parse_socket_path("/var/run/logcorrelator/http.sock");
assert_string_equal(result, "/var/run/logcorrelator/http.sock");
}
/* Test: Parse socket path empty */