1.5 KiB
1.5 KiB
configs/pki/
Public certificates of the lab internal CA. Public material only — private
keys live encrypted in secrets/ (lab-ca-key.age, <name>-tls-key.age),
managed with agenix.
Contents
| File | Description |
|---|---|
lab-ca.crt |
Root CA cert (CN=Skyg Lab CA). Trusted fleet-wide via modules/core/lab-ca.nix (security.pki.certificateFiles). |
lab-ca.srl |
OpenSSL serial counter, written on first ca issue. Needed for unique serials — commit it. |
<domain>.crt |
Leaf certs issued for services (e.g. buzz.app.internal.crt). |
Managed by skyg ca (bin/lib/cmds.nu)
skyg ca init # one-time: generate the root CA
skyg ca issue buzz.app.internal --for minipc1 # mint a leaf for a service
ca initencrypts the CA key tosecrets/lab-ca-key.age(recipient:arionly) and writeslab-ca.crthere. Refuses to overwrite an existing CA.ca issuedecrypts the CA key to.tmp/, signs a leaf (SAN = domain, EKU serverAuth, 825 days), encrypts the leaf key tosecrets/<name>-tls-key.age(recipients:ari+ the--forhost), and writes<domain>.crthere.- Both commands auto-register missing entries in
secrets.nix— review withgit diffafter running them.
Never hand-edit or commit keys here. Re-issuing: delete the leaf cert and
re-run ca issue. Rotating the CA itself: delete lab-ca.crt +
secrets/lab-ca-key.age, re-run ca init, re-issue all leaves, and rebuild
every host (fleet trust comes from the committed root cert).