snoop: redact connect-notice IP + geo/ASN to non-netadmin opers

Per-viewer rendering via new snotice_c_gated: only opers whose type is in
snoop_sensitive_opertype (default netadmin) see the raw IP and geo/ASN;
lower opers see a 🔒 restricted redaction. Logs keep the full line.
This commit is contained in:
Jean Chevronnet 2026-08-29 00:32:11 +00:00
parent 0af2ab7d21
commit d73f68f278
No known key found for this signature in database
GPG key ID: 439666D63A9477E4
4 changed files with 97 additions and 22 deletions

View file

@ -456,6 +456,11 @@ logging {
# log_json "/var/log/echoircd/events.jsonl";
# --- snoop_stderr: also echo the server-notice stream to stderr ---
# snoop_stderr yes;
# --- snoop_sensitive_opertype: which oper type(s) may see the sensitive fields
# of the "Client connecting" notice (the raw IP and the geo/ASN). Other opers
# get a "🔒 restricted" redaction; the server log always keeps the full line.
# Repeatable; default netadmin. Use "*" to let every +c oper see them. ---
# snoop_sensitive_opertype netadmin;
# --- metrics: OpenMetrics/Prometheus scrape endpoint (plaintext HTTP GET);
# bind privately or behind a proxy. ---
# metrics_bind "127.0.0.1:9109";