hyperhive/nix/host-modules
Repository files (latest commit first)
Filename Latest commit message Latest commit date
atlas f4df4fc4a9 nix: issue the swarm-services leaf from bao's pki mount
The `pki` mount had no issuer and no principal could log in to it, so the
swarm's service certificates were still minted by two openssl hops from a
root key on disk. Close both halves and retire the openssl path with them.

The mount now generates its own root, once. The granting unit asks bao
whether an issuer already exists (`bao list pki/issuers`) before calling
`pki/root/generate/internal`, so a rebuild or a reboot re-asserts the role
and the grant without touching the anchor — a root that changed per boot
would invalidate every certificate issued under it and every browser
taught to trust it. The guard asks the store rather than looking for a
marker file on this host's disk: a file is a claim about a mount that may
have been restored from a snapshot or disabled and re-enabled underneath
it.

`swarm-services-issuer` stops being an inert policy. A fourth cert-auth
role attaches it, following the shape the controller, the publisher and
matrix-ctl already use, and glue-bao-tls.nix signs the leaf carrying its
CN — that credential is what opens the mount, so it cannot come out of it.

`swarm-services-cert.service` logs in with that leaf, calls
`pki/issue/swarm-services`, and writes the result to the path
hive-tls.nix already wrote and the gateway already copies from. The
sub-CA layer does not move; it stops existing. The role's
`allowed_domains`, read from the same `swarm.serviceDomains` the SANs
come from, enforces at issue time what the sub-CA encoded in x509
`nameConstraints`, and with the root inside the mount there is nothing
left for an intermediate to be an intermediate of.

Not a flag day: the issuing root is published beside the leaf as
`swarm-services-root.pem` (0644) and joins `trust-bundle.pem`, where the
swarm root still sits. A leaf chaining to the old sub-CA and one issued
by the store both verify against the same bundle, so hives can be
rebuilt in any order. The same file is what an operator hands a browser
— readable without a store login, which matters because every listener
demands a client certificate.

The eval-time warning about uncovered service names is gone rather than
reworded. It fired on "this host does not hold the swarm root key", which
was the reason a hive could end up serving its own leaf on a
swarm-service name. Every hive now asks the store with its own identity,
so that stopped being the thing that decides.

Closes #4586
2026-09-23 21:00:02 +02:00
..
hive-c0re nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
hive-forge nix: make swarm.authelia.url non-nullable, trim its docs 2026-09-21 18:14:28 +02:00
hive-gateway docs(gateway): describe nginx as per-host, not a deployment-wide singleton 2026-09-19 13:58:10 +02:00
lib swarm: extract the name guards, so the module just says what is forbidden 2026-08-31 18:50:15 +02:00
swarm-grafana/dashboards swarm-grafana: replace busiest-agents bargauges with an actual table 2026-09-20 23:40:21 +02:00
default.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00
deploy.nix swarm-controller: make socketPath readOnly instead of asserting it 2026-09-17 19:27:30 +02:00
glue-bao-tls.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00
glue-controller-bao-identity.nix swarm-controller: hand the daemon the authority hives are issued from 2026-09-10 00:25:07 +02:00
glue-grafana-oidc-client.nix swarm-grafana: deliver the OIDC client secret through the secret store 2026-09-13 19:57:28 +02:00
glue-matrix-bao-token.nix swarm-bao: refuse a remote reader that named seven of the eight leaves 2026-09-23 10:11:42 +02:00
glue-matrix-ctl-bao-identity.nix swarm-matrix-ctl: one control binary for the matrix container, not one per job 2026-09-20 22:07:16 +02:00
glue-queue-agent-credential.nix swarm-bao: refuse a remote reader that named seven of the eight leaves 2026-09-23 10:11:42 +02:00
glue-secret-publisher-bao-identity.nix swarm: publish minted OIDC client secrets into the swarm store 2026-09-12 11:22:33 +02:00
glue-services-issuer-bao-identity.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00
glue-swarm-bao-otel-oidc-client.nix nix: the store's own collector scrapes its metrics listener 2026-09-21 17:19:52 +02:00
glue-swarm-otel-oidc-client.nix swarm-otel: deliver the OIDC client secret through the secret store 2026-09-14 00:58:58 +02:00
hive-ci.nix nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
hive-matrix.nix nix: make swarm.authelia.url non-nullable, trim its docs 2026-09-21 18:14:28 +02:00
hive-network.nix nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
hive-priv.nix docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
hive-tls.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00
hyperhive.nix docs: restructure into topic subdirectories, collapse duplicated index 2026-09-02 01:55:37 +02:00
local-defaults.nix bao: write the swarm controller's policy from inside the store 2026-09-07 18:43:09 +02:00
otel.nix otel.nix: trim the StartLimit comment block to the load-bearing points 2026-09-23 17:22:51 +02:00
stylix-theme.nix swarm-ui: apply the operator's stylix theme, same as the dashboard already does 2026-08-24 14:28:25 +02:00
swarm-authelia.nix nix: make swarm.authelia.url non-nullable, trim its docs 2026-09-21 18:14:28 +02:00
swarm-bao.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00
swarm-ca.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00
swarm-container-resolver.nix fix(#3363): swarm containers write their own resolver file 2026-08-17 17:30:15 +02:00
swarm-controller.nix nix: make swarm.authelia.url non-nullable, trim its docs 2026-09-21 18:14:28 +02:00
swarm-grafana.nix swarm-bao: give each hive-cert consumer its own bao identity 2026-09-23 10:11:42 +02:00
swarm-nats.nix nix: make swarm.authelia.url non-nullable, trim its docs 2026-09-21 18:14:28 +02:00
swarm-otel.nix swarm-otel: persist the journald cursor across collector restarts 2026-09-23 12:52:32 +02:00
swarm-peers-removed.nix docs+nix: fix stale certFingerprint/HYPERHIVE_PEERS references (hyperhive#3294) 2026-08-15 19:56:11 +02:00
swarm-required-services.nix nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
swarm-secret-publisher.nix nix: the store's own collector scrapes its metrics listener 2026-09-21 17:19:52 +02:00
swarm-snapshot-store.nix deploy: move the wireguard mesh out of the namespace hives read 2026-09-07 14:24:52 +02:00
swarm-ui.nix nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
swarm-victorialogs.nix nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
swarm-victoriametrics.nix nix: give the gateway, resolver and bridge their own enable 2026-09-19 13:53:10 +02:00
swarm-wireguard.nix deploy: move the wireguard mesh out of the namespace hives read 2026-09-07 14:24:52 +02:00
swarm.nix nix: issue the swarm-services leaf from bao's pki mount 2026-09-23 21:00:02 +02:00