Merge in main
This commit is contained in:
+67
-6
@@ -1037,7 +1037,7 @@ reasonable for a controlled fleet; the highest-assurance path is attended/firmwa
|
||||
or manufacturer pre-provisioning. Default recommendation: **separate provisioning
|
||||
UKI + isolated VLAN + read-back verify.**
|
||||
|
||||
## [ ] 11. (DESIGN) TPM 802.1X identity enrolment (TOFU + OOB fingerprint)
|
||||
## [~] 11. (DESIGN) TPM 802.1X identity enrolment (TOFU + OOB fingerprint)
|
||||
|
||||
**Authoritative design consolidated 2026-06-28:
|
||||
[tpm-enrolment-design.md](tpm-enrolment-design.md)** — unifies this item with the
|
||||
@@ -1062,7 +1062,9 @@ approve → cert). **BENCH-VERIFY:** run against real step-ca (`bootstrap.sh` ro
|
||||
`enrol` provisioner password readable by the broker) and confirm an issued cert
|
||||
authenticates EAP-TLS.
|
||||
|
||||
**HOST SIDE BUILT 2026-07-02 — Go binary (`fleet-enrol`), awaiting bench.**
|
||||
**HOST SIDE BUILT 2026-07-02 — Go binary (`fleet-enrol`); TEST-PATH ENROLMENT
|
||||
BENCH-VERIFIED ON REAL HARDWARE (Dell 820, `rd.dot1x=0`, 2026-07-03).** Secure-path
|
||||
(802.1X/MACsec) enrolment still to verify — see the NV-index bench finding below.
|
||||
Pivoted from a shell hook to a static **Go + go-tpm** binary (`files/enrol/`):
|
||||
it talks to `/dev/tpmrm0` DIRECTLY (via `transport.FromReadWriter` on an
|
||||
`os.File` — no `linuxtpm`, so go-tpm is the only vendored dep), so the enrolment
|
||||
@@ -1157,7 +1159,7 @@ have their EK there), so enrolment could never create our key.
|
||||
(+ `tpm2_evictcontrol -C o -c 0x81000100` for a stale *app* key — never the EK), or
|
||||
BIOS "Clear TPM". Document in the bench README.
|
||||
|
||||
**BENCH FINDING 2026-07-03 (FIXED) — NV index `0x01800001` collided with OEM
|
||||
**BENCH FINDING 2026-07-03 (FIXED + BENCH-VERIFIED) — NV index `0x01800001` collided with OEM
|
||||
platform NV; moved to `0x01800100`.** The Dell 820 kept "finding a cert" and
|
||||
bypassing enrolment even after repeated BIOS TPM clears. `tpm2_nvreadpublic`
|
||||
showed the truth: `0x01800001` on that hardware is a **firmware/platform** index
|
||||
@@ -1173,9 +1175,18 @@ through the cmdline (`extract-artifacts.sh`), `fleet-enrol -nvindex`, the dracut
|
||||
hooks, bench scripts, invariant #1, and docs. Also **hardened `WriteNVCert`** to
|
||||
refuse a `platformcreate` index with a clear "pick a free owner index" error
|
||||
instead of a confusing undefine failure (regression `simtest/
|
||||
TestWriteNVCertRefusesPlatformIndex`). **BENCH-VERIFY:** 820 now enrols at
|
||||
`0x01800100`; and check `tpm2_nvreadpublic` on any OTHER hardware model in the
|
||||
fleet — if a vendor also squats `0x018001xx`, pick a value free on all of them.
|
||||
TestWriteNVCertRefusesPlatformIndex`). **BENCH-VERIFIED 2026-07-03 — the Dell 820
|
||||
enrols end-to-end at `0x01800100`.** First success on REAL TPM hardware (past the
|
||||
un-clearable OEM platform-NV at `0x01800001`): validates BOTH the NV-index move
|
||||
AND the `0x81000100` key-handle move on a physical TPM, not just the Proxmox
|
||||
swtpm — the full host ceremony (ensure ECDSA key → CSR → broker fingerprint →
|
||||
approve → leaf cert → NV write) runs on the metal. This was the hard case (the
|
||||
820 previously "found a cert" and silently bypassed enrolment every boot). **STILL
|
||||
BENCH-VERIFY:** (a) `tpm2_nvreadpublic` on any OTHER hardware model in the fleet —
|
||||
if a vendor also squats `0x018001xx`, pick a value free on all of them; (b) the
|
||||
enrolled cert actually **authenticates EAP-TLS on the secure path** (this run was
|
||||
test-mode `rd.dot1x=0`; 802.1X/MACsec enrolment still unverified — see the
|
||||
test-mode note above).
|
||||
|
||||
**BENCH-VERIFY (host side, before trusting):** (a) go-tpm against a REAL TPM +
|
||||
swtpm on the target (the simulator proves the ceremony, not the device) — **the
|
||||
@@ -1547,6 +1558,15 @@ tailoring; retires deviation-register #4).
|
||||
unchecked-hash` over the Python trees BEFORE the erofs build → mtime-independent
|
||||
`.pyc`, no rewrites, and MORE reproducible. (Worth doing regardless of firewalld —
|
||||
it's the true root cause of the firewalld AVCs seen 2026-07-03.)
|
||||
**[x] DONE (2026-07-03):** implemented in `diskless.pkr.hcl` — (a) the compileall
|
||||
`--invalidation-mode unchecked-hash` pass over `/usr/lib*/python3.*` at the end of the
|
||||
2d hygiene block (last step before erofs extraction), and (b) masked
|
||||
`dnf-makecache.timer` next to the existing `rhsmcertd` mask (it was the observed ~10-min
|
||||
post-boot trigger that re-imported the dnf Python stack). Confirmed live on a booted host
|
||||
via the overlay audit: `dnf/libdnf/librepo/rhsm` `__pycache__` rewritten at boot+10min.
|
||||
**BENCH-VERIFY:** after a rebuild, no more `.pyc` files appear in the overlay
|
||||
(`find / -xdev -newermt '1980-01-01' -path '*__pycache__*'` empty) and the `lib_t`
|
||||
`.pyc` AVCs stop in the SIEM. Items 1 & 3 (firewalld enablement + tailoring) still OPEN.
|
||||
3. **Tailoring:** re-select the 4 firewalld rules.
|
||||
|
||||
**THE load-bearing bench gate (why #4 deferred it):** the NVMe/TCP root is an OUTBOUND
|
||||
@@ -1556,6 +1576,47 @@ default → should, but UNVERIFIED); a reconnect within `ctrl_loss_tmo` re-estab
|
||||
*through* the firewall; DHCP renew + MKA keepalives unaffected; SSH in; no AVCs; verity
|
||||
hash reproducible. If it drops the root, that is the fleet-wide outage risk — gate hard.
|
||||
|
||||
## [~] 17. Cap fapolicyd trust-DB RAM (`db_max_size`) — biggest overlay consumer
|
||||
|
||||
**Finding (overlay RAM audit, 2026-07-03, host `cygnus-cruiser-99`):** the writable root
|
||||
is `systemd.volatile=overlay` (a tmpfs). Enumerating runtime-written files via the `-T 0`
|
||||
trick — every baked file has mtime = epoch, so anything newer is an overlay write:
|
||||
|
||||
```bash
|
||||
sudo find / -xdev -type f -newermt '1980-01-01' -printf '%b\n' | awk '{s+=$1*512} END{print s/1048576" MiB"}'
|
||||
```
|
||||
|
||||
showed **124.5 MiB** total, of which **`/var/lib/fapolicyd/data.mdb` = 100 MiB, FULLY
|
||||
allocated** (`du` == `du --apparent-size`, not sparse) — **~80% of the entire overlay.**
|
||||
fapolicyd's LMDB trust DB is rebuilt at boot onto the tmpfs overlay, so its `db_max_size`
|
||||
(MB, in `/etc/fapolicyd/fapolicyd.conf`) is a **fixed RAM reservation**, not a ceiling it
|
||||
grows into. The EL9 default is ~100; the minimal+kiosk trust set is a fraction of that.
|
||||
|
||||
**[x] DONE (2026-07-03):** `diskless.pkr.hcl` 2c-STIG-postfix now seds
|
||||
`db_max_size = 50` into `fapolicyd.conf` BEFORE the `fapolicyd-cli --update` rebuild (so
|
||||
the rebuilt db uses the smaller map). Value 50 chosen conservatively — it was fapolicyd's
|
||||
upstream default for years and covered a FULL workstation rpmdb (larger than this image),
|
||||
so it has real headroom. Reclaims ~50 MiB of overlay RAM.
|
||||
|
||||
**[ ] BENCH-VERIFY (STIG-critical — fapolicyd is the writable-overlay exec guard):**
|
||||
1. Boot the rebuilt image; confirm kiosk renders, admin SSH (ECDSA) logs in, `sudo`
|
||||
works, and custom binaries (`kiosk-session`, `fleet-hostapi`, `fleet-enrol`) still
|
||||
execute — i.e. the trust DB rebuilt cleanly at 50 MiB with no `MDB_MAP_FULL`.
|
||||
Undersizing bricks exec (login/kiosk) — that's the hard gate.
|
||||
2. Re-run the overlay audit: `data.mdb` should now be ~50 MiB and total overlay ~75 MiB.
|
||||
3. **Can go lower:** measure the real trust set with `fapolicyd-cli --dump | wc -l` on the
|
||||
booted host; if the content is only ~15–25 MiB, 40 (or less) is safe and reclaims more.
|
||||
|
||||
**Secondary lever (free, already in flight):** the trust DB scales with trusted files, so
|
||||
the kiosk weak-deps trim (commit `a193dc3`, ~100 fewer packages) shrinks the *actual*
|
||||
`data.mdb` content — widening the headroom under `db_max_size`.
|
||||
|
||||
**Other overlay consumers noted (not fapolicyd, for context):** Chromium `/dev/shm`
|
||||
(~38 MiB, its own tmpfs) + kiosk `/tmp/kiosk-profile` (on the root overlay here — `/tmp`
|
||||
is NOT a separate tmpfs, ties to #15's mount separation); `/var/log/{messages,audit}`
|
||||
grow unbounded in RAM (audit is local-only) — logrotate caps or SIEM offload on
|
||||
long-lived hosts.
|
||||
|
||||
## [~] 18. Slim the image — locale + firmware (biggest erofs-size wins)
|
||||
|
||||
**Finding (image-size audit via the 2b `rpm -qa --qf '%{SIZE}'` manifest, 2026-07-03):**
|
||||
|
||||
Reference in New Issue
Block a user