Repository navigation
T5 — Remove the HTTPS reverse proxy and client certificates from the daemon and serve direct-tcpip in every build - #1698
Conversation
Drop the `ssh-forward` feature gate from the direct-tcpip handler: `channel_open_direct_tcpip` and `relay_streams` compile in every build, and the fail-closed stub that rejected every channel when the feature was off goes with it (NET-110). A port forward to a box port now relays bytes in a release build, which is the default, featureless configuration the release ships. Each open logs one info line naming the session it forwarded for and the box port it reached, so the daemon log — and the diagnostics bundle's tail of it — names every direct-tcpip channel open with its outcome. The end-to-end test drives a real SSH connection over an in-memory socket pair and relays bytes through the channel to a loopback listener, in the default build the release ships.
The daemon offers no HTTPS reverse proxy and issues no client certificate (NET-109): the `networking-proxy` feature, the `:7655` listener, `CertAuthority`, `serve_https`, and the `IssueClientCert` RPC go, and with them the rustls/rcgen/tokio-rustls deps and the rustls crypto-provider install the proxy needed. The wire contract drops the `mtls_proxy_unavailable` fields from the `ListSessions` and `CreateSession` replies — unknown fields are skipped, so a reply from an older daemon still decodes — and `min ls` and `min session activate` stop reading and warning on them. The workspace loses the rcgen certificate generator and its orphaned deps, and the justfile stops passing the removed feature to the initramfs, musl, and native daemon builds. The egress proxy is the one listener left; the new test proves it serves plain HTTP and answers a TLS ClientHello with no TLS bytes.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
|
Babysitter review of T5 against the plan block in #1628, at Verdict: does what the plan asks, nothing blocking. All 11 Out of draft: the two Non-blocking, for a revise round or a follow-up:
|
|
Approved: no findings at Nothing to do. Verdict APPROVE, posted as a comment: the App cannot review its own pull request; the check and the label carry it. Clobber: none: |
|
/revise Two small leftovers from the removal, both in files this task already owns or that name the removed feature:
Do not touch anything else. Keep the four test lines passing. |
No crate references them since the mTLS reverse proxy came out of minimald, so the workspace declarations were dead weight. Cargo.lock is unchanged: rustls still arrives transitively via hyper-rustls, and 'cargo metadata --locked' resolves the graph without asking for a lock update.
The features are gone from minimald, so the tree must stop naming them: the AGENTS.md initramfs footgun now says the justfile passes no FEATURES, build-initramfs.sh points its example at networking-wg alone, kernel-bump-review.sh keeps only the true reason virtio_net.c is out of the default review set, and the remote-access feature comment in the minimal CLI no longer claims the daemon gates direct-tcpip behind a feature.
|
Round 1 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. No build of the daemon opens a 7655 listener or issues a client certificate, and an SSH direct-tcpip channel to a box port relays bytes in a release build — and as of this round the workspace manifest declares no rustls or tokio-rustls entries and no footgun, script, or feature comment still names the removed networking-proxy or ssh-forward features. Notes from the agent: Revise round 1 (/revise note, no review threads): both directive items are done. (1) Dropped the workspace rustls and tokio-rustls entries from Cargo.toml; Cargo.lock is unchanged because rustls still arrives transitively via hyper-rustls — 'cargo metadata --locked' resolves the full graph cleanly, so cargo never asked for a lock update. (2) Rewrote the AGENTS.md initramfs footgun (script still honours FEATURES, justfile passes none, prebuilt MINIMALD_BIN ignores TARGET/FEATURES), dropped the networking-proxy example from scripts/build-initramfs.sh, dropped the stale 'behind the networking-proxy feature' clause from scripts/kernel-bump-review.sh, and rewrote the remote-access feature comment in crates/minimal/Cargo.toml to say the daemon serves direct-tcpip in every build. AGENTS.md, the two scripts, and crates/minimal/Cargo.toml are outside the task's layers and were touched because the directive names them explicitly. One further stale comment left alone per 'do not touch anything else': crates/minimald/src/net/answerer.rs:608 still claims the daemon's only certificate authority is the mTLS proxy's behind networking-proxy — outside both the layers and the directive, and its test (min_internal_absent_from_certs_and_audit) passes regardless; flagging it for the reviewer. The remaining networking-proxy/ssh-forward mentions in crates/minimal/tests/cli.rs, crates/minimal/src/tests.rs, and crates/minimald/src/connection.rs:457 are intentional (deny-list assertions, retired-verb proofs, and a true 'the gate is retired' note). All four test lines pass at the new head. |
norrietaylor
left a comment
There was a problem hiding this comment.
Babysitter approval for T5 at bce5cf9: plan block met on all 11 layers, four test lines exit 0, minimal-review approved twice (e4a10d1 and bce5cf9) with no findings, the revise round removed the dead rustls entries and the stale feature mentions. Out-of-layer touches are the client-side field removal and the doc/script mentions the revise asked for.
T5 — Remove the HTTPS reverse proxy and client certificates from the daemon and serve direct-tcpip in every build
slice: S1
kind: task
covers: NET-109, NET-110
size: L
est: 350 code, 240 tests
executor: agent
difficulty: routine
model: standard
diagnostics: the bundle's socket listing no longer shows a 7655 listener, and the daemon log tail names each direct-tcpip channel open with its outcome
observability: one info log line per direct-tcpip channel open with the session and the target port
layers:
- daemon:
- crates/minimald/src/net/proxy.rs: removes HTTPS_PROXY_PORT, CertAuthority, serve_https and their tests
- crates/minimald/src/server.rs: removes the certificate authority state, the mTLS-unavailable flag and the 7655 listener
- crates/minimald/src/rpc.rs: removes the client-certificate RPC handlers and the mTLS-unavailable fields
- crates/minimald/src/main.rs: removes the crypto provider install under the removed feature
- crates/minimald/src/connection.rs: channel_open_direct_tcpip and relay_streams compile in every build; the fail-closed stub goes
- crates/minimald/Cargo.toml: drops the networking-proxy and ssh-forward features and their optional dependencies
test: cargo nextest run -p minimald direct_tcpip_served_in_release
- workspace:
- Cargo.toml: drops the workspace certificate-generation dependency only minimald used
- Cargo.lock: loses the certificate generator and its orphaned dependencies
- justfile: stops passing the removed feature to the initramfs, musl and up recipes
test: cargo nextest run -p minimald proxy_serves_http_only
- rpc:
- crates/minimald-rpc/src/lib.rs: removes the client-certificate request and response types and the mTLS-unavailable fields with their tests
test: cargo nextest run -p minimal retired_surfaces_absent
- cli:
- crates/minimal/tests/cli.rs: the session-list literals lose the mTLS field; hosts retired_surfaces_absent
test: cargo nextest run -p minimal session_list_decodes_without_mtls_field
produces: none
consumes: none
proof: No build of the daemon opens a 7655 listener or issues a client certificate, and an SSH direct-tcpip channel to a box port relays bytes in a release build.
depends on:
- blocked by #1613
Proof
No build of the daemon opens a 7655 listener or issues a client certificate: the mTLS reverse proxy, its CertAuthority, the IssueClientCert RPC and the mtls_proxy_unavailable reply fields are gone from every build, the justfile no longer passes the removed feature to any daemon build, and an SSH direct-tcpip channel to a box port relays bytes in the default featureless build a release ships, with each open logging one info line naming its session and target port.
Notes from the agent: Two out-of-layer touches were forced by the rpc layer's field removal, not chosen: crates/minimal/src/cmd/list.rs and crates/minimal/src/cmd/session.rs consumed resp/created.mtls_proxy_unavailable and would not compile after minimald-rpc dropped it, so the two warning call sites and the now-dead warn_if_mtls_proxy_down helper were removed there. Left untouched (comment-only staleness, outside the layers): crates/minimald/src/net/answerer.rs ~line 608 still credits the mTLS proxy as the daemon's only CA, scripts/build-initramfs.sh line 20 still uses networking-proxy as a FEATURES example, scripts/kernel-bump-review.sh line 51 mentions the feature, and crates/minimal/Cargo.toml lines 20-22 still describe minimal's remote-access feature as gating the retired ssh-forward verb. The workspace rustls and tokio-rustls entries stay in the root Cargo.toml (the layer named only the certificate-generation dep, rcgen, which is dropped): no member references them anymore, and rustls itself remains in Cargo.lock via reqwest/tonic/google-cloud-auth. Cargo.lock lost rcgen and its seven orphans (asn1-rs and friends, pem, x509-parser, yasna) and nothing else. The tests prove the release claim by running in the default featureless dev build — the exact feature set the release now builds, since no --features flag reaches any minimald build anymore.
Tests
cargo nextest run -p minimald direct_tcpip_served_in_releasecargo nextest run -p minimald proxy_serves_http_onlycargo nextest run -p minimal retired_surfaces_absentcargo nextest run -p minimal session_list_decodes_without_mtls_fieldVerify
min task run agent-verifypassed ([tasks.verify]).Out of scope
These files are outside the task's
layers:, so this PR is a draft:crates/minimal/src/cmd/list.rscrates/minimal/src/cmd/session.rsCloses #1628