Secrets shouldn’t go through env either, it would be visible to other root processes
It also shouldn’t run as root imo, only elevate when required
Secrets shouldn’t go through env either, it would be visible to other root processes
It also shouldn’t run as root imo, only elevate when required
Fair on both counts, with one distinction.
On secrets: argv is readable by every local user (/proc/<pid>/cmdline is world-readable), while the environment is readable only by the same UID and by root. So the rule is about not leaking to unprivileged users on the box; against root nothing holds, since root can read the process's memory anyway. You're right that env has its own cost (children inherit it), so where a client takes a secret from a 0600 file or on stdin, that's what is used, and env is for the clients that only offer that, like PGPASSWORD for pg_dump.
On root: the service does run as root, because its job is writing nginx sites, systemd units and certificates and installing packages. What never runs as root is anything that comes from a repository: installs, builds and deploy hooks run as an unprivileged account inside a sandboxed transient systemd unit, and each app runs as its own system user. An unprivileged front with a small privileged helper would be tighter; that isn't how it works today.
Welcome to the Python community on the programming.dev Lemmy instance!
Past
November 2023
October 2023
July 2023
August 2023
September 2023