Log importers: their own system user, openchronology-logs (#501)
- github
- github/openchronology/timeline-app
- commit
- main
- github/athanclark
The syslog receiver and the journald follower ran as openchronology, so a compromise of the network-facing receiver could read openchronology.env (DATABASE_URL, AUTH_ENCRYPTION_KEY, Resend and OAuth secrets) and log in to the database by peer authentication. They now run as openchronology-logs, created by every package (Debian adduser, RPM %pre useradd, Arch sysusers.d, FreeBSD pw), which reads only their env files and the files those name. - Units and the FreeBSD rc script run as openchronology-logs; the follower has systemd-journal as its main group, so the receiver (same user, no journal group) cannot trace it. Both hide other users' processes. - syslog.env and journald.env are created root:openchronology-logs 0640; /etc/openchronology is 0751 so the user can reach them. - openchronology-log-files, run on install and upgrade, moves the env files and the files they name (SYSLOG_ROUTES, JOURNALD_ROUTES, JOURNALD_SSH_KEY, JOURNALD_KNOWN_HOSTS) from openchronology to the new user: only regular single-link files, through no symbolic link, in folders only root can change, never openchronology.env, and not following names in an env file openchronology could write. - The package upgrade test checks the move, and that a symlinked file stays. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_011fFY8eruEi1xAkkMBni13B https://github.com/openchronology/timeline-app/commit/4ba11722b3d0a08c3769c28ba3331387dfeced9a
Related
Open Log importers: their own system user, openchronology-logs (#501) in the timeline