[control] Design review: Caddy differences per host in fallback_ready, active apply kind, hosts and watch end, capped device end date, CSR fingerprint for signing by hand, crash points exit without SIGABRT
This commit is contained in:
+10
-5
@@ -70,11 +70,12 @@ offline (and go into Custos once it can hold them).
|
||||
### Each year (and the first time): the intermediate
|
||||
|
||||
1. In the UI: the banner's **Renew** (or **Set up**) makes a new key on the server and a CSR, and
|
||||
shows a match code. **Sign it by hand** downloads `domi-intermediate-<date>.csr` and
|
||||
shows the request's SHA-256 fingerprint. **Sign it by hand** downloads `domi-intermediate-<date>.csr` and
|
||||
`domi-intermediate-<date>.ext` (the signing profile: CA, pathLen 0, keyCertSign + cRLSign). By
|
||||
API: `POST /certs/intermediate/renewal`, `GET /pki-requests/{id}/csr`, `GET /pki-requests/{id}/ext`.
|
||||
2. On the offline machine, check the request, then sign:
|
||||
2. On the offline machine, check the request (the fingerprint must be the one the UI shows), then sign:
|
||||
```sh
|
||||
openssl req -in domi-intermediate-<date>.csr -outform DER | openssl dgst -sha256
|
||||
openssl req -in domi-intermediate-<date>.csr -noout -subject # CN=Ianitor Domi Intermediate <yyyy-mm>
|
||||
openssl x509 -req -in domi-intermediate-<date>.csr -CA domi-root.crt -CAkey domi-root.key \
|
||||
-days 365 -sha256 -extfile domi-intermediate-<date>.ext -out domi-intermediate-<date>.crt
|
||||
@@ -84,9 +85,13 @@ offline (and go into Custos once it can hold them).
|
||||
3. Back on the server: upload the `.crt` in the UI (step 3), or
|
||||
`sudo -u ianitor-control ianitor-control pki install domi-intermediate-<date>.crt --config /etc/ianitor/control.toml`.
|
||||
|
||||
Control checks that the certificate is signed by the configured root, is a CA with path length 0,
|
||||
is valid now, and carries the pending key; then it swaps the intermediate, reissues every
|
||||
`tls = "domi"` certificate and reloads the engine that serves. Tested with real openssl
|
||||
Control checks that the certificate is signed by the configured root, is a CA with path length 0
|
||||
and keyUsage keyCertSign + cRLSign, has no extended key usage that would stop it issuing (none,
|
||||
any, or both server and client auth), is valid now and ends no later than the root, and carries
|
||||
the pending key; otherwise it refuses (`pki.manual.not_ca`, `pki.manual.eku`, `pki.manual.dates`,
|
||||
`pki.wrong_key`, `pki.not_our_root`), says why on the request and in `pki install`, and keeps the
|
||||
request open. Once it passes, control swaps the intermediate, reissues every `tls = "domi"`
|
||||
certificate and reloads the engine that serves. Tested with real openssl
|
||||
(`an_intermediate_signed_with_openssl_is_installed`).
|
||||
|
||||
## Device certificates
|
||||
|
||||
Reference in New Issue
Block a user