Repository navigation
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
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 2 minutes. View limit details
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. |
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head fae583d. No actionable findings.
Checked optional host serialization/schema compatibility, HTTP authority/Host extraction without ports, transport authority forwarding and io_uring fallback. server_name remains SNI-only, and the documentation correctly treats host as client-chosen rather than authenticated identity. HTTP and WebSocket regression assertions cover both plaintext and TLS admission.
Verification limits: GitHub-only static source/diff review. No builds, tests or live transport/auth integration runs executed.
There was a problem hiding this comment.
ℹ️ No critical issues — two minor suggestions.
Reviewed changes
hoston the auth request:moq_auth::Requestgains an optional dialed host besideserver_name, documented as client-chosen and present wherever a host exists, including plaintext.- Relay population:
request_forforwardsmoq_tokio::Request::authority()(already host-only on every transport), the one-shot HTTP read handlers derive it from:authority/Host, and io_uring falls back to the SNI. - JS, docs, and tests: the
@moq/authcontract and generated API report gain the optional field,doc/bin/relay/auth.mdexplains it, andserver_name_is_the_sni_never_the_hostnow assertshoston plaintext and TLS HTTP and WebSocket. - Compatibility: the field is an optional, serde-skipped addition, so existing auth servers and the fixed interop vectors are unaffected.
ℹ️ The --auth-domain migration row still names server_name
The new paragraph says host is what a plaintext-scoped server should read, but the 0.14 migration table at doc/bin/relay/auth.md:505 still tells a --auth-domain user that their server reads server_name. A deployment that migrates that way keeps refusing plaintext sessions, which is the case this PR exists to fix.
Technical details
# `--auth-domain` migration guidance names the field that cannot cover plaintext
## Affected sites
- `doc/bin/relay/auth.md:505` — the `--auth-domain` row says "your server reads `server_name` and decides".
## Required outcome
- The migration row names `host` (or both, with the plaintext caveat), so a migrating deployment does not land on SNI-only scoping.
## Open questions for the human
- Whether 0.14's `--auth-domain` matched the SNI, the `Host` header, or both decides whether `host` alone is the right replacement here.deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
…gration at host Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#8266 renamed the JS reader's log line from compress=<bool>; the harness kept the old string, so the compressed-catalog lanes failed on main. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Thanks. Both findings are addressed:
Separately, the compressed-catalog interop lanes were failing on main. #8266 renamed the JS reader's log line, but the harness still expected the old string. This PR updates the expected string, and (Written by Claude Opus 5.5 with medium effort) |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
Reviewed the delta since the prior pullfrog review (fae583d) — commits 7cb3cc1 and 13f525f.
hostcasing normalized on HTTP reads:dialed_hostnow lowercases theHost/:authorityhost, so an HTTP read and a WebSocket/WebTransport dial ofTenant.Exampleboth reporttenant.example. The socket test drivesHost: Tenant.Example:8443and asserts the lowercased, port-stripped value on both HTTP and WebSocket.- Migration doc corrected: the 0.14
--auth-domainrow now points athost(present over plaintext) instead ofserver_name, so a migrating deployment does not land on SNI-only scoping. - Interop catalog lanes fixed:
run_catalog_fanoutnow expects the reader'scompression=<algo>line, matchingcatalog.tsafter #8266 renamed it.
The remaining transports already agree on casing: special-scheme URLs lowercase the domain, and rustls lowercases the SNI it parses, so raw QUIC and tls:// report the same lowercase host.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed head 13f525f incrementally from fae583d, separating inherited main changes. No new actionable findings.
Checked lowercasing of HTTP authority/Host values, the mixed-case host-with-port regression assertions, and the auth-domain migration guidance. The interop harness now matches the catalog reader's actual compression=none/deflate output. SNI remains separate from the client-chosen host.
Verification limits: GitHub-only static source/diff review. No builds, tests, browser runs or live transport/interop checks executed.

Problem
An auth server that scopes tenants by hostname reads
server_name, which is the TLS SNI only. A plaintextws://orhttp://session has no SNI, so the server can't scope it. When a client dialshttp://and its QUIC attempt loses the race to the WebSocket fallback, the session arrives unscoped and a tenant token is refused. The relay already knows the dialed host (moq_tokio::server::Request::authority), but it never reaches the auth request.Approach
moq_auth::Requestgainshost: the host the client dialed, without its port. HTTP reads take it from:authority, else theHostheader. WebSocket, WebTransport and raw QUIC take it from the transport's authority (the URL host, or the SNI on QUIC andtls://). io_uring WebTransport takes it from the URL, else the SNI. The HTTP host is lowercased to match the URL-derived transports, whoseUrl::host_strlowercases a domain, so one dialed host yields onehoston every transport.server_nameis unchanged and stays SNI-only;server_name_is_the_sni_never_the_hostnow also assertshoston HTTP and WebSocket, with and without TLS, from a mixed-caseHostwith a port.The 0.14 migration table's
--auth-domainrow now points athost: 0.14 matched the lowercased URL host, whichserver_namecannot reproduce over plaintext.Also fixes the interop harness's compressed-catalog lanes, broken on main: moq-dev/moq#8266 renamed the JS reader's line to
compression=<algo>and left the harness expectingcompress=<bool>.Impact
moq_auth::Request::host(Rust) andhostin the JS@moq/authcontract: a new optional field, additive on the wire. Older servers ignore it.doc/bin/relay/auth.mddocuments it next toserver_name.Alternatives
server_namefromHostover plaintext. Rejected:server_namemeans "the name that selected the certificate", and servers rely on that.Validation
just check: passed.just test interop --all: 191 PASS, 0 FAIL on the final code.Follow-ups
None.
Models
Size: S
Implementer: Claude Code, claude-opus-5-5, unknown effort
Implementer: Claude Code, claude-opus-5-5, medium effort (iterate, S)
🤖 Generated with Claude Code
(Written by Claude Opus 5.5)
Review
Rewritten by
quest reviewafter each round.01a1bf46-7a3d-7800-94c9-df6776633453, round 1Source review found no actionable defects and supports landing, with builds and tests intentionally not run.