Repository navigation
Conversation
Enable iroh's platform-verifier feature and build the endpoint with CaTlsConfig::system(), so relay connections trust roots installed only in the OS store (TLS-inspecting proxies, antivirus HTTPS scanning) instead of only iroh's embedded webpki roots. Verification stays on. Fixes reason-machines#224
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #224
What
The issue's hypothesis holds at the source level: in
iroh-relay 1.4.1,CaTlsConfig::default()isMode::EmbeddedWebPki(Mozilla roots compiled in), and the endpoint insrc/net.rsnever sets a CA config, so relay TLS only trusts the embedded roots. A root installed only in the OS store (a company TLS-inspecting proxy, antivirus HTTPS scanning) is never consulted.This PR:
platform-verifierfeature (iroh = { version = "1.4", features = ["platform-verifier"] }), which turns oniroh-relay/platform-verifier;rustls-platform-verifieris already in the lock file throughreqwest, soCargo.lockonly gains one dependency edge;.ca_tls_config(iroh::tls::CaTlsConfig::system()), for both theMinimalandN0presets.Certificate verification stays on; it now uses the OS's verifier (as
reqwestalready does) instead of the embedded list.Testing
cargo fmt --check: passescargo clippy --all-targets --locked -- -D warnings: passescargo test --locked: passes (341 + 5 + 2 tests)Not tested: I did not run the engine behind a TLS-inspecting proxy with a root only in the OS store, so the end-to-end fix for the Windows case in the issue is not reproduced. The confirming setup described in the issue (local TLS-terminating proxy, throwaway root added with
certutil -addstore Root/security add-trusted-cert) would verify it.AI assistance
I used OpenAI Codex to help make this change. I read the iroh-relay TLS code, reviewed the diff and ran the checks above myself.