Watch
0
0
Fork
You've already forked hyperhive
0
hyperhive/nix/module-eval
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas e9cec0da21 swarm-bao: write every swarm-* grant as a bao granter, not with a 24h token
Every unit that writes a bao policy or cert-auth role ran only while the
operator-placed bootstrap token existed, and skipped silently otherwise.
The token lives 24h, so on any real swarm a PR adding or changing a grant
deployed with its unit skipped, and each one needed a manual token refresh
(plus a root `bao policy write` when it added a path).

A `bao-granter` principal now writes them. Its leaf is minted by
swarm-bao-pki on the store host (0600 root, never copied off it), and its
policy covers `swarm-*` policies, `swarm-*` cert-auth roles and
`pki/roles/swarm-*` by glob, plus the mount and services-root paths the
controller's unit already used. All ten granting units
(controller, secret-publisher, matrix-ctl, matrix-token, queue-agent,
grafana-oidc, otel-oidc, forwarder-oidc, services-issuer, nats-tls) log in
with it instead of reading the token. They keep the 2880 x 30s retry, now
require swarm-bao-pki, and when the store refuses the granter they fail
and print the one-time step instead of skipping.

swarm-bao-granter-role is the one unit left on the token. It enables the
auth mounts (moved out of the controller's unit) and writes the granter's
own policy and role. The bootstrap policy is renamed `bao-bootstrap` and
shrinks to those five stanzas; it is shipped at
/etc/hyperhive/bao-bootstrap-policy.hcl. The old name `swarm-bootstrap`
matched the granter's own `swarm-*` glob.

The granter's CN joins certAuthCns, so no hive can be named into its role.
An assertion keeps both pki role names under `swarm-`. With no client CA
the granting units no longer render, and a warning says so.

module-eval pins the granter's policy stanza by stanza, what it cannot
reach, that every call a granting unit makes is granted, and that only
swarm-bao-granter-role reads the token.

Refs #4704
2026-09-27 22:57:46 +02:00
..
agent-forge-bao.nix module-eval: pin the agent forge-token fetch and tea-login's removal 2026-09-24 17:48:53 +02:00
agent-icon.nix nix: split module-eval into per-subsystem checks 2026-09-20 04:25:54 +02:00
agent-matrix.nix hive-matrix-mcp: read the main account's token from the store too 2026-09-25 08:31:01 +02:00
agent-memory.nix nix: split module-eval into per-subsystem checks 2026-09-20 04:25:54 +02:00
agent-otel.nix module-eval: assert the severity table once, not once per tier 2026-09-20 14:23:56 +02:00
agent-plugins.nix nix: split module-eval into per-subsystem checks 2026-09-20 04:25:54 +02:00
agent-queue-bao.nix agent: fetch this agent's own swarm-queue credential from the store 2026-09-21 20:44:52 +02:00
agent-user.nix hive-priv: create agent socket dirs on start; drop hyperhive-agents.conf 2026-09-27 18:55:33 +02:00
bao-basics.nix nix: split module-eval into per-subsystem checks 2026-09-20 04:25:54 +02:00
bao-controller.nix swarm-controller: mint each agent's matrix account with the swarm's token 2026-09-25 08:31:01 +02:00
bao-grants.nix swarm-bao: write every swarm-* grant as a bao granter, not with a 24h token 2026-09-27 22:57:46 +02:00
bao-matrix-reader.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
bao-otel-collector.nix swarm-bao: stop linking the container's journal onto the host 2026-09-25 04:02:08 +02:00
core-toggle.nix module-eval: read the services-leaf narrowing off a forge host 2026-09-26 01:39:22 +02:00
forge-placement.nix hive-forge: a first authelia login creates the forge account 2026-09-25 08:29:56 +02:00
grafana.nix swarm-bao: stamp collector's service.name as "bao" 2026-09-25 08:30:25 +02:00
hive-otel.nix swarm-bao: give the store's collector an explicit self-telemetry port 2026-09-23 18:04:33 +02:00
hive-tls.nix swarm-bao: write every swarm-* grant as a bao granter, not with a 24h token 2026-09-27 22:57:46 +02:00
journald-severity.nix module-eval: assert the severity table once, not once per tier 2026-09-20 14:23:56 +02:00
lib.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00
matrix-core.nix nix: split module-eval into per-subsystem checks 2026-09-20 04:25:54 +02:00
name-guards.nix swarm-bao: write every swarm-* grant as a bao granter, not with a 24h token 2026-09-27 22:57:46 +02:00
nats-authelia.nix nix: address the swarm IdP by its domain, not by who runs it 2026-09-21 18:14:28 +02:00
nats-tls.nix swarm-bao: write every swarm-* grant as a bao granter, not with a 24h token 2026-09-27 22:57:46 +02:00
secret-publisher.nix nix: the store's own collector scrapes its metrics listener 2026-09-21 17:19:52 +02:00
swarm-otel-core.nix swarm-bao: write every swarm-* grant as a bao granter, not with a 24h token 2026-09-27 22:57:46 +02:00
swarm-otel-identity.nix swarm-bao: refuse a remote reader that named seven of the eight leaves 2026-09-23 10:11:42 +02:00
swarm-services-switch.nix nix: gate hive-c0re on deploy.hive-controller.enable, drop hyperhive.enable 2026-09-26 01:19:49 +02:00