fix(security): video-scale TTL for stream tickets (WS stays 5m)#81
Merged
Conversation
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
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #79. A
/streamplayback 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_ticketmints with it.pytest -q→ 239 passed;ruffclean. No migration.Unblocks the Flutter/tvOS stream-ticket switches.
🤖 Generated with Claude Code
https://claude.ai/code/session_01RXMKM1rDWn8wNh93MMUtxY