Skip to content

[P1.18] Stop putting long-lived JWTs in SSE/WebSocket URL query strings #745

Description

@frankbria

Severity: medium | Category: security | Phase: P1.18

Problem

SSE/WS auth appends the raw 24h JWT as ?token=.... Query strings are captured in uvicorn/reverse-proxy access logs and APM traces; a leaked log line grants a day-long session-takeover window.

Evidence

web-ui/src/lib/auth.ts:115, web-ui/src/hooks/useAgentChat.ts:132

Acceptance criteria

  • Streams authenticate via a short-lived single-use ticket (from an authenticated POST) or a WS subprotocol/first-message auth frame — not the long-lived JWT in the URL.
  • If deferred, proxies/servers scrub the token query param from logs and it is documented.

Dependencies

None


Filed from the SaaS launch-readiness audit. Atomic: one developer, one session. Work order: strictly P0.1 → P3.12 (no forward dependencies).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions