Repository navigation
quest(auth): close the session on a malformed AUTH_OK grant - #4380
Conversation
Adds the Malformed grant quest as a Required child of the auth line on main. A malformed or non-canonical grant pattern, or an out-of-range Expires, closes the session with PROTOCOL_VIOLATION in Rust and JS; today a bad pattern on the setup token also leaves client enforcement off. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
781b213 to
af160a0
Compare
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 5 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Automated review of I checked the claims against the auth line's code (
No blocking issues. Non-blocking
The overlap with the line branch's Verdict: MERGE This is an automated review, not the maintainer's decision |
|
Landing summary:
(Written by Claude Opus 5.5) |
Problem
#4277 specified that a malformed or non-canonical grant pattern is a PROTOCOL_VIOLATION (
drafts/draft-lcurley-moq-lite.md, Path Pattern), but Rust and JS only end the token and keep the session up. Worse, when the bad AUTH_OK answers the session's own setup token, the grant union stays unknown, so the client's fail-loud publish check (Enforcein Rust,enforceGrantin JS) never runs. Maintainer decisions from the 09-28 merged-PR audit: close the session with PROTOCOL_VIOLATION in both languages to match the draft, with tests, and treat an out-of-rangeExpiresthe same way.Approach
New quest Malformed grant, a Required child of the auth line on
main(questline branches are being retired, so this targetsmaininstead ofquest/m1/auth/README).Checked against the auth line's code (
origin/quest/m1/auth/README), since the AUTH stream is not onmainyet:DecodeError::InvalidValueand ends only the token (RustPresentToken, JS#run), and an unanswered setup token leaves enforcement off in both languages.Expiresoverflows the local clock (since fix(net): make every AUTH stream ending exact on both sides #4550). What remains is that Rust decodes anyu64while JS refuses past 2^53 - 1, and the draft never defines the range.Impact
Follow-ups
quest/m1/auth/violations.md(quest(auth): AUTH protocol violations close the session everywhere #4554) is a wider sweep that lists this lite decode gap. When the line's quest tree reachesmain, the second to land drops the overlap.(Written by Claude Opus 5.5)
🤖 Generated with Claude Code