Eve library

Bellona Remote Host — Linux confinement (180.C.37.04)

Other

Revision 1

On this page

Real, reviewable confinement definitions for the Bellona Remote Host and its headless render-node adapters on Linux. Linux has no macOS-style global TCC; instead these four subsystems confine the host and gate its privileged actions:

Subsystem File Confines
AppArmor apparmor/bellona-remote-host, apparmor/bellona-remote-adapters Host + each render tool to the project root; loopback-only network; no privileged capabilities.
SELinux selinux/bellona_remote_host.te, .fc, .if The SELinux alternative (RHEL/Fedora): host domain confined to a labeled project-root type, loopback transport only, deny-by-default everything else.
PolicyKit polkit/com.bellona.remotehost.policy Explicit auth_admin actions for ScreenCast / RemoteDesktop / service-management / render-job — the host never self-grants privilege.
systemd / cgroup v2 systemd/bellona-remote.slice, systemd/bellona-remote-host.service Bounded CPU/memory/tasks for the host + adapters; kernel sandbox (NoNewPrivileges, ProtectSystem=strict, project-root-only ReadWritePaths, restricted syscalls/address-families).

The trust boundary is the operator-granted project root (/srv/bellona/projects by default). The host and every render job it spawns are confined to it; nothing writes outside it, and the only network egress is the loopback gateway tunnel.

Validate#

bash
# AppArmor — dry-run parse (no kernel load):
apparmor_parser -Q apparmor/bellona-remote-host
apparmor_parser -Q apparmor/bellona-remote-adapters

# SELinux — compile + package the module (needs checkpolicy + selinux-policy-dev):
make -f /usr/share/selinux/devel/Makefile -C selinux bellona_remote_host.pp

# PolicyKit — XML well-formedness (pkaction reads this once installed):
xmllint --noout polkit/com.bellona.remotehost.policy

# systemd — unit + cgroup directive verification:
systemd-analyze verify systemd/bellona-remote.slice
systemd-analyze verify systemd/bellona-remote-host.service
systemd-analyze security systemd/bellona-remote-host.service

Install#

bash
# AppArmor (Debian/Ubuntu):
sudo cp apparmor/bellona-remote-* /etc/apparmor.d/
sudo apparmor_parser -r -W /etc/apparmor.d/bellona-remote-host
sudo apparmor_parser -r -W /etc/apparmor.d/bellona-remote-adapters

# SELinux (RHEL/Fedora):
sudo semodule -i selinux/bellona_remote_host.pp
sudo semanage fcontext -a -t bellona_project_t '/srv/bellona/projects(/.*)?'
sudo restorecon -Rv /srv/bellona/projects

# PolicyKit:
sudo cp polkit/com.bellona.remotehost.policy /usr/share/polkit-1/actions/

# systemd:
sudo cp systemd/bellona-remote.slice systemd/bellona-remote-host.service /etc/systemd/system/
sudo systemctl daemon-reload && sudo systemctl enable --now bellona-remote-host