Root rotation without re-joining: prepare, switch, retire
CI / agent (push) Successful in 3s
CI / site (push) Successful in 3s
CI / go (push) Successful in 47s

The CA directory holds the active root and, during a rotation, the next
or the previous one; everything that trusts the region gets the trust
bundle (all of them). Rack controllers receive it in their state, signed
by the active root; the root update unit installs it only when the
signature verifies against the roots it already trusts, and binary
signatures verify against any of them. After switch racks renew their
client and server certificates from the new root by themselves and
report what they run on; switch and retire wait for every rack (-force).

/ca.pem stays one certificate, the root of that server's certificate, and
the PXE command line names that root, so agents in older images keep
working; /ca-bundle.pem is the bundle. Deployed machines get one file per
root and a daily timer that refreshes them from their rack over HTTPS.

Refs #12

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-31 15:37:44 +01:00
1 parent ff0de7e0b2
commit 2f708e8f69
16 files changed
+1023 -71

No files matched your search

+28 -4
View File
@@ -558,10 +558,34 @@ plane is: `ca_dir` (default `/etc/rollcall/ca`) holds `ca.pem` and
short-lived certificates to nodes with certbot or acme.sh; everything that
trusts the Rollcall CA trusts them, and nothing outside the permitted names
can be issued. Roots created before this (path length 0) cannot delegate:
`rollcall ca rotate -yes` replaces the root, keeping the old one as a
backup; rack controllers then join again and clients trust the new
fingerprint. `deploy/tags/acme-cert.yaml` is a tag that fetches a node
certificate at first boot and renews it.
rotate the root (below). `deploy/tags/acme-cert.yaml` is a tag that fetches
a node certificate at first boot and renews it.
* **Root rotation without re-joining.** In three steps, each followed by a
restart of the region (`systemctl restart rollcall`):
```
rollcall ca rotate prepare # a new root; the old one still signs
rollcall ca rotate # status: which rack has what
rollcall ca rotate switch # the new root signs; the old one stays trusted
rollcall ca rotate retire # the old root is no longer trusted
```
Everything that trusts the region gets the *trust bundle* (all current
roots, `/ca-bundle.pem`). Rack controllers receive it signed by the active
root and their root unit installs it only if that signature verifies
against the roots they already trust; after `switch` they renew their
client and server certificates from the new root by themselves. `switch`
waits until every rack has the bundle, `retire` until every rack runs on
certificates from the new root (`-force` goes on; racks that missed it
join again). Machines deployed by this version get the roots one per file
and a daily `rollcall-ca-refresh` timer that fetches the bundle over HTTPS
from their rack, checked against the roots they trust, so they pick up a
new root during `prepare` and drop the old one after `retire`. Machines
deployed earlier need the bundle installed once by hand
(`curl --cacert <old root> https://<rack>/ca-bundle.pem`). Admin
certificates and intermediates signed by the old root work until `retire`;
issue them again after `switch`. `/ca.pem` stays a single certificate (the
root of that server's own certificate), which agents check by fingerprint.
## Power drivers