Skip to content
4. Host-only sessions and bridge tickets

4. Host-only sessions and bridge tickets

  • Status: Accepted
  • Date: 2026-05

Context

The dashboard, the IDE and the user’s application are served from sibling hostnames. A session cookie scoped to the parent domain would be sent to the test host, where arbitrary user code answers requests, and could be set from there, which enables cross-site WebSocket hijacking and cookie tossing.

Decision

Every hostname keeps its own host-only session cookie. To open the IDE or the application, the dashboard asks the gateway for a bridge ticket: the user’s claims, encrypted and authenticated, bound to the target hostname and valid for 30 seconds. The browser redeems it at <host>/auth/bridge, which sets that host’s session. A login started from a dev or test URL comes back through the same bridge.

Consequences

  • Code served from the test host cannot read or plant the dashboard’s session.
  • Opening the IDE costs one extra redirect.
  • A browser has one session per host. An administrator viewing another user’s IDE (ADR 0010) changes what every tab on the dev host shows until they open their own again.