Skip to content

Commit 9e39d29

Browse files
author
gluck
committed
plan: record the spain deploy and what it found
Steps 4, 4b and 4c are done and the box is live. The finding worth keeping: Authelia's rule for the hostname is two_factor with no subject restriction, so the group the platform creates is not the group anything checks. That is the documented split -- proxy authenticates, app authorizes -- and figaro was not doing its half until --require-group.
1 parent 49dfaba commit 9e39d29

1 file changed

Lines changed: 31 additions & 5 deletions

File tree

‎plans/http-gateway.md‎

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -442,11 +442,18 @@ there is no point gating a door into an ungated house.
442442
the bound listener, never the config string** — `":9090"`, `"0.0.0.0"`,
443443
`"::ffff:127.0.0.1"` all defeat a parse. `Host` allowlist against DNS
444444
rebinding. Tunnels capped (8h default on TCP) and pinged every 30s.
445-
- [ ] 4. Envelope rewriting on ingress (the THIRD params-rewriting hook, and
446-
now it can only be written as middleware); `upstream` + `doorkey`
447-
authenticator implementations behind the tunnel.
448-
- [ ] 4b. **`api_key_file`** — provider credentials from a path. Blocking for
449-
spain: hush is a human-plane agent and does not belong on a server.
445+
- [x] **4. Authenticators and the envelope rewrite.** `upstream`, `doorkey`,
446+
`none`, plus a `--require-group` admission gate. Every frame's
447+
attribution is stripped and replaced with what the gateway
448+
authenticated, so a remote caller cannot name itself another aria.
449+
- [x] **4b. `api_key_file`.** Provider credentials from a path, tried before
450+
the stored key and before hush. Machine secrets in sops; hush stays off
451+
the server.
452+
- [x] **4c. Deployed on spain.** `fig.kelliher.info`, two units, loopback TCP
453+
behind Caddy + Authelia, `--require-group figaro-admin`. Verified
454+
against the live box: admin 101, wrong group 401, no group 401, no
455+
Remote-User 401, wrong Host 421. A form was minted on spain from the
456+
workstation through the tunnel and is durable in its WAL.
450457
- [ ] 5. Form face: GET/PATCH/SSE, pooled per-aria connections.
451458
- [ ] 6. Wire gaps: `SubscribeFrom` on the wire, typed `ErrVersionConflict`,
452459
golden vectors.
@@ -475,6 +482,25 @@ Steps 0–2 are in. The security argument for stopping exactly there:
475482
The next increment that changes the trust story is step 3, and it must not
476483
land without its table of tests.
477484

485+
## 8b. What the spain deploy found
486+
487+
**Authelia was not checking the group.** kelliher-web derives the lldap group
488+
from `requiredGroups` and creates it, and derives a 2FA rule from the
489+
hostname — but the rule is `policy: two_factor` with **no subject
490+
restriction**. So `figaro-admin` existed, the config named it, and nothing
491+
enforced it: every directory user who could pass 2FA reached a daemon that
492+
runs arbitrary shell.
493+
494+
This is the platform's documented division of labour rather than a platform
495+
bug — the proxy authenticates, the app authorizes, and keel's `may_comment`
496+
is the same shape. figaro simply was not doing its half. `--require-group` is
497+
that half, and the nix module wires it from the same option that creates the
498+
group, so the two cannot drift apart again.
499+
500+
**Still open on spain:** no provider key is deployed, so spain can list, mint
501+
and serve state but cannot run a turn. Deliberate — the key is Jack's to
502+
place, and the recipe is in the flake comment.
503+
478504
## 9. Testing
479505

480506
- Every cell of the refusal table (C5).

0 commit comments

Comments
 (0)