Diskless goldens over iSCSI, Add hardware, maintenance VM in the browser, machine power / display / hardware list, roles with permissions and HTTPS for the web admin. Includes the security fixes from the review on #2.
Co-authored-by: Mojo-LB <35627917+Mojo-LB@users.noreply.github.com>
BIOS PXE ROMs (DHCP arch 0) got no boot file; Broom was UEFI-only.
- DHCP/TFTP: serve undionly.kpxe (iPXE with bios.ipxe embedded:
chains autoexec.ipxe, so router-DHCP mode does not loop)
- SSD on BIOS machines: MBR (Windows boots BIOS only from MBR),
marked by disk id "BROM" ("BROL" Linux-only); partition role
from its place. GPT<->MBR layout redone on firmware mode switch
- Windows stage: no BootNext under BIOS. Writes the boot
partition + MBR code from bios.tar.gz, then POST /api/boot/local;
the next /boot.ipxe sanboots that drive once (120 s, only from
the IP of the machine's menu choice). Drive found via EDD MBR ids
in /sys/kernel/boot_params, no edd module
- prep-win: build broom\bios (fixed MBR VHD, bcdboot /f BIOS);
publish packs it as bios.tar.gz when present
- strict reset on BIOS: bootorder task deletes \bootmgr and drops
BROOMWIN/BROOMEFI drive letters
- shim line skipped on pcbios; deploy warns on UEFI image to BIOS PC
Windows goldens prepped before this boot UEFI clients only: run the
prep command again, upload, Publish. Stage bundle needs a rebuild.
The web admin and Capture ran over plain HTTP and sent the owner
password in the clear on a LAN that may not be isolated.
- auth: 4-message handshake (hello → salt + nonce → proof → server
proof). PBKDF2-SHA256 runs on the client; the server keeps a
verifier only, so a copied DB logs nobody in and a sniffed sign-in
yields no password or replayable proof.
- new passwords (setup, change, owner reset) travel as verifiers
sealed with the handshake's session key, or the setup token for
the first owner; neither the token nor the password is sent
- web: SHA-256/HMAC/PBKDF2 in plain JS (crypto.js), since WebCrypto
is off on http:// to an IP; values pinned against the Rust side
- capture: same handshake, checks the server's proof
- deps: argon2 out (no server-side KDF left), pbkdf2 in; random
bytes from getrandom(2)
- ci: SLSA build provenance (attest-build-provenance) on every
release file
- docs: quick start checks SHA256SUMS and explains
`gh attestation verify`; read-before-run variant of the prep
scripts
- prep-linux.sh: body in main() so a cut-off `curl | bash` runs
nothing
- comments: drop stale "one-time token" wording for the prep
scripts
BREAKING CHANGE: accounts store a verifier instead of an argon2
hash and sessions gain a key column; an existing bootrom.db no
longer works, so start with a new one. /api/auth/login takes
{hs, proof} after /api/auth/hello; /api/password and /api/users
take a sealed `cred` instead of a plain password.
Parser inputs come from the LAN or uploads and run as root; mutation
fuzzing found three panics:
- dns: a query with QDCOUNT 0 panicked the response builder
(any LAN host could take DNS answers down)
- gpt: huge LBAs overflowed the byte offsets
- lvm: negative or huge metadata numbers overflowed segment offsets
Sessions move to a `sessions` table (blake3 of the token stored, never
the token): logout ends the session on the server, so a copied cookie
dies too; a password change or a deleted account ends all of that
account's sessions.
- agentauth: hmac crate instead of a hand-rolled HMAC-SHA256
- tests: no-panic fuzz of DHCP, DNS, TFTP, iSCSI sessions, SCSI CDBs,
GPT/MBR, VMDK, LVM, ext4, NTFS (BROOM_FUZZ=N for deeper runs)
- tests: app.js lint, every ${} in HTML templates escaped or vetted;
esc the volume state, CSS.escape the page selector
- tests: account rights and session ends in the API contract test
- build: binary version = release tag (UTC timestamp) via
BROOM_VERSION; build.sh stamps local builds with the build time
BREAKING CHANGE: session_secret and pw_gen are gone; existing session
cookies are invalid, everyone logs in again.
- Introduced a new `metrics.rs` module to handle per-machine hardware health metrics (CPU %, RAM %, temperatures, disks).
- Updated the `broom-watch.ps1` script to reference System.Management for improved functionality.
- Modified `AppState` to store and retrieve metrics for each machine.
- Enhanced the `MachineStatus` struct to include metrics data.
- Implemented disk health checks using SMART data for NVMe and SATA disks in `sysmon.rs`.
- Updated the VNC agent to push hardware health metrics over WebSocket connections.
- Enhanced the frontend to display hardware health metrics in the UI, including disk status and temperatures.
- Added unit tests for metrics parsing and disk health attribute extraction.
- Implemented a remote agent (broom-vnc.exe) that allows viewing and controlling Windows machines via a WebSocket connection.
- Updated broom-watch.ps1 to start the VNC agent and ensure it runs in the console session.
- Added new API endpoints for VNC agent management and viewing.
- Created a new remote page in the web interface for connecting to and controlling Windows machines.
- Enhanced asset management to include VNC-related scripts and binaries.
- Updated the frontend to support remote control features, including mouse and keyboard events.
- Added tests for VNC agent and viewer functionality.
- Enhanced `serve` function in `goldenram.rs` to read and send data in 1 MB chunks concurrently, improving throughput.
- Updated `hash.rs` to implement a more efficient `sha256_with` function that reads data in parallel while hashing, reducing overall processing time.
- Modified `write_chunk` in `images.rs` to skip writing zeroed MBs, optimizing disk usage.
- Improved `command` function in `conn.rs` to streamline read operations.
- Optimized `read_at` method in `overlay.rs` to read neighboring blocks in a single call, reducing disk access overhead.
- Adjusted `main.rs` to increase the buffer chunk size for TFTP service, enhancing data transfer efficiency.
- Refined `status` function in `monitor.rs` to limit concurrent pings, improving responsiveness and resource management.
- Changed default `boot_timeout` in `settings.rs` from 10 to 3 seconds for quicker boot processes.
- Updated `autoexec` function in `tftp.rs` to utilize existing IP addresses, reducing DHCP wait times.
- Enhanced `sha256` function in `vhdx.rs` to leverage the new `sha256_with` for better performance.
- Added tests for sparse file writing and hash caching behavior in `hash.rs` and `golden.rs` to ensure correctness and performance.
- Implemented a test for the Linux client boot process, simulating DHCP, TFTP, HTTP boot menu, and iSCSI login.
- Created minimal client implementations for HTTP, DHCP, TFTP, and iSCSI protocols.
- Established a sandbox environment for integration tests with isolated network namespaces.
- Added lifecycle tests to ensure server data persistence across restarts and validate single instance enforcement on the same port.
- Verified that the iSCSI daemon outlives the server process, maintaining session integrity.
- Changed constants for iPXE binaries in `boot.rs` to functions that retrieve assets dynamically.
- Updated the `broom_prep` function in `images.rs` to use the new asset retrieval method for the prep script.
- Modified `main.rs` to load HTML and JavaScript assets using the new asset functions, removing hardcoded strings.
- Refactored overlay scripts in `overlay.rs` to use functions for asset retrieval instead of constants.
- Updated TFTP server in `tftp.rs` to serve iPXE binaries using the new asset functions.
- Adjusted Windows stage scripts in `winstage` module to load scripts dynamically from assets.
- Ensured all tests reflect the changes in asset handling, maintaining functionality and correctness.
DHCP (Network page, only shown when broom is the DHCP server):
- iPXE: don't wait for ProxyDHCP (option 175.176), default on
- Authoritative NAK for machines asking for an IP that isn't theirs, default on
- Send hostname (option 12), default on
- Rapid Commit (RFC 4039, option 80): ACK straight after DISCOVER when the
client asks for it, default off
- DNS: one input per server ("+ DNS"), up to 8; the server validates them,
drops duplicates and keeps the order
Comments across src, scripts, web, build.sh, CI and README brought in line
with the current code (module split, stage bundle from CI, no distro
packages, TFTP always on).
Note: the comment edits change the embedded scripts, so the next publish
rebuilds the golden image and the stage once, and each Windows machine
downloads the delta and rebuilds its base once.
- bootrom-mgmt build-stage <dir> --kernel <ver>: the stage (kernel + initrd)
for a given kernel + Ubuntu's signed shim → broom-stage.tar.gz (CI, root)
- CI installs linux-image-generic + shim-signed + the stage tools on the
runner, builds the bundle, appends its sha256 + release URL to
mgmt/stage.pin (embedded with include_str!, comments only in git = local
build), rebuilds the binary and releases broom-stage.tar.gz with it
- server: on the first Windows publish (or Linux publish with Secure Boot
on), use broom-stage.tar.gz next to the binary if present (offline
server), else download it over HTTPS (ureq, rustls, built-in roots);
only the pinned sha256 is accepted; unpacked into tftp/broom-stage as a
whole; the Secure Boot shim comes from it too
- a binary without a pinned bundle (local builds) builds the stage on the
server as before; preflight asks for the stage packages only then, and
warns about missing kernel modules (loop, ntfs3, LIO target, zram)
- archive::untar_gz (refuses paths escaping the target)
- vmdk.rs: read VMDK descriptors (text or embedded) with SPARSE (grain
tables; streamOptimized zlib grains + footer), FLAT/VMFS and ZERO extents
into a sparse raw golden, one grain table / 32 MB flat piece per thread;
refuse snapshots/linked clones (parentCID), extent paths outside the
upload folder and SE sparse; write monolithicSparse (64 KB grains,
redundant tables) for exports
- vhdx.rs: write the golden as a dynamic VHDX (32 MB blocks stored in
virtual-disk order, so a golden always lays out the same way for the
clients' delta updates); header/metadata builder shared with the
differencing templates
- writers read a window of blocks in parallel, place them in disk order,
write in parallel (reused buffers, workers x 32 MB of RAM)
- disk.rs: Source (files/ranges joined into one virtual disk, sparse holes
skipped with SEEK_DATA/SEEK_HOLE), workers() + par_map
- publish/winstage/export use them; qemu-utils dropped from preflight
- tests check against qemu-img (installed in CI for tests only): every
VMDK subformat reads back byte-identical, written VHDX/VMDK pass
qemu-img check and convert back to the same bytes; bench_convert
(ignored) times broom vs qemu-img on a given raw
260f025 only held what was already staged (ipxe-src removal + patches);
the new mgmt/ipxe/build.sh, build.sh, sources, UI and README were left
out, so CI ran the old script against the deleted ipxe-src.
- mgmt/ipxe/build.sh: fetch upstream iPXE at IPXE_COMMIT, apply
patches/, build snponly.efi, delete the checkout (KEEP_IPXE_SRC=1)
- TFTP serves autoexec.ipxe (router DHCP can boot clients); autoexec
skip patch dropped
- auth: setup token, per-IP throttle, password change rotates sessions
- DHCP off by default, gateway/DNS required, no NAK for foreign
clients, static IP vs live lease, relayed packets ignored, HTTP bound
first
- Windows stage: safe disk choice, per-image base mode, boot-file
sha256 check every boot, strict reset, "not reset" flag, one-time
prep link, license re-arm + 30 min window, driver/chunk hash checks,
blake3 keys
- install-service subcommand, README ops/backup/DHCP/strict docs
Harden the mgmt app against an untrusted shared LAN, gate the web admin
behind a login, replace proxyDHCP with a DHCP on/off toggle, make Linux
goldens boot reliably (LVM), and prep the repo for release under Apache-2.0.
Auth & web admin
- Admin login on its own /login page; stateless blake3-signed session
cookie (survives restarts). Host-header check. All /api/* gated; only
boot/client endpoints stay open.
Security review remediation (all CRITICAL + HIGH, most MEDIUM/LOW)
- TFTP serves only the embedded snponly.efi.
- VMDK/zip/upload/virtual-size limits; qemu-img forced with -f vmdk.
- DHCP lease pruning, DECLINE/config validation, bind-then-abort restart.
- License handed out by bound-IP + ARP-MAC check (POST, one-time).
- Stored-XSS via DHCP hostname closed (sanitise option 12 at ingest).
- Golden-chunk: Semaphore(8) + reject out-of-range index before reading.
- iSCSI republish made safe: per-generation IQN + zram hot-swap, GC when
idle; disk-cache publish/rollback refused while clients are connected.
- for_machine stores hwids only for known MACs; upload-chunk blocked
during a running job; internal errors no longer leak OS paths.
DHCP
- Remove proxyDHCP and the :4011 boot server. dhcp_mode is now full|off:
broom is the LAN's DHCP server, or off when another server owns the LAN.
Linux golden boot
- Activate LVM volume groups read-only in the initrd (the iSCSI LUN is
read-only, so the stock lvm2 hook's writable vgchange fails) — LVM
goldens now boot.
- Hide broom's own SSD partitions (broomwb/broomcache) from the desktop.
- Refuse to publish a VM that attaches more than one disk (ambiguous which
is the OS) instead of silently converting the wrong one.
Docs & licensing
- Apache-2.0 (LICENSE + NOTICE); bundled iPXE stays GPLv2/UBDL.
- Rewrite README; drop internal dev logs; stop tracking mgmt/dist/.
Tests: 59 unit + 4 live (LIO/zram/ping/LVM) green.
BREAKING CHANGE: proxyDHCP is removed; an install with dhcp_mode=proxy now
behaves as "off" and must enable the DHCP server (Network page) to boot.
- Added driver management functionality, allowing custom Windows drivers to be uploaded and associated with machines.
- Implemented a new page for driver uploads, including a user-friendly interface for managing driver packages.
- Introduced filtering options in the machine list, enabling users to filter by hostname, group, IP, MAC, status, and license.
- Updated the backend to handle driver uploads, processing .zip files containing extracted driver folders, and extracting hardware IDs from .inf files.
- Enhanced the database schema to support driver associations with machines based on hardware IDs and groups.
- Added unit tests for driver handling and filtering logic to ensure reliability and correctness.