Skip to content

fix(security): video-scale TTL for stream tickets (WS stays 5m)#81

Merged
windoze95 merged 1 commit into
mainfrom
fix/stream-ticket-ttl
Jun 28, 2026
Merged

fix(security): video-scale TTL for stream tickets (WS stays 5m)#81
windoze95 merged 1 commit into
mainfrom
fix/stream-ticket-ttl

Conversation

@windoze95

Copy link
Copy Markdown
Owner

Follow-up to #79. A /stream playback ticket is re-verified on every HTTP Range request, which span the whole playback session (a long video + pauses). The 5-minute ticket TTL would break any video longer than ~5 min once clients switch off the long-lived ?token=. Since a stream ticket is scoped to one video for one user (read-only), a 12h TTL keeps the leaked-URL blast radius tiny while letting long videos play through. WebSocket tickets keep the 5-min TTL (authorized once at connect).

  • STREAM_TICKET_TTL_SECONDS = 12h; create_playback_ticket mints with it.
  • pytest -q239 passed; ruff clean. No migration.

Unblocks the Flutter/tvOS stream-ticket switches.

🤖 Generated with Claude Code

https://claude.ai/code/session_01RXMKM1rDWn8wNh93MMUtxY

A /stream playback ticket is re-verified on every HTTP Range request, which
span a whole playback session (long videos + pauses). The original 5-minute TTL
would break any video longer than ~5 minutes once the client switches off the
long-lived ?token=. Stream tickets are scoped to ONE video for ONE user
(read-only), so a 12h TTL keeps the leaked-URL blast radius tiny while letting
long videos play through. WebSocket tickets keep the 5-minute TTL (the socket is
authorized once at connect).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RXMKM1rDWn8wNh93MMUtxY
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@windoze95 windoze95 merged commit 418d6af into main Jun 28, 2026
5 checks passed
@windoze95 windoze95 deleted the fix/stream-ticket-ttl branch June 28, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant