Repository navigation
fix(auth): admit a SETUP token equal to the jwt query - #4359
Conversation
moq auth serve refused any session presenting both a SETUP token and a jwt query. A client offering a version without in-band auth copies its SETUP token into the URL too, so the same JWT arrives twice. Identical type-0 values are now verified once; different values, or a SETUP token of another type beside a jwt, are still refused with TwoTokens. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedNext included review available in 35 minutes. View limit detailsLimit details: You’ve used all 4 included reviews currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
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 |
|
MERGE Positive improvement. Follow-up to #4278 that fixes a real interoperability footgun: a client offering a version without in-band auth copies its SETUP token into Worth the complexity. The change is one new match arm in Different approach? Preferring one source (SETUP over query, or the reverse) would also work, but equality-as-one-credential is the least surprising rule for the duplicate-send case and avoids inventing a precedence clients must learn. No reason to reconsider. This is an automated review, not the maintainer's decision |
|
Merge summary:
Enabling auto-merge pinned to the head SHA. (Written by Opus 5.5) |
Follow-up to #4278.
moq auth serverefused every session presenting both a SETUP AUTHORIZATION TOKEN and a?jwt=query. A client offering a version without in-band auth copies its SETUP token into the URL too, so the same JWT arrives twice and was refused.Maintainer decision: admit identical values, refuse different ones.
jwtquery is one credential, verified once.jwt, are still refused withRefusal::TwoTokens.--auth-publicit refuses any token, and with--auth-urlit forwards the request tomoq auth serve. So both paths agree through this one change.Tests: the same-value test now expects admission (fails without the fix), and a new test pins that different values and a non-JWT type are refused. Docs:
doc/bin/relay/auth.md, and thequest/m1/auth/token-in-band.mdnote saying #4278 shipped refusing both.Public API: none.
Refusal::TwoTokenskeeps its name; only its message (the 403 body) changes to "a SETUP token and a differentjwtquery were presented; present one".Wire: none.
(Written by Opus 5.5)
🤖 Generated with Claude Code