Idunn/deploy/idunn-yggdrasil.service

94 lines
4.7 KiB
SYSTEMD
Raw Normal View History

[Unit]
Make the public entry point describe the binary that actually ships The README and unit file I wrote at extraction documented the previous generation's CLI. Running the deployed ExecStart against a build of this repository returns `unknown Idunn command "--swarm-profile"`: commit 330e4cd rebuilt Idunn around typed authority ports and a test now asserts that --deploy-command, --restart-command and --swarm-profile are rejected. Anyone following the README would have installed a unit that crashloops on exec every 5 seconds under Restart=always. Corrected against the binary, not against the old docs: - deploy/idunn-yggdrasil.service now invokes `idunn serve` with the real flags. systemd-analyze verify passes on yggdrasil. /var/lib/gamecult/odin moved from ReadWritePaths to ReadOnlyPaths -- Idunn only reads Odin's topology correlation (pull_all_read_only_snapshot, absent store yields None), and it gates deployment promotion only: continuity never consults it, per stale_odin_provider_receipt_cannot_gate_continuity_restart. - README documents the three declarative commands, and adds a section on the recipe/binding split, which is the security model: capability lives in the target's repo, privilege lives in the host binding, and a binding that omits an affordance the recipe derives fails admit(). - Corrected two inherited claims. The distinct-brake check is per-binding validation ("deployment and lifecycle brakes are identical"), not a startup check. And the "inputs: nothing else" claim was false -- the Odin correlation read is a real, deliberate exception and now says so. The legacy actuator moves to deploy/legacy/ rather than being deleted: it is what is installed and running, so it is the before-side of the migration. Its README maps each shell mechanism to the contract that replaced it, and preserves the eleven-target inventory read out of deployment_target_policy(). Seven of the eleven are pinned to a codex/ branch rather than main. docs/guide.md is marked as the previous generation rather than silently carrying dead commands, and docs/migration.md is new: per-target order, what to fix before carrying a ref forward, and why the authority cuts over last. Also fixes a broken cross-link in authority-map.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 23:15:46 +02:00
Description=Idunn deployment admission and daemon-survival authority
After=network-online.target docker.service
Wants=network-online.target
Make the public entry point describe the binary that actually ships The README and unit file I wrote at extraction documented the previous generation's CLI. Running the deployed ExecStart against a build of this repository returns `unknown Idunn command "--swarm-profile"`: commit 330e4cd rebuilt Idunn around typed authority ports and a test now asserts that --deploy-command, --restart-command and --swarm-profile are rejected. Anyone following the README would have installed a unit that crashloops on exec every 5 seconds under Restart=always. Corrected against the binary, not against the old docs: - deploy/idunn-yggdrasil.service now invokes `idunn serve` with the real flags. systemd-analyze verify passes on yggdrasil. /var/lib/gamecult/odin moved from ReadWritePaths to ReadOnlyPaths -- Idunn only reads Odin's topology correlation (pull_all_read_only_snapshot, absent store yields None), and it gates deployment promotion only: continuity never consults it, per stale_odin_provider_receipt_cannot_gate_continuity_restart. - README documents the three declarative commands, and adds a section on the recipe/binding split, which is the security model: capability lives in the target's repo, privilege lives in the host binding, and a binding that omits an affordance the recipe derives fails admit(). - Corrected two inherited claims. The distinct-brake check is per-binding validation ("deployment and lifecycle brakes are identical"), not a startup check. And the "inputs: nothing else" claim was false -- the Odin correlation read is a real, deliberate exception and now says so. The legacy actuator moves to deploy/legacy/ rather than being deleted: it is what is installed and running, so it is the before-side of the migration. Its README maps each shell mechanism to the contract that replaced it, and preserves the eleven-target inventory read out of deployment_target_policy(). Seven of the eleven are pinned to a codex/ branch rather than main. docs/guide.md is marked as the previous generation rather than silently carrying dead commands, and docs/migration.md is new: per-target order, what to fix before carrying a ref forward, and why the authority cuts over last. Also fixes a broken cross-link in authority-map.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 23:15:46 +02:00
# Deployment runners use Docker, but continuity actuation does not. Warm,
# fence, promote, drain and restart all run on systemd; only the build step
# is containerized, and worktree-tree recipes skip even that. A hard
# Requires= would let a Docker outage stop Idunn itself, killing daemon
# survival for every target. Want it, order after it, and let individual
# container-backed deploys fail on their own if it is absent.
Wants=docker.service
[Service]
Type=simple
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
# Idunn runs privileged, and this is deliberate rather than laziness. It is the
# actuation authority: it starts transient units with systemd-run, writes unit
# files and route configuration, reloads nginx, and drives Docker. It invokes
# those programs directly -- there is no sudo anywhere in the source -- so a
# confined User= cannot actuate anything.
#
# The privilege separation is *internal*, not at the process boundary. Source
# freezing runs as the unprivileged idunn user via --source-uid/--source-gid
# (both validated as non-zero); the privileged driver never opens Git. What
# stops a compromised target repository from using that privilege is that Idunn
# accepts no imperative input: a recipe declares capability, the operator
# binding grants affordances, and cli_exposes_only_declarative_commands asserts
# there is no way to hand the daemon a command string.
#
# The previous generation ran as User=idunn and reached root through a narrow
# sudoers grant onto a shell actuator. That inverted the safety story: the
# process was confined but the thing it invoked was an unaudited root shell.
User=root
Group=root
# Idunn discovers no authority implicitly. Every store is named here, and every
# one of them is Idunn's own -- no path below belongs to a managed target.
Make the public entry point describe the binary that actually ships The README and unit file I wrote at extraction documented the previous generation's CLI. Running the deployed ExecStart against a build of this repository returns `unknown Idunn command "--swarm-profile"`: commit 330e4cd rebuilt Idunn around typed authority ports and a test now asserts that --deploy-command, --restart-command and --swarm-profile are rejected. Anyone following the README would have installed a unit that crashloops on exec every 5 seconds under Restart=always. Corrected against the binary, not against the old docs: - deploy/idunn-yggdrasil.service now invokes `idunn serve` with the real flags. systemd-analyze verify passes on yggdrasil. /var/lib/gamecult/odin moved from ReadWritePaths to ReadOnlyPaths -- Idunn only reads Odin's topology correlation (pull_all_read_only_snapshot, absent store yields None), and it gates deployment promotion only: continuity never consults it, per stale_odin_provider_receipt_cannot_gate_continuity_restart. - README documents the three declarative commands, and adds a section on the recipe/binding split, which is the security model: capability lives in the target's repo, privilege lives in the host binding, and a binding that omits an affordance the recipe derives fails admit(). - Corrected two inherited claims. The distinct-brake check is per-binding validation ("deployment and lifecycle brakes are identical"), not a startup check. And the "inputs: nothing else" claim was false -- the Odin correlation read is a real, deliberate exception and now says so. The legacy actuator moves to deploy/legacy/ rather than being deleted: it is what is installed and running, so it is the before-side of the migration. Its README maps each shell mechanism to the contract that replaced it, and preserves the eleven-target inventory read out of deployment_target_policy(). Seven of the eleven are pinned to a codex/ branch rather than main. docs/guide.md is marked as the previous generation rather than silently carrying dead commands, and docs/migration.md is new: per-target order, what to fix before carrying a ref forward, and why the authority cuts over last. Also fixes a broken cross-link in authority-map.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 23:15:46 +02:00
ExecStart=/usr/local/bin/idunn serve \
--state-store /var/lib/gamecult/idunn/control.cc \
--bindings-dir /etc/gamecult/idunn/bindings \
--source-root /var/lib/gamecult/idunn/sources \
--staging-root /var/lib/gamecult/idunn/staging \
--topology-store /var/lib/gamecult/idunn-projection/topology.cc \
Make the public entry point describe the binary that actually ships The README and unit file I wrote at extraction documented the previous generation's CLI. Running the deployed ExecStart against a build of this repository returns `unknown Idunn command "--swarm-profile"`: commit 330e4cd rebuilt Idunn around typed authority ports and a test now asserts that --deploy-command, --restart-command and --swarm-profile are rejected. Anyone following the README would have installed a unit that crashloops on exec every 5 seconds under Restart=always. Corrected against the binary, not against the old docs: - deploy/idunn-yggdrasil.service now invokes `idunn serve` with the real flags. systemd-analyze verify passes on yggdrasil. /var/lib/gamecult/odin moved from ReadWritePaths to ReadOnlyPaths -- Idunn only reads Odin's topology correlation (pull_all_read_only_snapshot, absent store yields None), and it gates deployment promotion only: continuity never consults it, per stale_odin_provider_receipt_cannot_gate_continuity_restart. - README documents the three declarative commands, and adds a section on the recipe/binding split, which is the security model: capability lives in the target's repo, privilege lives in the host binding, and a binding that omits an affordance the recipe derives fails admit(). - Corrected two inherited claims. The distinct-brake check is per-binding validation ("deployment and lifecycle brakes are identical"), not a startup check. And the "inputs: nothing else" claim was false -- the Odin correlation read is a real, deliberate exception and now says so. The legacy actuator moves to deploy/legacy/ rather than being deleted: it is what is installed and running, so it is the before-side of the migration. Its README maps each shell mechanism to the contract that replaced it, and preserves the eleven-target inventory read out of deployment_target_policy(). Seven of the eleven are pinned to a codex/ branch rather than main. docs/guide.md is marked as the previous generation rather than silently carrying dead commands, and docs/migration.md is new: per-target order, what to fix before carrying a ref forward, and why the authority cuts over last. Also fixes a broken cross-link in authority-map.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 23:15:46 +02:00
--idunn-identity-store /var/lib/gamecult/idunn/idunn-service-identity.cc \
--odin-correlation-store /var/lib/gamecult/odin/topology.cc \
Make the public entry point describe the binary that actually ships The README and unit file I wrote at extraction documented the previous generation's CLI. Running the deployed ExecStart against a build of this repository returns `unknown Idunn command "--swarm-profile"`: commit 330e4cd rebuilt Idunn around typed authority ports and a test now asserts that --deploy-command, --restart-command and --swarm-profile are rejected. Anyone following the README would have installed a unit that crashloops on exec every 5 seconds under Restart=always. Corrected against the binary, not against the old docs: - deploy/idunn-yggdrasil.service now invokes `idunn serve` with the real flags. systemd-analyze verify passes on yggdrasil. /var/lib/gamecult/odin moved from ReadWritePaths to ReadOnlyPaths -- Idunn only reads Odin's topology correlation (pull_all_read_only_snapshot, absent store yields None), and it gates deployment promotion only: continuity never consults it, per stale_odin_provider_receipt_cannot_gate_continuity_restart. - README documents the three declarative commands, and adds a section on the recipe/binding split, which is the security model: capability lives in the target's repo, privilege lives in the host binding, and a binding that omits an affordance the recipe derives fails admit(). - Corrected two inherited claims. The distinct-brake check is per-binding validation ("deployment and lifecycle brakes are identical"), not a startup check. And the "inputs: nothing else" claim was false -- the Odin correlation read is a real, deliberate exception and now says so. The legacy actuator moves to deploy/legacy/ rather than being deleted: it is what is installed and running, so it is the before-side of the migration. Its README maps each shell mechanism to the contract that replaced it, and preserves the eleven-target inventory read out of deployment_target_policy(). Seven of the eleven are pinned to a codex/ branch rather than main. docs/guide.md is marked as the previous generation rather than silently carrying dead commands, and docs/migration.md is new: per-target order, what to fix before carrying a ref forward, and why the authority cuts over last. Also fixes a broken cross-link in authority-map.md. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-05 23:15:46 +02:00
--odin-trust-anchor /etc/gamecult/idunn/odin-topology-anchor.cc \
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
--deployment-brake-operator-anchor /etc/gamecult/idunn/deployment-brake-operator-anchor.cc \
--source-uid 986 \
--source-gid 978
Restart=always
RestartSec=5
TimeoutStopSec=20
KillSignal=SIGINT
UMask=027
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
# /run/idunn, for the route driver's preflight staging. systemd creates and
# removes it with the unit, so it never survives as stale state across a
# restart.
RuntimeDirectory=idunn
RuntimeDirectoryMode=0750
PrivateTmp=yes
ProtectHome=yes
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
# ProtectSystem=full keeps /usr and /etc read-only, then the paths Idunn
# actually actuates are re-opened one at a time. This list is the blast radius,
# and it is the reason running as root is tolerable: root plus an enumerated
# write set is narrower than root everywhere.
ProtectSystem=full
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
ReadWritePaths=/etc/gamecult/idunn
ReadWritePaths=/etc/nginx/idunn-stream-routes
ReadWritePaths=/etc/systemd/system
# idunn-projection is deliberately outside Idunn's own 0750 directory: the
# topology store is Idunn's *published* surface, and every managed target must
# read it to verify its own Expected incarnation against the Idunn anchor. It
# was inside the private root, where no workload could traverse to it.
ReadWritePaths=/var/lib/gamecult/idunn /var/lib/gamecult/idunn-authority /var/lib/gamecult/idunn-projection
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
ReadWritePaths=/srv/build
# One entry per managed target: its runtime root, state root and release root.
# A target Idunn cannot write is a target it cannot deploy, so this list grows
# by exactly three paths per migration and is the honest blast radius.
ReadWritePaths=/etc/gamecult/heimdall /var/lib/gamecult/heimdall /srv/heimdall/app
# Odin is a managed target like any other now, so its three roots are writable
# on the same terms. This used to be ReadOnlyPaths, on the reasoning that Idunn
# only *reads* Odin's correlation store to gate promotion. That remains true of
# the correlation itself -- continuity never consults it, see
# stale_odin_provider_receipt_cannot_gate_continuity_restart, and an absent
Land the nginx stream context; run Idunn as root, and say why in the unit Shared prerequisite for every routed target, done on yggdrasil. Debian ships ngx_stream_module as a separate dynamic package and it was absent: nginx -V showed --with-stream=dynamic with no .so. Installed libnginx-mod-stream at 1.26.3-3+deb13u7, matching the running nginx exactly so nothing else moved, added a top-level stream block including /etc/nginx/idunn-stream-routes/*.conf, and created that directory root:idunn 0775. nginx -t passed before the reload; gamecult.org and heimdall.gamecult.org/healthz both returned 200 after it. Backup at /root/nginx.conf.bak-20260906-stream. Worth recording how the module check nearly went wrong: the first `nginx -V` ran without sudo, hit "command not found" because the binary is not on the unprivileged PATH, and reported NO STREAM MODULE. That is the estate's own trap -- a failed read presented as a negative result -- caught only because the answer looked too convenient. The larger correction: the unit I wrote yesterday ran User=idunn, and this generation cannot work that way. There is no sudo anywhere in Idunn's source; it calls systemctl, systemd-run, nginx and docker directly, so a confined user actuates nothing. deployment-authority.md states the intended model plainly -- freeze source as idunn, copy into a root-owned actuation stage, the privileged driver never opens Git -- and --source-uid/--source-gid are validated as non-zero, which only makes sense for a privileged daemon dropping down for source work. So the unit now runs as root with --source-uid 986 --source-gid 978, keeps ProtectSystem=full and re-opens each actuated path individually, and adds RuntimeDirectory=idunn for the route driver's preflight staging. The comment block explains the tradeoff rather than leaving the next reader to infer it: privilege separation is internal, and what makes it tolerable is that Idunn accepts no imperative input. That is a genuine increase in blast radius over a confined process, and migration.md says so instead of selling it. The counter-argument is that the old shape was confined in name only -- a sandboxed process whose sudo grant pointed at an unaudited root shell with eleven hardcoded targets. systemd-analyze verify passes on the rewritten unit. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-06 15:00:04 +02:00
# store yields None rather than an error, so Odin being down blocks promotions
# and leaves daemon survival untouched. But a target Idunn cannot write is a
# target it cannot deploy, and Odin has to be deployable: it is the bootstrap
# target every other target's warming presence is observed through.
ReadWritePaths=/etc/gamecult/odin /var/lib/gamecult/odin /srv/odin
[Install]
WantedBy=multi-user.target