refactor: strip DECNET tokens from container-visible surface
Rename the container-side logging module decnet_logging → syslog_bridge (canonical at templates/syslog_bridge.py, synced into each template by the deployer). Drop the stale per-template copies; setuptools find was picking them up anyway. Swap useradd/USER/chown "decnet" for "logrelay" so no obvious token appears in the rendered container image. Apply the same cloaking pattern to the telnet template that SSH got: syslog pipe moves to /run/systemd/journal/syslog-relay and the relay is cat'd via exec -a "systemd-journal-fwd". rsyslog.d conf rename 99-decnet.conf → 50-journal-forward.conf. SSH capture script: /var/decnet/captured → /var/lib/systemd/coredump (real systemd path), logger tag decnet-capture → systemd-journal. Compose volume updated to match the new in-container quarantine path. SD element ID shifts decnet@55555 → relay@55555; synced across collector, parser, sniffer, prober, formatter, tests, and docs so the host-side pipeline still matches what containers emit.
This commit is contained in:
@@ -14,16 +14,16 @@ import pytest
|
||||
from hypothesis import given, settings
|
||||
from hypothesis import strategies as st
|
||||
|
||||
from .conftest import _FUZZ_SETTINGS, make_fake_decnet_logging, run_with_timeout
|
||||
from .conftest import _FUZZ_SETTINGS, make_fake_syslog_bridge, run_with_timeout
|
||||
|
||||
|
||||
# ── Helpers ───────────────────────────────────────────────────────────────────
|
||||
|
||||
def _load_mysql():
|
||||
for key in list(sys.modules):
|
||||
if key in ("mysql_server", "decnet_logging"):
|
||||
if key in ("mysql_server", "syslog_bridge"):
|
||||
del sys.modules[key]
|
||||
sys.modules["decnet_logging"] = make_fake_decnet_logging()
|
||||
sys.modules["syslog_bridge"] = make_fake_syslog_bridge()
|
||||
spec = importlib.util.spec_from_file_location("mysql_server", "templates/mysql/server.py")
|
||||
mod = importlib.util.module_from_spec(spec)
|
||||
spec.loader.exec_module(mod)
|
||||
@@ -89,7 +89,7 @@ def test_login_packet_returns_access_denied(mysql_mod):
|
||||
|
||||
def test_login_logs_username():
|
||||
mod = _load_mysql()
|
||||
log_mock = sys.modules["decnet_logging"]
|
||||
log_mock = sys.modules["syslog_bridge"]
|
||||
proto, _, _ = _make_protocol(mod)
|
||||
proto.data_received(_login_packet(username="hacker"))
|
||||
calls_str = str(log_mock.syslog_line.call_args_list)
|
||||
|
||||
Reference in New Issue
Block a user