[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:
+4
-3
@@ -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 |
|
||||
|
||||
@@ -67,7 +67,7 @@ new file mode 100644
|
||||
index 0000000..cd23016
|
||||
--- /dev/null
|
||||
+++ b/hyperv-infra/modules/ianitor.nix
|
||||
@@ -0,0 +1,49 @@
|
||||
@@ -0,0 +1,51 @@
|
||||
+{ config, lib, inputs, ... }:
|
||||
+
|
||||
+# Ianitor beside Caddy (Ianitor ROADMAP §1.12, Phase 3): two low-risk hosts, flowers and esp32,
|
||||
@@ -100,6 +100,8 @@ index 0000000..cd23016
|
||||
+ httpListen = "127.0.0.1:18080";
|
||||
+ httpsListen = "127.0.0.1:18443";
|
||||
+ openFirewall = false;
|
||||
+ # Caddy in front, on loopback: its X-Forwarded-For names the visitor (throttle, logs).
|
||||
+ trustedProxies = [ "127.0.0.1" ];
|
||||
+ };
|
||||
+ control.listen = "127.0.0.1:7878";
|
||||
+ shareLinkKeyFile = config.sops.secrets."ianitor/share-link-key".path;
|
||||
|
||||
+4
-3
@@ -522,9 +522,10 @@ Recorded by the Phase 3 implementation (branch `phase-3`); docs/api.md has the c
|
||||
- **G14**: edge's per-boot proof header on the admin host; control trusts `Remote-User` (actor)
|
||||
and `Remote-Name` (shown) only with it; a forged `Remote-User` is `401 ui.no_proof`.
|
||||
`overview.viewer {name, via}` and `overview.site.auth_logout_url` are new.
|
||||
- **G15**: `POST /certs/devices/{id}/bundle` → one-time `GET /device-bundles/{token}` (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.
|
||||
- **G15**: `POST /certs/devices/{id}/bundle` → one-time `/device-bundles/{token}` (GET shows a
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user