glue-bao-tls: mint the store an identity it can hold before it is up

A CA that signs exactly two things -- the store's server certificate and
the client certificate of whoever reads from it -- and distributes
nothing. Not the hive CA, not the swarm CA: the store will distribute
both, and an authority you must already hold a certificate from cannot
be one the store hands out. Not the gateway's HTTPS material either,
self-signed or ACME; that is a different trust domain with a different
audience.

The minting lives here rather than in swarm-bao.nix because it is an
opinion about where the store's identity comes from -- the most
consequential one available. The service serves what it is handed. A
deployment with a real internal CA drops this file and names its own
paths in serverCertFile / clientCaFile, and nothing in the store
changes. Ordering simplifies too: with the unit and its consumer in one
module, before/requiredBy is internal rather than a cross-module fact.

Idempotent on ABSENCE only. Re-issuing the CA invalidates every client
certificate already trusting it, so a rebuild that refreshed it would
lock out every reader in the swarm at once.
This commit is contained in:
atlas 2026-08-30 18:54:36 +02:00
commit 9bbc74ee51
2 changed files with 120 additions and 0 deletions

View file

@ -23,6 +23,7 @@
./hive-priv.nix
./hive-tls.nix
./otel.nix
./glue-bao-tls.nix
./swarm-authelia.nix
./swarm-bao.nix
./swarm-ca.nix