Prerequisite for every Phase B item (keel link, mobile PWA, ceremony card, push — docs/evolution-plan.md §5 Phase B). Nothing remote ships before this pass.
Where the architecture stands
keel serve binds loopback by design, with a deliberate DNS-rebinding defence (the bind/Host checks in keel/web/server.py — the design comments name the attack and the checklist). 127.0.0.1 is a secure context by specification, which is what the service worker and manifest currently rely on. That posture is correct for today and wrong to weaken: exposing the same server through a WireGuard mesh (Tailscale/Headscale) or a Cloudflare Tunnel changes the threat model, and the current defences will — correctly — reject a tunnel's traffic until they are taught to expect it.
What must be designed, explicitly
Rules
- The DNS-rebinding defence is never deleted to make a tunnel work; it is extended with explicit expectation. A PR that removes the bind check to make something connect fails review on principle.
- This issue is engine-side only; the tunnel/mesh tooling itself is the
keel link issue that follows it.
Prerequisite for every Phase B item (
keel link, mobile PWA, ceremony card, push — docs/evolution-plan.md §5 Phase B). Nothing remote ships before this pass.Where the architecture stands
keel servebinds loopback by design, with a deliberate DNS-rebinding defence (the bind/Host checks inkeel/web/server.py— the design comments name the attack and the checklist).127.0.0.1is a secure context by specification, which is what the service worker and manifest currently rely on. That posture is correct for today and wrong to weaken: exposing the same server through a WireGuard mesh (Tailscale/Headscale) or a Cloudflare Tunnel changes the threat model, and the current defences will — correctly — reject a tunnel's traffic until they are taught to expect it.What must be designed, explicitly
Hostheader; the DNS-rebinding check will rightly refuse it. Add anexpected external hostallowlist in config; everything not on it is still refusedRules
keel linkissue that follows it.