Repository navigation
fix: redact release credential diagnostics - #7482
Conversation
Port the diagnostic redaction from #7200 while retaining release types and wire encoding. Also redact malformed-message dumps and duplicate GOAWAY redirects. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…CT Debug web-transport-proto 0.6.4 redacts ConnectRequest's Debug (URL userinfo, query, fragment, and header values), which web-transport-moq and web-transport-iroh log. Raise the workspace minimum so release builds cannot resolve 0.6.3. moq-uring's Request Debug printed the raw url::Url, query included; it now delegates to the redacted ConnectRequest. Tests pin both. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 6db8763
No actionable defects found in the credential redaction and diagnostic changes. Manual Debug redaction and removing raw malformed-frame traces provide a focused boundary; the transport dependency minimum covers the external CONNECT diagnostic path.
Verification: static GitHub review only; no builds, trace capture, io_uring tests or live transport checks run.
There was a problem hiding this comment.
ℹ️ The redaction itself is thorough and well-tested. One adjacent credential in the same
Config::loadtrace is still unredacted on this branch.
Reviewed changes
- Manual redacting
Debug:moq-auth::request::{Request, Token},moq-net::setup::Token, ietfSetup/Client/Server, ietfParameters, liteSetup/Parameters, all three GOAWAY types, andcluster::Peer(URL userinfo/query now redacted viamoq_tokio::RedactedUrl) now print kind/length instead of bytes/URI. - Escaped diagnostics: peer/operator-supplied
path,root,id, and refusal/grant fields switch from%(Display) to?(Debug) so control characters cannot forge log records. - Malformed frames: the
?rawbyte dump is dropped from the ietf and lite decode-failure warnings. - External CONNECT: the workspace
web-transport-protominimum rises to0.6.4, andmoq-uring::quic::web::Request'sDebugdelegates to the now-redactedConnectRequest. - Tests: new unit tests pin the redaction in
moq-authandmoq-net, themoq-netGOAWAY integration tests are extended, and amoq-uringCONNECT test covers URL userinfo/query/fragment and header values.
ℹ️ cluster.lan.secret still reaches the final config trace
Config::load logs the whole resolved config at tracing::trace!(?config, "final config") (rs/moq-relay/src/config.rs:210). On this branch LanConfig::secret is an Option<String> that accepts an inline 64-hex key (rs/moq-relay/src/cluster.rs:769), and LanConfig derives Debug (rs/moq-relay/src/cluster.rs:736), so that key is printed verbatim whenever TRACE logging is on. This is the same leak class the PR fixes for peer URLs, and main closed it by making the field a PathBuf (file only). It is pre-existing and lower stakes than the peer-URL leak, so flagging rather than blocking; Peer-style redaction would close it here too.
Technical details
# Inline LAN secret printed by the resolved-config trace
## Affected sites
- `rs/moq-relay/src/config.rs:210` — `tracing::trace!(?config, "final config")` prints the derived Debug of the whole `Config`.
- `rs/moq-relay/src/cluster.rs:769` — `pub secret: Option<String>` accepts an inline 64-hex key or a path to one.
- `rs/moq-relay/src/cluster.rs:736` — `LanConfig` derives `Debug`.
- `rs/moq-relay/src/cluster.rs:657` — `lan` is `#[cfg(feature = "cluster-lan")]`, which is in `default` (`rs/moq-relay/Cargo.toml:28`).
## Required outcome
- The resolved-config trace must not print an inline `cluster.lan.secret`.
## Suggested approach (optional)
- Give `LanConfig` a manual `Debug` that renders `secret` as `Some("...")` (mirroring the `Peer` impl this PR already touched), or make it file-only (`PathBuf`) as on `main`.deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
… quest web-transport-proto 0.6.4 redacts ConnectRequest's Debug, which web-transport-iroh logs. Raise the workspace minimum so builds cannot resolve 0.6.3. moq-uring's Request Debug printed the raw url::Url, query included; it now delegates to the redacted ConnectRequest. Tests pin both. The release backport (#7482) completes the log-secrets quest, the last child of the security-audit epic, so both are deleted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Problem
Release diagnostics expose SETUP credentials, request query strings, CONNECT URLs and headers, and GOAWAY redirect credentials. Refusal paths and verified roots can inject log records. This ports the repository-owned parts of moq-dev/moq#7200 and closes the external CONNECT leak.
Approach
Debug, keeping their token types and public byte fields.web-transport-protominimum to0.6.4, which redactsConnectRequest'sDebug: URL userinfo, query, and fragment, plus every header value exceptoriginanduser-agent(moq-dev/web-transport#475).web-transport-moq1.3.5 andweb-transport-iroh0.7.0 log that type and require^0.6, so they get the fix without their own release.moq-uring'squic::web::RequestDebugprinted the rawurl::Url, query included. It now delegates to the redactedConnectRequest.moq-uringunit test, and assert in the io_uring WebTransport end-to-end test that an accepted request'sDebugomits its?token=query.Impact
moq_uring::quic::web::Request'sDebugshows aconnectfield instead ofurl.web-transport-proto0.6.4 or later.Alternatives
The quest settled on manual
Debugfor independent credential types, avoiding a shared type and a breaking migration. This branch ports the behavior ontoreleaserather than importing trunk's incompatible transport implementation.Decisions
ConnectRequest'sDebugupstream, publish a compatibleweb-transport-protopatch, then raise the minimum here. The alternative was to land without it and leave the leak to a follow-up. The upstream half merged in moq-dev/web-transport#475, and 0.6.4 is on crates.io.moq-uringRequestDebughere, because the bump exposed it and it leaks the same credential.Validation
quest gate nix develop --command env MOQ_STRICT=1 just check origin/releasepassed ond6c66b961c. That covers fmt, clippy, rustdoc, and dependency hygiene, plus nextest runs of 5,735 tests (11 skipped), 387 (3 skipped), 133, and 78. Thembx"Argument list too long" failure that blocked the last attempt did not recur.cargo test -p moq-uring --lib --test webran the new unit test and all 7 io_uring WebTransport tests, none skipped.quest check --base origin/release: 439 documents OK.6db8763c6conly adds a conflict-free merge oforigin/release(release-plz version bumps).cargo metadata --lockedstill resolves.Review
Codex (
codex exec review),gpt-6.1-sol, medium effort. Round 1 ond6c66b961cba3058abf712c04dfd66070bedda3dagainstorigin/releaseat6e43cd6140reported no findings. The current head,6db8763c6cb8ef4ed5aad9c9eb220eea576515ea, adds only a conflict-free merge oforigin/release, so the guide's merge exemption covers it.Follow-ups
moq-dev/moq#7477 deletes the quest on main and applies the same proto minimum and
moq-uringfix there. Merge this PR first.(Written by GPT-6.1 Sol; updated by Claude Opus 5.5)