"Anyone can claim to be localhost. Only the operating system can prove it."
The One Place a PIN Is Skipped
Firelink grants exactly one no-PIN path: a browser genuinely on the same machine. Sit at the office box, open a loopback URL, and you get a durable local write session without entering the family PIN — because you're demonstrably local. The whole question is how to prove 'demonstrably.' Get that wrong and the no-PIN path becomes a remote bypass; get it right and it's a safe convenience for the one person physically at the keyboard.
Trust the Socket, Not the Claim
The proof is the socket address the connection actually arrived on — a loopback socket (a 127.0.0.0/8 or IPv6 ::1 peer) to a loopback host. The socket is set by the operating system when the connection is made; a client cannot forge it. What a client can forge is the Host header — it can send any hostname it likes, including 'localhost.' So Firelink never trusts the requested host to establish local origin. The requested host can only narrow the decision (a loopback socket must also be talking to a loopback host), and it can never turn a remote socket into a local one. Trust flows from the OS-established socket; the client-supplied header can subtract, never add.
Why 'Narrow, Never Widen' Is the Whole Trick
This asymmetry is the safety property. A remote attacker can send a request with Host: localhost all day — and it will never be treated as local, because their socket is remote and the header can't widen that. Meanwhile a genuinely local browser is confirmed by its loopback socket. The direction of the rule is what matters: information the client controls (the header) is only ever allowed to make trust smaller; information the client can't control (the socket) is what's allowed to grant it. Any auth rule where a client-supplied value can increase trust is a rule with a bypass waiting inside it.