[DEF-6] SSE stream authenticates with the long-lived admin token in the query string #27
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-07-03] events.go design limitation: EventSource cannot set headers, so ?token= rides in URLs (proxy/access logs). Replace with one-time short-TTL stream tickets: POST /api/v1/stream-tickets (admin auth) -> ticket; GET /api/v1/events?ticket=... consumes it; ?token= support removed; web fleet store mints a ticket before connecting (incl. on EventSource auto-reconnect). E2E: real server — ticket flow streams, replay rejected, expiry rejected, ?token= rejected; browser check that the dashboard still live-streams.
Migrated from git-collab issue
44f5b0eeaa7c8b2cf0e0cd1a8540e4a3cd1148e8.Original author: a73x dev@a73x.sh.
Close reason: Fixed by patch
0b72bae8[claude 2026-07-04] Picking this up. POST /api/v1/stream-tickets (admin) -> one-time 60s-TTL ticket held in memory; GET /api/v1/events?ticket= consumes it; ?token= removed. Web: connect() mints a ticket first; EventSource auto-reconnect replaced with mint-fresh-ticket-and-reconnect on error (a consumed ticket cannot be replayed by the browser's built-in retry).