server
server
¶
The verdict helper — a minimal varlink server wrapping terok-shield.
One process, one socket, one method (Apply). Runs as its own
systemd user unit (terok-clearance-verdict.service) so the
companion hub unit can take full seccomp + mount-ns hardening without
tripping the kernel's NNP requirement and SELinux's denial of the
unconfined_t → container_runtime_t transition that rootless podman
needs every time shield exec's podman unshare nsenter nft.
Stateless: no authz decisions, no request-id binding, no fan-out. The hub already validated the verdict triple before forwarding; the helper exists solely to isolate the hostile exec path from the hardened receive path.
VerdictServer(*, socket_path=None, shield_binary=None)
¶
Per-process wrapper around the Apply varlink interface.
The hub is the only legitimate client; SO_PEERCRED on the unix
socket rejects peers with a different UID, and
bind_hardened leaves the
socket mode 0600 for the lifetime of the server.
Configure the socket + shield executable path.
Source code in src/terok_clearance/verdict/server.py
start()
async
¶
Bind the varlink server and start accepting hub verdict calls.
Source code in src/terok_clearance/verdict/server.py
stop()
async
¶
Close the varlink server; existing in-flight Apply calls finish first.
Source code in src/terok_clearance/verdict/server.py
serve()
async
¶
Bring the verdict helper online and stay up until SIGINT/SIGTERM.
Mirrors terok_clearance.hub.server.serve so the CLI layer
can dispatch both entrypoints through the same asyncio.run
pattern.