left4me/l4d2web/services
mwiegand 8971b23617
refactor(sandbox): collapse l4d2-sandbox user into left4me
The hardening refactor that just landed closes the same-uid attack
surface (FS view, ptrace, /proc visibility, signals) for the web +
gameserver units via systemd directives plus system-wide
kernel.yama.ptrace_scope=2. Keeping the script-sandbox on a separate
uid was the inconsistent half-step — defense-in-depth only, with
build-time-idmap complexity attached. One principle wins: harden
once, share the uid.

scripts/libexec/left4me-script-sandbox: drop the idmap block (uid
lookups, STAGING setup, cleanup_staging trap, mount --bind
--map-users), switch User=/Group= to left4me, point BindPaths at
\$OVERLAY_DIR directly. Header comment updated to reflect
hardening-not-uid as the same-uid defense. nsenter self-wrap kept —
it's about mount-namespace escape, not uid.

Tests + comments + companion docs updated. Build-time-idmap and
overlay-idmap plans marked SUPERSEDED; user-uid-split spec revised
to "1 user is correct"; one-line update notes on the hardening
specs and the build-overlay-unit-design.

Companion ckn-bw commit removes the l4d2-sandbox user + group and
tightens /var/lib/left4me from 0711 → 0755 (the traverse-only mode
was specifically for the sandbox uid).
2026-05-15 15:50:57 +02:00
..
__init__.py chore(l4d2): flatten component layout 2026-05-05 23:47:06 +02:00
host_commands.py fix(l4d2-web): keep SSE log stream from pinning gunicorn threads 2026-05-08 11:18:56 +02:00
job_worker.py job_worker: don't duplicate streamed stderr on HostCommandError 2026-05-10 22:52:54 +02:00
l4d2_facade.py feat(l4d2-web): emit hostname in spec config with ephemeral fallback 2026-05-13 15:31:12 +02:00
live_state_poller.py feat(live-state): start daemon poller, prune history, close stuck sessions 2026-05-12 22:10:55 +02:00
overlay_builders.py refactor(sandbox): collapse l4d2-sandbox user into left4me 2026-05-15 15:50:57 +02:00
overlay_creation.py feat(l4d2-web): overlay path helpers and creation 2026-05-07 16:38:39 +02:00
overlay_files.py feat(files-overlay): user-managed file content as a third overlay type 2026-05-09 18:59:32 +02:00
rate_limit.py rate-limit: extract generic helper, reuse from login 2026-05-11 21:45:51 +02:00
rcon.py chore(l4d2-web): clarify rcon req_id constants and helper docstring 2026-05-14 21:24:41 +02:00
security.py feat(l4d2-web): server identity by id, name as display label 2026-05-08 19:22:09 +02:00
server_identity.py feat(l4d2-web): server identity by id, name as display label 2026-05-08 19:22:09 +02:00
spec_yaml.py chore(l4d2): flatten component layout 2026-05-05 23:47:06 +02:00
status.py chore(l4d2): flatten component layout 2026-05-05 23:47:06 +02:00
steam_users.py feat(live-state): use Steam avatarfull (184x184), downscale in CSS 2026-05-12 23:17:51 +02:00
steam_workshop.py feat(l4d2-web): steam workshop API client and downloader 2026-05-07 16:37:39 +02:00
timeago.py refactor(l4d2-web): detail-page UI — single panel, soft border, footer Delete 2026-05-09 01:26:57 +02:00
workshop_paths.py feat(l4d2-web): overlay path helpers and creation 2026-05-07 16:38:39 +02:00