[deploy] Sockets: services.ianitor.edge.proxySocket (Caddy beside Ianitor reaches edge on a 0660 socket of the ianitor-proxy group) and ui.socket (control's UI socket, the proof trusted only there); the Configuration_Server patch, beside-caddy.md and api.md follow; a VM test for both
This commit is contained in:
+12
-5
@@ -243,7 +243,7 @@ a host in the routes repository with forward-auth to Authelia and one header rul
|
||||
```toml
|
||||
# hosts/ianitor.example.toml
|
||||
hostname = "ianitor.example"
|
||||
upstreams = ["http://127.0.0.1:7878"]
|
||||
upstreams = ["unix:/run/ianitor-control/ui.sock"] # [ui] socket (the NixOS module's default)
|
||||
tls = "domi"
|
||||
auth = "forward-auth"
|
||||
|
||||
@@ -266,11 +266,18 @@ secret = "ui-proof" # listed in ianitor.toml: secrets = ["ui-proof"]
|
||||
- Any request with a `Remote-*` header but without the proof is `401 ui.no_proof`, so a local
|
||||
process on loopback cannot claim a user; the proof without `Remote-User` is `401 ui.no_user`.
|
||||
Tested in `crates/control/tests/ui_auth.rs`, including end to end through edge and a mock Authelia.
|
||||
- **The UI socket (G14 option b, phase 4).** With `[ui] socket = "/run/ianitor-control/ui.sock"`
|
||||
(the NixOS module sets it; `services.ianitor.ui.socket`, default on), control also serves the API
|
||||
on that Unix socket, mode 0660, in its runtime directory (0750, ianitor-control:ianitor): only
|
||||
the ianitor group (edge, caddy-fallback) can connect, and no other user can create a socket
|
||||
there. The proof then counts **only on the socket**: over the loopback port it is
|
||||
`401 ui.no_proof` even when it is right. Why: any local process can reach 127.0.0.1:7878, and
|
||||
one that took that port while control restarted would receive edge's requests, proof and all.
|
||||
The admin host's upstream is `unix:/run/ianitor-control/ui.sock`; control refuses a socket
|
||||
upstream on any other host, and any socket other than its own (`host.upstream.unix_socket`).
|
||||
The loopback port stays for API tokens (scripts, the CLI, the trial's SSH tunnel).
|
||||
- `[ui] logout_url` (Authelia's logout address) becomes `overview.site.auth_logout_url`, the UI's
|
||||
"Sign out". A Unix socket only edge can reach is Phase 4 hardening (decision Q2).
|
||||
|
||||
Why not the Unix socket now: edge's upstreams are `host:port` in the schema; a socket upstream is a
|
||||
schema and compiler change in both engines, and the proof header needs neither.
|
||||
"Sign out".
|
||||
|
||||
## Certificates (the Domi CA)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user