Repository navigation
T130 — A name off a box's allow list fails at once instead of looking temporary - #3017
norrietaylor merged 13 commits into
Conversation
One builder for the SOA the relay and the in-VM listener cite when they answer a name off a box's allow list NXDOMAIN. Its minimum and TTL are ANSWER_TTL_SECS, so the negative is cached no longer than a positive.
The relay's DNS gate answered a name off the box's allow list REFUSED. glibc reads REFUSED as a temporary failure, so clients such as npm retried for a minute. The gate now answers NXDOMAIN and cites a root-owned SOA with a 15 s minimum, and still forwards nothing. Its rate-limited line names the rcode it answered.
The in-VM DNS listener for a deny-all host-address box now answers a name outside the box zone NXDOMAIN, citing the same root-owned SOA as the relay. Its NOTIMP, empty-question and in-zone NODATA answers stay.
The deny-all and partial-allow-list legs of own_ip_egress_declared_and_enforced now read the raw reply and assert rcode 3 with a root-owned SOA whose minimum is 15 s, in place of rcode 5. The 5000 ms fast-failure bounds stay.
REFUSED reaches glibc as a temporary failure that clients retry. The root-owned SOA's 15 s minimum bounds the negative cache. NET-079's deny-all resolver comment says the in-VM guest resolver does the same.
…-a-box-s-allow-list-fails-at-once-inst
|
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. |
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
There was a problem hiding this comment.
arch-review: CONDITIONS · 3 conditions · the full ruling
The relay and the guest listener conform to §5.3 line 145. A refusal there has no fixed rcode, and NXDOMAIN with nothing forwarded is a refusal. Three items are open. C1: the VM-lane test guest_deny_all_resolver_reachable still asserts rcode 5 and answer=Refused, and this change breaks it. C2: the session e2e leg exited 1 on this head, and a leg that did not run is open. C3: a native deny-all host-address box resolves through the zone answerer, which still answers REFUSED. State that gap in the NET-141 scope comment and link a filed issue.
Ruled at 5a5cfd8 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
guest_deny_all_resolver_reachable asserted rcode 5 and answer=Refused. The guest listener now answers an out-of-zone name NXDOMAIN, so the test asserts rcode 3 and answer=NXDomain.
Comments and two test names in guest_dns.rs still said refused for the out-of-zone leg. Rewrap two doc lines that ran together.
The box zone answerer still answers an out-of-zone name REFUSED. A native deny-all host-address box resolves through it, so NET-141 records that case as a residual.
…-a-box-s-allow-list-fails-at-once-inst
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 4 unresolved threads — minimal-foundry[bot] crates/minimald/src/net/guest_dns.rs:159, minimal-arch[bot] crates/minimald/src/net/guest_dns.rs:268, minimal-arch[bot] scripts/session-e2e.sh:2667, minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: CONDITIONS · 2 conditions · the full ruling
The NXDOMAIN answer with the root-owned SOA conforms to §5.3 line 145 and §4.1 line 54. The relay and the guest listener answer locally and forward nothing. The compare fixes the VM-lane test and the guest comments. Two items stay open. The new NET-141 residual for the native deny-all answerer names no issue. File one and link it (C1). The session e2e leg exited 1 at this head. It must pass on the KVM lane (C2).
Ruled at da2e1d8 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
|
Round 1 of 10 on a failed check suite, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. Review threads the coder judged:
Inside a box allowed only github.com, a lookup of example.com now gets NXDOMAIN with a root-owned SOA (15 s minimum) from the relay, or from the in-VM guest listener for a deny-all VM box. glibc reads that as not found, so getent exits 2 and npm install stops at once instead of retrying for 60 s. The unit tests show the wire answer. The e2e wire proof was not observed on this box. Notes from the agent: Revise round 1. (1) KVM lane: guest_deny_all_resolver_reachable in crates/minvmd/tests/guest_classifier_integration.rs still expected rcode 5 and answer=Refused. It now expects rcode 3 and answer=NXDomain. That file is outside the task's layers. I touched it because this task's guest change breaks that test. It is gated MINVMD_E2E=1 and I did not run it here (no /dev/kvm). cargo clippy -p minvmd --all-targets is clean. (2) commitlint: the subject of 684d99a starts with 'NET-141' and fails subject-case. I cannot fix it without rewriting a commit that is already on the branch. A person must reword it, or squash-merge with a lowercase title. My new commits pass the rule. (3) Spec: NET-141's scope comment now has a residual for the native deny-all host-address box, whose resolver is the box zone answerer, which still answers an out-of-zone name REFUSED (crates/boxes/src/core/zone_answer.rs decide -> Verdict::Refused). I have no credential to file an issue, so the residual links none. A person must file one and link it. (4) guest_dns.rs: comments and two test names (out_of_zone_non_a_is_nxdomain, apex_and_non_lowercase_suffix_are_nxdomain) now say NXDOMAIN. Two doc lines that ran together are rewrapped. (5) The e2e case could not run here: no /dev/net/tun. just lint-prose could not run: vale is not installed. just clippy-strict was not run. |
…-a-box-s-allow-list-fails-at-once-inst
…-a-box-s-allow-list-fails-at-once-inst
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 6 unresolved threads — minimal-foundry[bot] crates/minimald/src/net/guest_dns.rs:159, minimal-arch[bot] crates/minimald/src/net/guest_dns.rs:268, minimal-arch[bot] scripts/session-e2e.sh:2667, minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md, minimal-arch[bot] docs/specs/18-spec-box-networking/18-spec-box-networking.md, …. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
arch-review: PASS_WITH_CONDITIONS · 1 condition · the full ruling
The change conforms to §5.3 and §4.1. A name off the allow list is still refused at the relay and at the in-VM listener, and nothing is forwarded. Only the rcode changes, to NXDOMAIN with a root-owned SOA. The design names no rcode. The spec amendment follows the code, and the native-answerer residual now links #3020. One condition stays open: the real-box e2e legs did not pass on the coder's host. C1 requires them to pass at this head on the KVM lane before merge.
Ruled at 1945478 against gominimal/arch@7a86ec7bb3c0 by claude-opus-5-5.
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 19454787722f 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.
|
/revise Merge |
|
Round 3 of 10 on a /revise note: the coder changed nothing. every commit this round put on the branch above 1945478 is a merge of the base branch, so it carries no work of its own |
|
Round 4 of 10 on a failed check suite: the coder changed nothing. Noop round. I changed nothing, because no failed check points at a defect that a new commit can fix.
|
T130 — A name off a box's allow list fails at once instead of looking temporary
slice: S16
kind: task
covers: NET-141, NET-079
size: M
est: 140 code, 340 tests
executor: agent
difficulty: needs care
model: standard
diagnostics: what a person reads is the lookup failing at once: inside a box allowed only github.com,
getent hosts example.comexits 2 (not found) andnpm installstops at once instead of retrying a temporary failure for 60 s; the daemon logmin bugbundles carry keeps its rate-limited line naming the box and the nameobservability: the relay's rate-limited refusal line gains the rcode it answered (
NXDOMAIN), and the in-VM listener's refusal line does the samelayers:
- relay:
- crates/minimald/src/net/dns_gate.rs:
decideanswers a name off the box's allow list and outside the box zone NXDOMAIN instead of REFUSED, citing the root-owned SOA below in the authority section, and still forwards it to no resolver; the zone's own NXDOMAIN and NODATA answers stay as they aretest: cargo nextest run -p minimald unmatched_name_nxdomain_with_zone_negative_ttl
- guest:
- crates/minimald/src/net/guest_dns.rs: the in-VM listener for a deny-all host-address box answers an out-of-zone name NXDOMAIN with the same SOA; its NOTIMP, empty-question and in-zone NODATA answers stay
test: cargo nextest run -p minimald out_of_zone_name_is_nxdomain_with_root_soa
- soa:
- crates/boxes/src/core/zone_answer.rs: one builder for the SOA an out-of-zone NXDOMAIN cites: owner
., minimum 15 s and record TTL 15 s, tied toANSWER_TTL_SECS, so the negative is cached no longer than a positive answertest: cargo nextest run -p boxes out_of_zone_soa_is_root_owned_with_zone_minimum
- e2e:
- scripts/session-e2e.sh: the deny-all and partial-allow-list legs of own_ip_egress_declared_and_enforced assert rcode 3 with the root SOA in place of rcode 5, and keep the 5000 ms fast-failure bound
test: ./scripts/session-e2e.sh own_ip_egress_declared_and_enforced
- spec:
- docs/specs/18-spec-box-networking/18-spec-box-networking.md: NET-141 answers NXDOMAIN citing a root-owned SOA whose minimum is 15 s, in place of REFUSED, and its comment says why (REFUSED reaches glibc as a temporary failure that clients retry; the short negative TTL bounds the cache); NET-079's deny-all resolver sub-requirement comment says the in-VM guest resolver answers an out-of-zone name the same way
produces: none
consumes: none
depends on:
- blocked by #2943
- assumes OQ1 (one host DNS user per machine, the current behaviour; host setup refuses on a host whose installed service names another user)
- assumes OQ2 (the spec's interim holds: a native non-deny-all host-address box resolves through the host's resolver and its allow list is decided by address rules only)
proof: Inside a box allowed only github.com, a lookup of example.com fails at once as not found, and
npm installagainst a registry off the list stops at once instead of timing out.Proof
A box allowed only github.com now gets NXDOMAIN, not REFUSED, when it looks up example.com. The relay answers the lookup itself, cites a root-owned SOA with a 15 s minimum, and forwards nothing. glibc reads the answer as not found, so
getent hosts example.comfails at once, andnpm installagainst a registry off the list stops at once and does not retry a temporary failure. The in-VM listener for a deny-all host-address box answers the same way. The unit tests show this on the wire. The session e2e that shows it inside a real box could not run on this host.Notes from the agent: Design: the gate's
decidekeeps its signature. It now returns NXDOMAIN for the allow-list refusal.intercept_querytells that case apart from the zone's own NXDOMAIN (NET-006) byrefuses(question). Only the refusal gets the root SOA and the rate-limited warning. The warning now says 'answered NXDOMAIN ...' and carriesanswer = "NXDOMAIN". The guest listener has a newDecision::OutOfZone. Its debug line already carriesanswer=NXDomain. Its NOTIMP, empty-question REFUSED and in-zone NODATA answers are unchanged. The SOA fields come fromboxes::core::zone_answer::out_of_zone_soa(): owner., mnamens.min.internal., rnamehostmaster.min.internal., every timer and the TTLANSWER_TTL_SECS.dns_gate::out_of_zone_soa_record()converts it to hickory. The NET-141 testunmatched_name_refused_without_upstream_forwardis renamed tounmatched_name_nxdomain_with_zone_negative_ttl, and the spec's verify line follows it. The guest testout_of_zone_a_is_refusedis renamed toout_of_zone_name_is_nxdomain_with_root_soa. The NET-141 proptest now tells the refusal apart from the zone NXDOMAIN by the root SOA. Follow-up outside the layers:crates/minvmd/tests/guest_classifier_integration.rsguest_deny_all_resolver_reachable(ignored, MINVMD_E2E=1 VM lane) still expects rcode "5" andanswer=Refusedfrom the guest listener. It will fail on the VM lane until it ex…[truncated]Tests
cargo nextest run -p minimald unmatched_name_nxdomain_with_zone_negative_ttlcargo nextest run -p minimald out_of_zone_name_is_nxdomain_with_root_soacargo nextest run -p boxes out_of_zone_soa_is_root_owned_with_zone_minimum./scripts/session-e2e.sh own_ip_egress_declared_and_enforced3 0 root:15, andguest_deny_all_resolver_reachablepassed. The coder's runner has no/dev/net/tun, so its own run exited 1 before any DNS leg.Verify
min task run agent-verifypassed ([tasks.verify]).Base
The base branch moved while the coder worked; it was merged in before the tests ran.
Residuals
Closes #2948