[control] QC minors: device install links open a page and download on POST (never listed), approve and install failures show on the request and the CLI waits, PBKDF2 floor, private pki dirs or an error, trusted_proxies for a proxy in front, a placeholder keeps the device allow list from being empty (Caddy refuses that)

This commit is contained in:
2026-11-08 11:02:50 +01:00
parent bc336d1188
commit 3bf5fa0e1a
27 changed files with 548 additions and 46 deletions
+4 -3
View File
@@ -15,7 +15,7 @@ Everything below was run end to end on loopback against `--dev` with a real edge
Without either: `401` with `token.missing`, `token.unknown`, `token.expired` or
`token.revoked`; a `Remote-*` header without edge's proof is `401 ui.no_proof`, whatever
else the request carries. 120 calls a minute per token or user. The one exception is the
one-time device download (`GET /device-bundles/{token}`), where the link is the secret.
one-time device download (`/device-bundles/{token}`), where the link is the secret.
- **Host header.** Only `127.0.0.1:<port>`, `localhost:<port>`, `[::1]:<port>` and the
configured `allowed_hosts` are answered (DNS rebinding). A browser write (`Origin` or
`Sec-Fetch-Site` present) also needs `X-Ianitor-UI: 1` (CSRF).
@@ -287,7 +287,7 @@ curl -s -H "$H" -H 'Content-Type: application/json' -X POST "$API/certs/devices"
# on the server: sudo -u ianitor-control ianitor-control pki approve 47 19 83 --config /etc/ianitor/control.toml
curl -s -H "$H" -H 'Content-Type: application/json' -X POST "$API/certs/devices/$DEV/bundle" \
-d '{"format": "p12"}' | jq '{download_url, one_time_password}'
curl -s -o phone.p12 "$DOWNLOAD_URL" # once; a second try is 410 pki.bundle_used
curl -s -X POST -o phone.p12 "$DOWNLOAD_URL" # once; a second try is 410 pki.bundle_used (GET is only its page)
curl -s -H "$H" -X DELETE "$API/certs/devices/$DEV" # 204, off the allow list at once
```
@@ -350,6 +350,7 @@ safe and nudges the engine again. Edge also re-reads the device files by itself
| `GET /health` | edge reachability, config hash, trial, paused state, hosts |
| `GET /certs`, `POST /certs/devices`, `DELETE /certs/devices/{id}`, `POST /certs/devices/{id}/bundle` | the Domi CA screen, device requests, revocation, one-time install files |
| `POST /certs/intermediate/renewal`, `GET/DELETE /pki-requests/{id}`, `GET /pki-requests/{id}/csr`, `GET /pki-requests/{id}/ext`, `PUT /pki-requests/{id}/certificate` | renewals and approvals |
| `GET /device-bundles/{token}` | the one-time PKCS#12 download (no token; the link is the secret) |
| `GET /device-bundles/{token}` | the link's page with a Download button (uses nothing up: link previews only GET) |
| `POST /device-bundles/{token}` | the one-time PKCS#12 download (no token; the link is the secret) |
| `GET /engine`, `POST /engine` | which engine serves; switch |
| `GET /openapi.json` | the OpenAPI document |