From a90205bfcc4ee495d5615bb5bc1dc1c1bb80272a Mon Sep 17 00:00:00 2001 From: Gerrrt Date: Thu, 26 Nov 2026 05:53:55 +0000 Subject: [PATCH] docs(phoenix): record ADR-0135 applied on phoenix, 2026-11-26 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit build-the-jumpbox §6a from #1756 was applied: DisableForwarding yes and 50-cloud-init.conf removed. An ssh -L from a workstation was refused as administratively prohibited. security.md row 20 says applied, and the changelog records it. Refs #1496 Co-Authored-By: Claude Opus 5.5 --- docs/changelog.md | 11 +++++++++++ docs/security.md | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/docs/changelog.md b/docs/changelog.md index d151cea5..6464bd92 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,17 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-26 +- **`phoenix` runs ADR-0135.** `build-the-jumpbox.md` §6a, merged in + [#1756](https://github.com/Gerrrt/HomeLab/pull/1756), was applied on + `phoenix`. `10-phoenix.conf` gained `DisableForwarding yes`, and cloud-init's + `50-cloud-init.conf` was removed. `sshd -t` passed and the reload kept the + open Claude Code remote session. `sshd -T` reads `no` for password, + keyboard-interactive and root login and for X11 forwarding, and + `disableforwarding yes`. An `ssh -N -L` from a workstation logged in, and + the forwarded connection was refused as administratively prohibited. + `security.md` row 20 now says applied. Refs + [#1496](https://github.com/Gerrrt/HomeLab/issues/1496). + - **Correction to the entry below, "what the `bahamut` audit found, decided (ADR-0140)".** That decision is [ADR-0141](adr/0141-switch-three-of-the-dcs-shipped-defaults-and-keep-dsheuristics.md). diff --git a/docs/security.md b/docs/security.md index e66a9599..90451608 100644 --- a/docs/security.md +++ b/docs/security.md @@ -17,7 +17,7 @@ What this network is actually built to survive: | A lost or stolen tunnel peer | **Accepted.** A WireGuard peer is a device with a key and no second factor ([ADR-0042](adr/0042-terminate-the-remote-path-on-the-lab-and-route-it.md)); the firewall, not the key, bounds what it reaches — the lab and nothing else — with a `/32` pin on the server and a preshared key per peer. Revocation is a `wg0.conf` edit on `phoenix` ([runbook](runbooks/open-the-remote-path.md#rollback)), proportionate at two or three devices and recorded as the thing that stops being so | | An attacker on the lab segment reaching the hypervisor's BMC | **Accepted.** `shiva` stays on VLAN 30 by decision ([ADR-0033](adr/0033-keep-the-ilo-on-the-lab-segment.md)), hardened on 2026-09-09 — IPMI-over-LAN, SSH and Federation off, and its rule to the monitoring host deleted — and again on 2026-11-13, when a re-read found what that missed: a second administrator account, now deleted, the unauthenticated XML reply and SSDP, now off, and the lab's outbound internet through its DHCP gateway, now blocked on `morpheus`, so it reaches nothing off the segment ([`hardware.md`](hardware.md#management)); a BMC compromise in the lab costs the lab, and the tripwire watches what it initiates | | An attacker on the lab segment reaching the hypervisor's management plane | **Closed at the host, and watched.** `Saruman`'s Proxmox firewall admits `8006`, `8007` and `22` from Hicks and `8006` from the deployment host only. Nothing on `Saruman` listens on `8007`: ADR-0014 wrote one rule for two hypervisors ([ADR-0014](adr/0014-put-ifrit-on-imaginationlan-and-give-the-targets-no-route.md), [ADR-0043](adr/0043-keep-the-ca-on-prometheus-and-build-phoenix-as-the-deployment-host.md)). It was found disabled and turned on on 2026-09-20 ([#566](https://github.com/Gerrrt/HomeLab/issues/566)); since [#576](https://github.com/Gerrrt/HomeLab/issues/576) `homelab_pve_firewall_enabled` is read every five minutes and `PveFirewallDisabled` pages after ten, so a `pve-firewall stop` left in place is noticed rather than found. `PveFirewallPolicyAccept` does the same for `policy_in` left at `ACCEPT`, which reads as enabled and admits the whole segment. Behind the firewall, an audit on 2026-11-13 found `sshd` taking root's password and `root@pam` with no second factor on `8006`. Since 2026-11-25 `sshd` takes keys only and refuses X11 forwarding ([`harden-saruman.md`](runbooks/harden-saruman.md) §1). The second factor is §2, and it is not set yet | -| Someone on the lab segment reaching the domain's configuration path | **Scoped, key-only, and accepted for `phoenix` itself.** Each of ADR-0029's six listens on `22` for `ansible/` ([ADR-0077](adr/0077-configure-the-lab-domain-with-ansible-from-phoenix.md)). The rule admits `10.0.30.70` alone, `sshd` refuses passwords, and the only administrators' key is `phoenix`'s, installed by the template and never by hand on a clone. The residual: whoever owns `phoenix` owns the lab domain. That was already true through its Proxmox token, so it adds reach to nothing. Host keys are not pinned, because every rebuild replaces them. `phoenix`'s own way in is narrowed to match by [ADR-0117](adr/0117-give-phoenix-a-key-only-sshd-and-a-default-deny-inbound-policy.md): its `sshd` takes keys only, and its `ufw` admits `22` from Hicks and the tunnel's peers and nothing from the rest of VLAN 30. Applied 2026-11-19 ([#1496](https://github.com/Gerrrt/HomeLab/issues/1496)): `sshd -T` reads `no` for password, keyboard-interactive and root login, and `22` from `alexander` times out. [ADR-0135](adr/0135-turn-forwarding-off-on-phoenixs-sshd-and-remove-cloud-inits-file.md) adds `DisableForwarding yes`, so no key tunnels through `phoenix` to `8006` or anywhere else, and removes cloud-init's `50-cloud-init.conf`. Decided, not yet applied | +| Someone on the lab segment reaching the domain's configuration path | **Scoped, key-only, and accepted for `phoenix` itself.** Each of ADR-0029's six listens on `22` for `ansible/` ([ADR-0077](adr/0077-configure-the-lab-domain-with-ansible-from-phoenix.md)). The rule admits `10.0.30.70` alone, `sshd` refuses passwords, and the only administrators' key is `phoenix`'s, installed by the template and never by hand on a clone. The residual: whoever owns `phoenix` owns the lab domain. That was already true through its Proxmox token, so it adds reach to nothing. Host keys are not pinned, because every rebuild replaces them. `phoenix`'s own way in is narrowed to match by [ADR-0117](adr/0117-give-phoenix-a-key-only-sshd-and-a-default-deny-inbound-policy.md): its `sshd` takes keys only, and its `ufw` admits `22` from Hicks and the tunnel's peers and nothing from the rest of VLAN 30. Applied 2026-11-19 ([#1496](https://github.com/Gerrrt/HomeLab/issues/1496)): `sshd -T` reads `no` for password, keyboard-interactive and root login, and `22` from `alexander` times out. [ADR-0135](adr/0135-turn-forwarding-off-on-phoenixs-sshd-and-remove-cloud-inits-file.md) adds `DisableForwarding yes`, so no key tunnels through `phoenix` to `8006` or anywhere else, and removes cloud-init's `50-cloud-init.conf`. Applied 2026-11-26: `sshd -T` reads `disableforwarding yes`, `10-phoenix.conf` is the only drop-in, and an `ssh -L` from a workstation is refused as administratively prohibited | | Someone on the lab segment logging in to the sensor | **Closed at `sshd`.** `fenrir` sees every frame on `Saruman`'s lab bridge, and its `sshd` answers all of VLAN 30 with no host firewall. [`build-the-sensor-guest.md`](runbooks/build-the-sensor-guest.md) §3 makes `sshd` key-only for one user through a drop-in that outranks cloud-init's, refuses root and X11 forwarding, and keeps `authorized_keys` to the machines that administer the guest. The audit of 2026-11-13 found it very likely taking passwords, with X11 forwarding on and 18 distinct keys authorized, most imported from GitHub. The step was applied on 2026-11-17: `sshd -T` read `no` for all four settings with `allowusers atreus`, and `authorized_keys` went from 20 lines to the 2 keys that had logged in. The source address stays open: anyone on the segment can still offer a key | | Someone who takes the sensor reaching beyond its traffic | **Closed by clearing the guest, and re-checked hourly for drift by accident.** `fenrir` is an appliance ([`build-the-sensor-guest.md`](runbooks/build-the-sensor-guest.md) §0): the sensor stack, the agent collectors, the repository checkout and the stack's age key, and nothing else. The audit of 2026-11-13 found it used as a workstation as well: dotfiles, a stored Claude Code login with npm MCP servers reaching the internet, a `gh` token, the 1Password CLI and development packages, 4.8 GB in `$HOME`. All of it was removed on 2026-11-17, and a read the same evening found none of it: no user services beyond the distribution's, no TCP connection on the host's own sockets but inbound SSH from Hicks, and 180 MB in `$HOME`, nearly all of it the checkout. That read covered the host's network namespace only. The sensor's own Alloy, in its container, still pushes logs and metrics to `alexander`, as it is meant to. Since #1577 an hourly collector on `fenrir` re-reads what the runbook leaves (`sshd`, the keys, accounts and groups, user units, snaps, apt sources, host listeners, the size of `$HOME`) and the lab's `ApplianceCheckFailed` names a check that fails. That catches drift by accident only: whoever has root on `fenrir` can make it read clean, and the lab's Prometheus pages no one (ADR-0020), so it is seen by someone looking at the lab | | Someone on the lab segment logging in to `alexander` | **Closed at `sshd`.** `alexander` holds the lab's only age key, and its `sshd` answers all of VLAN 30 with no host firewall. It is installed by hand from the ISO, so it does not inherit the template's `allow-pw: false`. [`build-the-lab-guest.md`](runbooks/build-the-lab-guest.md) §2 makes `sshd` key-only through a drop-in, refuses root and X11 forwarding, and keeps `garnet`'s `authorized_keys` to Hicks's key and `phoenix`'s; §7 checks it with `sshd -T`. A read on 2026-11-15 found it taking passwords; the step was applied the same day, and `sshd -T` read `no` for all four settings. The source address stays open: anyone on the segment can still offer a key |