Repository navigation
T147 — A project file cannot open host ports to its boxes - #2956
norrietaylor merged 3 commits into
Conversation
A project minimal.toml cannot open host ports to its boxes. The mfile reader now drops the table from the unknown-field list and logs one warning, as it does for [secret-store-rules].
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
|
Approved: every review thread resolved at @norrietaylor resolved the last thread, which releases the approval this review had withheld. Nothing to do. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The ignore and the warning conform to section 7.1 line 250 and AT7. They are the exact twin of the store-rules check. The remedy in the warning is not true at this head. At this head, the client Config refuses an unknown [host-exposures] table. A user who moves the table into config.toml gets a parse error, and min stops. The field comes in #2871, which is still open. C1 makes this PR merge after #2871. Then the text is true.
Ruled at 5aea59c against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
The test reads a project minimal.toml with the table and checks that the reader logs the host-exposures warning once and no unknown-field warning.
…file-cannot-open-host-ports-to-its-box
|
Round 1 of 10 on the runtime's review findings, pushed as
Verify Review threads the coder judged:
A project minimal.toml with a [host-exposures] table opens no host port. The reader drops the table, and the min and daemon logs carry one warning that a project file cannot open host ports to its boxes and that the table belongs in the user's own config.toml. Notes from the agent: Revise round 1. Added an mfile-level test that reads a project file with a top-level [host-exposures] table and checks for one host-exposures warning and no generic unknown-field warning. The warning text is unchanged. It tells the user to put the table in config.toml. At this branch head the client-config Config has no host-exposures field and uses deny_unknown_fields, so that advice is true only after #2871 merges. Merge this pull request after #2871, or merge main in after it lands. That ordering is outside this task's layers (crates/client-config). |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms to networking design section 7.1 line 250 and architecture AT7. The minimal.toml reader ignores a project [host-exposures] table and logs one specific warning. No code reads host exposures from a project file. The new mfile test drives a real file through File::from_dir. Thus the proof tests the rule at the reader. Make sure that a plan task owns the client config.toml reader for NET-159. This change does not add it.
Ruled at 03ac7ea against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-arch[bot] crates/boxes/src/core/egress.rs:2210, minimal-foundry[bot] crates/mfile/src/lib.rs:1541. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
norrietaylor
left a comment
There was a problem hiding this comment.
Reviewed 03ac7eac against T147's plan block. A project's [host-exposures] table opens no port and gets its own warning in place of the unknown-field one. The warning's advice holds now that #2871 has merged, because Config accepts the table. The test through the mfile reader closes the LOW thread, and arch-review passes on this head.
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of 03ac7eacb5e5 withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
…penings (#2871) T102. Behaviour change, for the release notes: host-address boxes reach only ports opened in [host-exposures]. Before this, a host-address box reached the host through host.min.internal at every port. Own-address boxes stay refused end to end: the host gate would admit a configured exposure under their rules, but the guest still refuses them. The egress gate refuses a flow to the host alias unless a port in the current [host-exposures] table of the client config.toml opens it, and the row's own rules then decide the flow. Each entry is { proto, port }, with proto defaulting to tcp. The node plane alone also reaches the ports its baseline endpoints open at the alias. minvmd rereads the table when the file changes, so an entry opens or closes its port without a restart. A missing or unparseable file fails closed. An entry at a Minimal listener's port is refused and logged. Each refused flow logs under the host-alias rule with the row and the port. This retires MINVMD_HOST_EXPOSURE_PORTS, and minvmd warns if it is still set. Backport of #2871. Lands after T103 here, as on main: its baseline and gate edits sit on that commit. T147 #2956, the project-file warning, stays out of 0.7.3. A project's [host-exposures] table still opens nothing, because the reader takes only the client file. Adapted to the line: - The client config lives in sessions/src/client/config.rs, and host_exposures joins it without main's [secrets] and [secret-store-rules] sections. - boxes:: reads sessions::, tests draw session ids from a v4 UUID, and DropLimiter stays in egress_gate.rs. (cherry picked from commit 964a71b)
…penings (#2871) T102. Behaviour change, for the release notes: host-address boxes reach only ports opened in [host-exposures]. Before this, a host-address box reached the host through host.min.internal at every port. Own-address boxes stay refused end to end: the host gate would admit a configured exposure under their rules, but the guest still refuses them. The egress gate refuses a flow to the host alias unless a port in the current [host-exposures] table of the client config.toml opens it, and the row's own rules then decide the flow. Each entry is { proto, port }, with proto defaulting to tcp. The node plane alone also reaches the ports its baseline endpoints open at the alias. minvmd rereads the table when the file changes, so an entry opens or closes its port without a restart. A missing or unparseable file fails closed. An entry at a Minimal listener's port is refused and logged. Each refused flow logs under the host-alias rule with the row and the port. This retires MINVMD_HOST_EXPOSURE_PORTS, and minvmd warns if it is still set. Backport of #2871. Lands after T103 here, as on main: its baseline and gate edits sit on that commit. T147 #2956, the project-file warning, stays out of 0.7.3. A project's [host-exposures] table still opens nothing, because the reader takes only the client file. Adapted to the line: - The client config lives in sessions/src/client/config.rs, and host_exposures joins it without main's [secrets] and [secret-store-rules] sections. - boxes:: reads sessions::, tests draw session ids from a v4 UUID, and DropLimiter stays in egress_gate.rs. (cherry picked from commit 964a71b)
T147 — A project file cannot open host ports to its boxes
slice: S21
kind: task
covers: NET-159
size: S
est: 30 code, 60 tests
executor: agent
difficulty: routine
model: light
diagnostics: the daemon and
minlogs carry the warning once per expansion of a project file with a[host-exposures]tableobservability: one
tracing::warn!line when a project file carries the table, as[secret-store-rules]does todaylayers:
- project:
- crates/boxes/src/core/egress.rs:
HOST_EXPOSURES_TABLEandwarn_project_host_exposures, the[host-exposures]twin ofwarn_project_store_rules: a project file's table is ignored, and the warning reads exactlyminimal.toml has a [host-exposures] table. A project cannot open host ports to its boxes, so the table is ignored. Put the table in your own config.toml instead. Runmin dirsto find that file.; it is true because the reader takes host exposures from the clientconfig.tomlalone (NET-159), andproject_host_exposures_ignored_with_warningpins the text- crates/mfile/src/lib.rs: calls
warn_project_host_exposuresbesidewarn_project_store_ruleson the project file's unknown keystest: cargo nextest run -p boxes project_host_exposures_ignored_with_warning
produces: none
consumes: none
proof: A project
minimal.tomlwith a[host-exposures]table opens no host port, andminwarns that a project file cannot configure one.Proof
A project minimal.toml with a top-level [host-exposures] table no longer reaches any host-exposure reader. The mfile reader removes it from the unknown-field warning and logs one warning instead:
minimal.toml has a [host-exposures] table. A project cannot open host ports to its boxes, so the table is ignored. Put the table in your own config.toml instead. Runmin dirsto find that file.Notes from the agent: The warning is wired only at the top level of minimal.toml, the place a [host-exposures] table sits. The [session] section check still calls only warn_project_store_rules, so a [session.host-exposures] key gets the generic unknown-field warning. The ignore is structural: the mfile schema has no host-exposures field, so the table stays in
extraand nothing reads it. The client config.toml reader for NET-159 is not part of this task. cargo clippy -p mfile --all-targets is clean.Tests
cargo nextest run -p boxes project_host_exposures_ignored_with_warningVerify
min task run agent-verifypassed ([tasks.verify]).Closes #2936