hyperhive/hive-priv-sock
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas 83c0e4b4bf require network isolation, deleting the residual non-isolated branch
Per mara on #3725: the on/off toggle is removed, and required env vars
unset lead to a crash. HIVE_NETWORK_ISOLATION is gone from
hive-network.nix -- it was the toggle.

Validation happens once at daemon startup rather than per container.
The variables are process-global, so a bad value breaks every container
rather than one: failing at boot gives a single diagnostic naming the
bad value, and cannot reach a state where some containers were
configured before it was noticed.

Option<NetworkIsolation> collapses to NetworkIsolation through the wire
type, client and helper, which deletes the branch instead of leaving it
unreachable. serde(default) is dropped on that field deliberately: a
request omitting isolation is now rejected rather than defaulting to a
container sharing the host's network namespace.

What this replaces was a silent security downgrade. Of the four ways
into the old fallback, two logged nothing at all -- a container came up
without isolation and the journal agreed it was fine.

Doc comments that still described the removed branch are updated
(argus's note on #3723 scoped that to this issue). The hive-priv one is
a minimal edit inside the block #3723 rewrites; de-splicing is that
PR's job.
2026-08-30 03:32:08 +02:00
..
src require network isolation, deleting the residual non-isolated branch 2026-08-30 03:32:08 +02:00
Cargo.toml docs(#2627): add READMEs for hive-jobq + the socket wire crates 2026-07-23 12:34:22 +02:00
README.md docs(#2627): add READMEs for hive-jobq + the socket wire crates 2026-07-23 12:34:22 +02:00

hive-priv-sock

Wire types for the hive-priv privileged-helper socket (/run/hive/priv.sock) — the contract between hive-priv (the root helper, server) and hive-c0re (client, via its priv_client).

Why it's its own crate

Split out of hive-sh4re so hive-priv — a root-privileged binary — depends on just this narrow protocol crate instead of the much larger daemon-shared crate. Two wins: fewer dependencies in a root process's supply chain, and a small, self-contained interface makes the privilege boundary this crate encodes easier to audit. Mirrors hive-host-sock's split for the host admin socket.

Shape

Serde-derived request/response types only — no server or client logic. Both sides import them so the shapes stay in sync. See docs/boundary.md + docs/security.md for the privilege boundary these types sit on, and hive-priv/README for the helper itself.