Skip to content

docs(quest): constrain per-request auth to an experimental Rust hook - #5364

Merged
kixelated merged 1 commit into
mainfrom
codex/auth-request-plan
Oct 12, 2026
Merged

kixelated merged 1 commit into
mainfrom
codex/auth-request-plan

Conversation

@kixelated

@kixelated kixelated commented Oct 12, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

The per-request AUTH plan presents a broad feature while #5148 still has admission and API hazards: received peer grants can bypass local verification, initial verification precedes capacity/cancellation handling, and the shared acceptor can silently give session handlers request-enforcement semantics.

Approach

Constrain #5148 to an experimental Rust interoperability hook with application-owned verification, retaining renewal and joining FETCH. Record the required fixes and regressions, coordinate shared AUTH plumbing with #5282, and keep its separate open decisions open. Move relay request leases to m3 and explicitly defer per-request JS, CLI, and bindings. Keep documentation to minimal API comments.

Remove completed decoder (#5107) and setup-extension (#5106) quests and update references. The decoder's old REQUEST_UPDATE finding is already fixed on main.

Impact

  • This PR changes plans only; no runtime, public API, or wire changes.
  • Planned Rust API: explicit session/request event variants with distinct acceptance handles, intentionally breaking the shared optional-scope acceptor shape.
  • Planned wire behavior: existing request tokens and renewal, plus the existing plan for draft-19+ request-update credit and shared error-code registration. No complete authentication scheme is promised.

Decisions

All selected options were confirmed by the maintainer:

  1. Goal/scope: make per-request AUTH landable as a temporary Rust interoperability hook, with correct local verification, bounded/cancellable requests, and an explicit API contract. ✅ Narrow experimental hook retaining SUBSCRIBE/PUBLISH_NAMESPACE and renewal; alternatives: decode/refuse only, or full relay integration.
  2. Verifier API: ✅ One queue with explicit session/request variants and distinct acceptance handles; alternative: separate opt-in request-verification queue.
  3. When to verify: ✅ Independently verified local session permission first, request token otherwise; alternative: always verify a supplied token. Peer-issued AUTH_OK never authorizes incoming requests, and malformed encodings remain errors either way.
  4. Initial documentation choice: existing inline API/relevant-page updates versus a dedicated guide quest. Inline was selected, then narrowed by the following decision.
  5. Final documentation scope: ✅ Minimal API comments only (experimental, verifier required, setter success is not authorization); alternative: no documentation changes at all. No feature page or guide.

Alternatives

The selected scope keeps the interoperability hook without making relay integration a completion requirement. Explicit acceptor variants prevent existing session handlers from silently opting into request authorization. Local-session-first admission preserves the existing intended policy while fixing the direction of authority.

Follow-ups

Implementation stays in #5148 and shared session plumbing in #5282. Relay request verification is deferred at quest/m3/auth-request-lease.md. No new guide quest.

Validation

  • quest check: 412 documents pass.
  • nix develop --command just check: passes.
  • git diff --check: passes.

(Written by GPT-6)


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@kixelated
kixelated marked this pull request as ready for review October 12, 2026 20:15
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T20:19:11.797270Z 2286d8c Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@kixelated kixelated left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated review by review (OpenAI)

Reviewed commit: 2286d8c

No actionable bugs found in this plans-only change. The direction is coherent: distinguish session/request acceptance in the types, use locally verified authority for inbound admission, and require bounded, cancellable verification before landing the experimental hook. The deferred relay/JS/bindings scope and retained renewal/joining-FETCH requirements are consistent across the updated quests.

Checked all 11 changed files, the completed prerequisite PRs, and relevant existing decoder/admission code. The implementation hazards in #5148 remain implementation work, not fixes delivered by this PR. Verification was static through GitHub; I did not run quest checks, builds, tests, or interoperability checks. Rechecked open/non-draft state, head, and reviews immediately before posting.

@coderabbitai

coderabbitai Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: d294035e-1780-47a0-8929-328e593d9cfc

📥 Commits

Reviewing files that changed from the base of the PR and between 2d67ec0 and 2286d8c.


📒 Files selected for processing (11)
  • quest/m1/auth/README.md
  • quest/m1/auth/bindings.md
  • quest/m1/auth/extensions.md
  • quest/m1/auth/relay-refresh.md
  • quest/m1/auth/request-gate.md
  • quest/m1/auth/request-token-decode.md
  • quest/m1/auth/request-token.md
  • quest/m1/ietf-epochs.md
  • quest/m2/ietf-malformed-close.md
  • quest/m3/README.md
  • quest/m3/auth-request-lease.md

💤 Files with no reviewable changes (2)
  • quest/m1/auth/extensions.md
  • quest/m1/auth/request-token-decode.md

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 0 remain after this review.



Walkthrough

The quest documents now describe request-token verification as an experimental Rust hook with request-specific authorization rules. They distinguish the hook from deferred relay integration and exclude per-request APIs from bindings. The relay plans specify unsupported request verification until implemented, and related quest documents update their scope and references.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to 2286d

The changes clarify the experimental Rust hook and keep relay verification deferred. No concrete user or operational regression is identified, so the PR appears ready to merge, subject to its reported document checks.

Pre-merge checks · Passed 5
Passed Passed checks (5 passed)
Check name Status Explanation
Description check Passed The description clearly explains that the PR narrows per-request AUTH to an experimental Rust hook, defers relay and binding work, coordinates related quests, and changes plans only.
Title check Passed The title concisely and accurately identifies the main change: constraining per-request authentication to an experimental Rust hook.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
✨ Simplify code
  • Commit to this branch
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 2286d8ca04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +59 to +61
- **Wire scope.** Honor tokens on SUBSCRIBE, unsolicited PUBLISH_NAMESPACE,
and their renewal updates; other request tokens grant no authority. The
solicited NAMESPACE response has no request-token slot. Preserve the

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Define legacy solicited PUBLISH_NAMESPACE token handling

When a draft-14/15 peer answers SUBSCRIBE_NAMESPACE, it must use PUBLISH_NAMESPACE because those drafts have no NAMESPACE message (rs/moq-net/src/ietf/publisher.rs:2543-2546,2656-2660), and the receiver explicitly cannot distinguish that reply from an unsolicited advertisement (rs/moq-net/src/ietf/subscriber.rs:1236-1238). The implementation therefore cannot honor tokens only on “unsolicited PUBLISH_NAMESPACE”: it must either reject valid solicited token authorization or honor it contrary to this stated scope. Define the legacy behavior explicitly, likely by honoring all draft-14/15 PUBLISH_NAMESPACE tokens, and cover the solicited case.

Useful? React with 👍 / 👎.

@kixelated
kixelated added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 2452fdc Oct 12, 2026
3 checks passed
@kixelated
kixelated deleted the codex/auth-request-plan branch October 12, 2026 20:23
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