[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:
+1
-1
@@ -136,7 +136,7 @@ Identity gate, tunnel, Domi templates, ACME server, HTTP/3, migrating public sit
|
||||
5. Authelia forward-auth endpoint and headers to mirror exactly. (phase 1)
|
||||
**Answer: `GET /api/authz/forward-auth` (ForwardAuth implementation; legacy `/api/verify` not used).** Edge sends X-Forwarded-Method, -Proto, -Host, -URI (required) and X-Forwarded-For, and always sets them itself. It also forwards the client's headers (Cookie, Authorization) without hop-by-hop headers or body. A 2xx answer copies Remote-User, Remote-Groups, Remote-Email and Remote-Name onto the request (client copies removed). Any other answer (302 portal, 401 + WWW-Authenticate, 403) goes back to the client verbatim. An unreachable, silent (10 s deadline), oversized (>1 MiB), broken or `101` auth answer fails closed with 502; 1xx heads are skipped. Client-sent Remote-* headers are always stripped on forward-auth hosts, whatever copy_headers says. This mirrors `caddy adapt` output for Authelia's documented `forward_auth` snippet; tested against a mock, not a real Authelia. [S authelia.com/reference/guides/proxy-authorization, authelia.com/integration/proxies/caddy]
|
||||
6. Custos CSR-signing operation with match-code approval. (phase 3)
|
||||
**Answer: Custos has none (desktop 0.8.0, CustosPublic v0.13.0).** Its `sign` op signs only minisign, SHA256SUMS manifests, Authenticode digests and deploy approvals, refuses any request against `domi-root` (the RSA-3072 Authenticode root), and no path takes a CSR. Its server reach is the factor-service sign mailbox (`POST /api/sign/requests`, Bearer sign token, answers sealed to a one-time X25519 key, 5-minute match-code card on the PC with a push to the phone). So, per §6: the operation is written as a ticket, [custos-ticket.md](custos-ticket.md) (a new key `domi-pki-root`, ECDSA P-256; a sign kind `x509_csr` through the same mailbox that builds the intermediate from a fixed profile and takes only the CSR's key and CN; the match code computed from the CSR on both screens), not filed. Until then the intermediate is signed **by hand on the offline machine with openssl** ([pki.md](pki.md); Mark accepted it as a §4 exception, 2026-11-07) and device certificates are approved on the server with `sudo -u ianitor-control ianitor-control pki approve <code>` (Q5). API tokens: Custos stores them as "Local app credential" items with a `domi-ref`; the intended import is Provisio's `offer` (the server seals the value to the PC's key and Mark accepts a match-code card), or copy and paste in the item editor. [S Custos docs/09_signing.md, 07_domi_identity.md, 10_provisio.md, apps/desktop/src-tauri/src/signing.rs] Configuration_Server findings (domains, Caddy, no Authelia in the repository, sops-nix secrets, the two trial hosts): [deploy/beside-caddy.md](deploy/beside-caddy.md).
|
||||
**Answer: Custos has none (desktop 0.8.0, CustosPublic v0.13.0).** Its `sign` op signs only minisign, SHA256SUMS manifests, Authenticode digests and deploy approvals, refuses any request against `domi-root` (the RSA-3072 Authenticode root), and no path takes a CSR. Its server reach is the factor-service sign mailbox (`POST /api/sign/requests`, Bearer sign token, answers sealed to a one-time X25519 key, 5-minute match-code card on the PC with a push to the phone). So, per §6: the operation is written as a ticket, [custos-ticket.md](custos-ticket.md) (a new key `domi-pki-root`, ECDSA P-256; a sign kind `x509_csr` through the same mailbox that builds the intermediate from a fixed profile and takes only the CSR's key and CN; the match code computed from the CSR on both screens), not filed. Until then the intermediate is signed **by hand on the offline machine with openssl** ([pki.md](pki.md); Mark accepted it as a §4 exception, 2026-11-07) and device certificates are approved on the server with `sudo -u ianitor-control ianitor-control pki approve <code>` (Q5). API tokens: Custos stores them as "Local app credential" items with a `domi-ref`; the intended import is Provisio's `offer` (the server seals the value to the PC's key and Mark accepts a match-code card), or copy and paste in the item editor. [S Custos docs/09_signing.md, 07_domi_identity.md, 10_provisio.md, apps/desktop/src-tauri/src/signing.rs] Configuration_Server findings (domains, Caddy, sops-nix secrets, the two trial hosts): [deploy/beside-caddy.md](deploy/beside-caddy.md). **Mark, 2026-11-08:** production runs Authelia, configured outside Configuration_Server, so forward-auth stays (the admin UI host must be behind it; control refuses the ui-proof header on any other host); the trial hosts flowers.stage and esp32.stage on the hyperv-infra mirror are confirmed; and changes keep working while Caddy serves (applies, Undo and Restore are loaded into Caddy through its admin socket, watched through Caddy and reverted by reloading the previous caddy.json; only share links are off).
|
||||
7. Red Panda Network donation route for a non-US individual and the receipt they issue. (phase 4, Mark)
|
||||
|
||||
## 9. Status
|
||||
|
||||
+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
|
||||
|
||||
+9
-3
@@ -526,9 +526,15 @@ Recorded by the Phase 3 implementation (branch `phase-3`); docs/api.md has the c
|
||||
page, its button POSTs the download, so link previews cannot use it up; 10 min, one use,
|
||||
PKCS#12 with a one-time password, `qr_svg` for `format = "qr"`); through edge on the admin
|
||||
host, as a share link when that host has share links on (never listed in `GET /share-links`).
|
||||
- **G18**: `GET/POST /engine` (shape in docs/api.md). Differences from §1.9: no `fallback_ready
|
||||
{compared, matched}` (control cannot run the differential suite at runtime; it reports
|
||||
`{built_at, current}`). Changes keep working while Caddy serves (Mark 2026-11-08): they are
|
||||
- **G18**: `GET/POST /engine` (shape in docs/api.md). Difference from §1.9: control cannot run the
|
||||
differential suite at runtime, so `fallback_ready {built_at, current, compared, matched,
|
||||
differences[]}` counts *hosts*, not requests: `compared` hosts in the routes, `matched` those
|
||||
with none of the suite's known differences (share links, forward-auth edge cases), and
|
||||
`differences` says what differs in plain English (decision Q3: listed under "Show details").
|
||||
`overview.active_apply` also carries `kind`, `hosts` and `watch_ends_at`, so the bar writes the
|
||||
heading and counts down every second. `GET /certs` has `device_valid_until` (a year, capped at
|
||||
the intermediate's end, Q7) and renewal requests carry `csr_sha256` (what
|
||||
`openssl req -in X.csr -outform DER | openssl dgst -sha256` prints). Changes keep working while Caddy serves (Mark 2026-11-08): they are
|
||||
loaded into Caddy and watched through it; only share links are off.
|
||||
- **G19**: the UI shows "No websockets" only when off, and "Open to anyone" for `auth = none` (Q11).
|
||||
- **PKI** (§1.7, §1.8, §3.6): built as drawn, with two differences while Custos lacks the
|
||||
|
||||
Reference in New Issue
Block a user