remoteAdmin's policy is not pinned against composition; a blank host fails open in the provisioning guard #70

Closed
opened 2026-09-30 03:29:37 +01:00 by vnprc-agent · 1 comment

Four findings from a cold review of the landed range ba8f044..master, after allod/nexus#68 and the provisioning guard merged. Evidence, verified against the source.

  1. remoteAdmin's named-interface rule can be undone by ordinary composition. nix/remote-admin.nix:45 sets openFirewall = false and :56 adds per-interface rules, but nothing refuses the same port in the global lists. Trigger: any composed module declares networking.firewall.allowedTCPPorts = [ 22 ]; list merging succeeds and sshd is reachable on every interface. The module's check composes an uncontested fixture only.

  2. remoteAdmin's keys-only policy can be overridden. nix/remote-admin.nix:49 sets PasswordAuthentication = false and the others as ordinary definitions. Trigger: a composed module sets services.openssh.settings.PasswordAuthentication = lib.mkForce true; evaluation succeeds. Principle 4: a boundary that depends on cooperation is not a boundary.

  3. A declared-but-empty host fails open in the provisioning guard. scripts/lib/rotation-common.sh:143-146 maps "host": "" to nothing and :19 accepts every blank value, so { "host": "" } in vm-specs.json or vmFacts is treated as undeclared and provisioning proceeds. Inventory validation refuses that value at evaluation, so this is the backstop failing open, not the boundary.

  4. A bootstrap negative test can pass for the wrong failure. tests/bootstrap-orchestration.sh:17 runs test functions inside if, which suspends set -e inside them, so the assertions at :335-339 can fail without failing the test; only the final absence check decides. Trigger: bootstrap-vm exits early on an unrelated error and writes no known_hosts_vms.

Noted, not a defect: nix/configuration.nix:68 renders ALLOD_HYPERVISOR unconditionally, which is why every hypervisor's derivation changed with this range. The guard already falls back to hostname, so the variable may be redundant.

Refs allod/archetypes#89, allod/nexus#68

Four findings from a cold review of the landed range `ba8f044..master`, after allod/nexus#68 and the provisioning guard merged. Evidence, verified against the source. 1. **`remoteAdmin`'s named-interface rule can be undone by ordinary composition.** `nix/remote-admin.nix:45` sets `openFirewall = false` and `:56` adds per-interface rules, but nothing refuses the same port in the global lists. Trigger: any composed module declares `networking.firewall.allowedTCPPorts = [ 22 ]`; list merging succeeds and sshd is reachable on every interface. The module's check composes an uncontested fixture only. 2. **`remoteAdmin`'s keys-only policy can be overridden.** `nix/remote-admin.nix:49` sets `PasswordAuthentication = false` and the others as ordinary definitions. Trigger: a composed module sets `services.openssh.settings.PasswordAuthentication = lib.mkForce true`; evaluation succeeds. Principle 4: a boundary that depends on cooperation is not a boundary. 3. **A declared-but-empty host fails open in the provisioning guard.** `scripts/lib/rotation-common.sh:143-146` maps `"host": ""` to nothing and `:19` accepts every blank value, so `{ "host": "" }` in `vm-specs.json` or `vmFacts` is treated as undeclared and provisioning proceeds. Inventory validation refuses that value at evaluation, so this is the backstop failing open, not the boundary. 4. **A bootstrap negative test can pass for the wrong failure.** `tests/bootstrap-orchestration.sh:17` runs test functions inside `if`, which suspends `set -e` inside them, so the assertions at `:335-339` can fail without failing the test; only the final absence check decides. Trigger: `bootstrap-vm` exits early on an unrelated error and writes no `known_hosts_vms`. Noted, not a defect: `nix/configuration.nix:68` renders `ALLOD_HYPERVISOR` unconditionally, which is why every hypervisor's derivation changed with this range. The guard already falls back to `hostname`, so the variable may be redundant. Refs allod/archetypes#89, allod/nexus#68
Author

All four findings are fixed on master. The remote-administration policy is asserted on the composed values for settings, extraConfig, listenAddresses, ports and the firewall switch, each with a contested fixture; an empty declared host refuses on both data surfaces; the bootstrap harness makes its assertions load-bearing, which also exposed and repaired five tests that proved nothing.

All four findings are fixed on master. The remote-administration policy is asserted on the composed values for settings, extraConfig, listenAddresses, ports and the firewall switch, each with a contested fixture; an empty declared host refuses on both data surfaces; the bootstrap harness makes its assertions load-bearing, which also exposed and repaired five tests that proved nothing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
allod/nexus#70
No description provided.