ADR 0003: Authenticating preview URLs

Date: 2026-09-11 Status: accepted

Context

ADR 0001 left an open item: "Preview hosts are currently reachable by anyone who can reach the Ingress." Every environment publishes <env>--<app>.<domain>, and nothing checked who was asking.

On a bank's internal network "anyone who can reach the Ingress" is every employee, every contractor's laptop and every other workload in the cluster. A developer testing a change against production-shaped data had, without being told, published that data to the whole network. No customer would pass a security review with that open, and it is the kind of finding that ends an evaluation rather than generating a ticket.

Three things had to be true of the fix:

  1. The API must not be in the data path. Every request to every preview would otherwise depend on the control plane being up and fast. The API is a single replica by design (see the SQLite decision), so putting it in front of developer traffic would make a restart an outage for work that has nothing to do with it.
  2. A cookie for one environment must not open another. Every preview of an application shares a parent domain, so a browser will send the same cookie to all of them.
  3. It must degrade honestly. An evaluation on a laptop should not require this, but a real install should not be able to have it silently off.

Decision

The API mints a short-lived signed cookie after a normal session check. The router verifies the signature itself on every preview request.

Consequences