Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ url = "2"
usage-rs = "7.1.0"
uuid = { version = "1.26", features = ["v7"] }
web-transport-iroh = "0.8.3"
web-transport-proto = "0.6"
web-transport-proto = "0.6.4"
web-transport-trait = "0.5"
x11rb = { version = "0.14.0", features = ["randr", "xfixes"] }
x509-parser = "0.18"
Expand Down
1 change: 0 additions & 1 deletion quest/m0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ since cutting segments from first-frame pts waits on nothing in m1.
## Required

- [Nightly passes on main](/quest/m0/nightly/README.md) - the scheduled Nightly passes end to end, so red means a new break
- [Release credential leaks](/quest/m0/security-audit/README.md) - tokens stay out of logs and outbound HTTP clients verify their peer, on `main` and `release`
- [Interop and Video pass on main](/quest/m0/interop-green/README.md) - the scheduled Interop and Video workflows pass, so red means a new break
- [Publish the release line's drain() wrappers](/quest/m0/ffi-shutdown-backport.md) - Python `moq-rs` 0.5.2 and Dart `moq` 0.1.1 reach PyPI and pub.dev from `release`
- [Backport audio groupDuration](/quest/m0/backport-audio-group-duration.md) - `@moq/publish` 0.5.4 on `release` can pack several Opus frames per group, making Cloudflare's relay drop audio less often
Expand Down
25 changes: 0 additions & 25 deletions quest/m0/security-audit/README.md

This file was deleted.

27 changes: 0 additions & 27 deletions quest/m0/security-audit/log-secrets.md

This file was deleted.

24 changes: 23 additions & 1 deletion rs/moq-uring/src/quic/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -389,9 +389,12 @@ impl Rejected {
}
}

/// Safe to log: [`proto::ConnectRequest`]'s `Debug` redacts the URL's
/// userinfo, query, and fragment and every header value but `origin` and
/// `user-agent`, so a `?jwt=` or `Authorization` credential stays out.
impl std::fmt::Debug for Request {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
f.debug_struct("Request").field("url", &self.request.url).finish()
f.debug_struct("Request").field("connect", &self.request).finish()
}
}

Expand Down Expand Up @@ -1704,6 +1707,25 @@ mod tests {
));
}

/// The CONNECT request is logged here and by the `web-transport-iroh`
/// transport, so its `Debug` must keep credentials out:
/// `web-transport-proto` redacts them from 0.6.4.
#[test]
fn connect_debug_redacts_credentials() {
let url = url::Url::parse("https://user:hunter2@relay.example/anon?jwt=SECRET#SECRET").unwrap();
let request = proto::ConnectRequest::new(url)
.with_header(
http::header::AUTHORIZATION,
http::HeaderValue::from_static("Bearer SECRET"),
)
.with_header(http::header::COOKIE, http::HeaderValue::from_static("session=SECRET"));
let debug = format!("{request:?}");
assert!(debug.contains("relay.example/anon"), "{debug}");
for secret in ["SECRET", "hunter2", "jwt="] {
assert!(!debug.contains(secret), "{secret} leaked: {debug}");
}
}

/// Wrap `payload` in an HTTP/3 frame of type `typ`.
fn frame(typ: u64, payload: &[u8]) -> Vec<u8> {
let mut buf = Vec::new();
Expand Down
5 changes: 5 additions & 0 deletions rs/moq-uring/tests/integration/web.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,11 @@ fn webtransport_echo_end_to_end() {
let request = quic::web::Request::accept(conn).await.expect("handshake");
assert_eq!(request.url().path(), "/echo");
assert_eq!(request.url().query(), Some("token=abc"));
let debug = format!("{request:?}");
assert!(
debug.contains("/echo") && !debug.contains("token=abc"),
"query leaked: {debug}"
);
assert_eq!(request.protocols(), [PROTO.to_string()]);
let mut session = request
.respond(quic::web::Response::default().with_protocol(PROTO))
Expand Down
Loading