Hi all,
on NS8 the Traefik static configuration is created with accessLog: {}. With this default Traefik drops every request header, so the User-Agent field of the access log line is always "-" (the example in the ns8-traefik README shows it too).
This limits log-based security tools:
- the official ns8-crowdsec module installs
crowdsecurity/base-http-scenarios, but scenarios such ashttp-bad-user-agentcan never match, because the User-Agent is always"-"; - external SIEMs reading the access log (we send it to Wazuh) cannot spot known scanners or Shellshock attempts in the User-Agent, and cannot skip the 404s of legitimate search engine crawlers.
Proposal: keep only the User-Agent header and keep dropping all the others. Referer can carry tokens or OAuth codes, and Authorization/Cookie must never be logged.
accessLog:
fields:
headers:
defaultMode: drop
names:
User-Agent: keep
- new installations: in the
create-moduleaction; - existing installations: an idempotent step in
update-module.d(likeadd_metrics) that changes only the defaultaccessLog: {}and leaves disabled or customized access logs alone.
I have a small patch ready (3 files, about 20 lines). If you agree, I’d open an issue in NethServer/dev and a PR on ns8-traefik. Would you prefer this as the new default, or as an opt-in action like set-trusted-proxies?
Thanks!