Commit Graph
31 Commits
Author SHA1 Message Date
Morning StarandMojo-LB 0d49fc8428 feat: diskless machines (no SSD), machine power / display / hardware list, HTTPS admin (#3)
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>
2026-11-22 11:28:59 +07:00
morningstar-sudo d4ad73166b feat(boot): support legacy BIOS clients
BIOS PXE ROMs (DHCP arch 0) got no boot file; Broom was UEFI-only.

- DHCP/TFTP: serve undionly.kpxe (iPXE + embedded bios.ipxe:
  chains autoexec.ipxe, so router-DHCP mode does not loop)
- iPXE patch 0003: menu rules as CP437 0xc4 on the BIOS text
  console, which does not decode UTF-8 (screen was garbled)
- SSD on BIOS machines: MBR (Windows boots BIOS only from MBR),
  disk id "BROM" ("BROL" Linux-only), partition role from its
  place. Relaid only when the table is surely of the other kind
- Windows stage: no BootNext under BIOS. Writes the boot
  partition + MBR code from bios.tar.gz, then POST
  /api/boot/local; next /boot.ipxe sanboots that drive once
  (300 s, only from the IP of the machine's menu choice). Drive
  from EDD MBR ids in /sys/kernel/boot_params, no edd module
- prep-win: build broom\bios (fixed MBR VHD, bcdboot /f BIOS);
  any failure there leaves a UEFI-only golden, never stops prep.
  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 firmware mismatch
- docs: legacy BIOS, tested on Windows 11 Pro and Enterprise

Windows goldens prepped before this boot UEFI clients only: run the
prep command again, upload, Publish. Stage bundle needs a rebuild.
2026-10-30 16:27:32 +07:00
morningstar-sudo 4891415ffa feat(boot): support legacy BIOS clients
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.
2026-10-30 14:26:52 +07:00
morningstar-sudo 3a5f6e9c23 feat(images): dedupe versions, serve goldens in one piece
Each upload/Capture writes a new image.img, so every version took its
full size. On XFS reflink/btrfs the version before a new golden now
gives back shared blocks (FIDEDUPERANGE; blake3/64K index in .bhash).
Only version files are deduped, never a served image.img.

- publish rebuilds an image.img scattered by dedupe before serving it
  (rollback, → New image); stamp kept, no rehash or golden rebuild
- Dedup button for versions saved earlier, after a move or restore
- Server → Disks formats XFS with reflink first, ext4 as fallback
- fix: move left a Linux image without its iSCSI target, and a
  Windows golden served from the old, deleted file
- docs: user guide; README and Pages updated
2026-10-29 22:43:20 +07:00
morningstar-sudo 35b10703b2 feat(auth)!: password-free sign-in handshake, signed releases
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.
2026-10-19 02:56:54 +07:00
morningstar-sudo c91b21dbb9 refactor!: drop upgrade paths from pre-2026-10-09 servers
No server runs an older version; every deploy starts fresh, so the
code that migrated old installs goes.

- remove LIO/zram-kernel cleanup, dnsmasq/tftpd takeover, old
  directory layout move, admin_pw → owner account conversion
- remove DB migrations: schema comes from SCHEMA only, unique
  indexes live there; leases lose the always-"full" source column
- rename config keys ltsp_user/ltsp_password → guest_user/
  guest_password
- golden: no ServeFile fallback for a golden.vhdx file (404 →
  publish again), drop tower dependency
- versions: drop 4 MB chunk versions, a version is its file only
- iscsid: peers is a plain list, no "old daemon" branch
- publish refuses a golden prepped without the script stubs
  (was a warning: its scripts never updated)
- stage/linux-cache: stop cleaning delta-update leftovers
- tests: reuse disk.rs readers in vhdx tests
- docs: README rewritten shorter (618 → 259 lines), Pages updated,
  imaging (capture/deploy) added to the comparisons

BREAKING CHANGE: an existing bootrom.db is not migrated: start with
a new one. Goldens prepped before 2026-10-09 must be prepped again
in the VM before upload.
2026-10-19 01:41:33 +07:00
morningstar-sudo bce46d7d61 feat: enhance driver layer handling and update related documentation 2026-10-18 21:53:23 +07:00
morningstar-sudo cb597c1d66 Refactor Windows base mode handling and database schema
- Removed the `base_mode` field from the `Image` struct and related database schema.
- Introduced `base_image` field in the `Machine` struct to track the Windows image that boots its base.
- Updated database schema to reflect changes, including migration for existing databases.
- Modified relevant database methods to support new base mode functionality.
- Updated API routes and handlers to manage base mode settings for machines.
- Adjusted frontend code to include base mode selection and display.
- Removed obsolete references to the old base mode logic in tests and other modules.
2026-10-18 21:06:19 +07:00
morningstar-sudo 9c91d92917 feat: update documentation and images for diskless boot features, including capture and deploy functionality 2026-10-18 17:30:54 +07:00
morningstar-sudo 0b962d793e Implement GPT backup relocation and enhance image deployment API
- Add `move_backup_gpt` function to relocate the GPT backup header and entries to the end of a larger disk.
- Modify the export module to include `full_disk` function for handling Windows images with preserved boot partitions.
- Introduce new API endpoints `/api/images/deploy-map` and `/api/images/deploy-chunk` for retrieving image deployment information and chunks.
- Update image routing to include the new deployment endpoints.
- Enhance end-to-end tests for capturing and deploying images, ensuring proper functionality of the new features.
- Add unit tests for the `move_backup_gpt` function to verify correct behavior and partition integrity after relocation.
2026-10-18 17:18:24 +07:00
morningstar-sudo cfac831baf feat: add disk capture functionality and enhance SSD settings
- Implemented disk size retrieval in `disk.rs` to handle empty files.
- Introduced a new module `capture` in `main.rs` for handling disk capture requests.
- Added a new endpoint `/broom-capture` to serve the binary for capture operations.
- Enhanced NTFS reading capabilities with methods to retrieve file head and used ranges.
- Updated SSD settings to include a configurable pagefile size, with appropriate validation.
- Modified frontend to support new SSD settings, including pagefile input.
- Added tests for capture functionality and NTFS bitmap handling.
2026-10-18 15:52:47 +07:00
morningstar-sudo 40c8d42349 Refactor iSCSI disk terminology and add DNS functionality
- Updated logging and error messages to replace "games disk" with "iSCSI disk" for consistency across the codebase.
- Added a new DNS module to manage DNS server functionality for healthy machines.
- Enhanced the monitoring system to include DNS status and blocked states.
- Updated front-end pages to reflect changes from "games disks" to "iSCSI disks" and added DNS configuration options.
- Implemented unit tests for the new DNS functionality, including query handling and IP resolution logic.
2026-10-18 10:10:02 +07:00
morningstar-sudo 10c9358ecd feat: Enhance disk management features and UI updates
- Added functionality to display and manage local disks in the server and games pages.
- Implemented disk visibility options for machines, allowing users to hide non-Broom disks from guests.
- Introduced server disk selection for images and games, enabling users to choose where to store new disks.
- Updated various HTML pages to reflect new disk management features, including server disk selection in images and games sections.
- Added unit tests for disk parsing and volume management to ensure robustness.
- Improved user experience with clearer messaging and options related to disk management.
2026-10-17 13:42:45 +07:00
morningstar-sudo 21269130f7 feat: enhance documentation with new images and descriptions for remote control and server monitoring features 2026-10-17 09:05:13 +07:00
morningstar-sudo 0bcfde26e8 feat: add logs page and enhance server monitoring
- Added a new "Logs" page accessible from the navigation menu, displaying the last 2000 log lines with filtering options.
- Enhanced the server monitoring page by adding visualizations for CPU, RAM, network usage, and disk activity over the last 10 minutes.
- Introduced a new test for token rechecking to ensure token validity based on the current secret and expiry.
- Added unit tests for log buffer functionality, ensuring proper filtering and color stripping.
- Implemented a new test for calculating traffic rates between two samples in the system monitoring tests.
2026-10-17 08:50:31 +07:00
morningstar-sudo 2b8856bb8f Enhance documentation and improve DHCP pool management
- Updated README.md to reflect support for up to ~100 PCs per server and added sizing details.
- Revised Vietnamese documentation to clarify the capacity of Broom for larger rooms.
- Adjusted comparison documentation to indicate that Broom is designed for larger setups.
- Enhanced index documentation to include sizing information.
- Implemented DHCP pool management to calculate the number of required addresses based on registered machines and leases.
- Improved VNC management to handle viewer attachments and control sessions more effectively.
- Added client-side paging options for machine and remote views, allowing for better navigation and organization.
- Updated tests to cover new DHCP pool calculations and VNC viewer behavior.
2026-10-17 01:04:06 +07:00
morningstar-sudo a181b23325 feat: enhance remote control features and health monitoring in web admin 2026-10-17 00:43:44 +07:00
morningstar-sudo 79be73dd32 Refactor and enhance management interface for Windows 11 diskless boot
- Updated documentation for guest user settings in Broom's web admin.
- Improved VNC agent script with enhanced logging and privilege management.
- Modified PowerShell script to compile VNC agent using .NET Framework's csc.
- Added new HTML pages for server and games management, including relevant functionality.
- Updated existing pages to reflect new structure and improved user experience.
- Removed obsolete SSD settings from system page and consolidated them into the Windows page.
- Enhanced server monitoring features and adjusted alert settings for better resource management.
2026-10-16 21:23:00 +07:00
morningstar-sudo 303bebcde2 feat(games): add RAM option for games.img serving
- Introduced a configuration option to serve games.img from a RAM copy, improving read performance.
- Implemented background loading of the RAM copy and handling of stale copies during merges.
- Updated the state structure to track RAM loading status and merge counts.
- Enhanced the API to toggle RAM serving and retrieve relevant information.
- Added frontend support for managing the RAM serving option in the UI.
- Updated tests to cover new RAM functionality and ensure proper behavior with incompressible blocks.
2026-10-16 11:58:00 +07:00
morningstar-sudo 61abe63a7c feat: update documentation for FACEIT Anti-Cheat support and improve clarity on features 2026-10-13 17:40:30 +07:00
morningstar-sudo 3e67f52dba feat: enhance documentation with structured content, SEO improvements, and FAQs 2026-10-13 14:06:16 +07:00
Morning Star aeaf03ad02 Update default.html 2026-10-13 13:44:04 +07:00
morningstar-sudo e03cb0cb3e feat: update site configuration and layout, add Open Graph image 2026-10-12 23:34:34 +07:00
morningstar-sudo 49a0e1e1d0 feat: update image formats to WebP and enhance documentation layout 2026-10-12 23:23:13 +07:00
morningstar-sudo 7d82ac79ca feat: add favicon and update README with logo 2026-10-11 23:28:24 +07:00
morningstar-sudo 2dea7c219b feat: add default image configuration for FACEIT Anti-Cheat in Jekyll config 2026-10-11 23:19:50 +07:00
morningstar-sudo f8558f6647 feat: update documentation URLs to reflect new domain and add CNAME file 2026-10-11 23:10:44 +07:00
morningstar-sudo 4bec40762e feat: enhance documentation and add guides for diskless boot setup, FACEIT Anti-Cheat, and Broom comparison with CCBoot 2026-10-11 23:07:00 +07:00
morningstar-sudo 8e529043d6 feat: security hardening, admin login, DHCP toggle, LVM goldens
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.
2026-09-29 20:01:08 +07:00
morningstar-sudoandClaude Opus 5.5 88f41f3112 feat: Windows diskless via native VHDX boot, own iPXE build, drop LTSP
- Windows (Phase W): sysprepped VM .vmdk -> golden.vhdx + child VHDX
  (vhdx.rs); a Linux stage on the client SSD downloads/verifies the
  golden, resets the child every boot and enforces BootOrder
  (PXE -> Broom Windows -> Windows Boot Manager); computer name comes
  from the Machines table (broom.host -> Rename-Computer at base creation)
- Linux: SSD writeback + golden read cache on the client SSD; LTSP removed
- iPXE: upstream source vendored in mgmt/ipxe/ipxe-src and edited in
  place (menu layout with hint/countdown/footer, one-line banner, no
  autoexec lookup, no Ctrl-B wait); snponly.efi embedded in the binary
- Boot menu: machine name via boot.ipxe?mac=, per-server random iSCSI IQN
- Web: one route per page, SSE server liveness dot, hostname validation
- One-step build: build.sh (Linux/WSL) + build.cmd (Windows double-click)
- Stop tracking build cache/local DB; .gitignore + .gitattributes
- All code comments, logs, UI and docs in English

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 20:07:48 +07:00
morningstar-sudo ef95f0d837 first commit 2026-09-02 22:37:29 +07:00