Commit Graph
119 Commits
Author SHA1 Message Date
morningstar-sudo b7a0c490ce docs(readme): what the server needs from the operating system
The boot server itself needs no packages. Only the VM features (QEMU, OVMF,
KVM; installable from the Diskless page) and formatting a disk as XFS
(xfsprogs) use programs of the system; install-service needs systemd.
2026-11-22 12:58:16 +07:00
Morning Star d9da6b5109 feat(onboard): Add hardware without ntfs-3g and iscsiadm (the job reaches the VM over HTTP) (#7)
The golden's startup task fetches the server's script at every start; for the VM of a running Add hardware job the server answers with broom-onboard.ps1 and the job's token. The script gets the job and the library's drivers over HTTP and posts its result; the VM's disk is an NBD export. Nothing is written into the golden's disk by the server: no iscsiadm, no ntfs-3g. The Update script feature is removed. The VM features now need QEMU and OVMF only.
2026-11-22T05-57-33Z
2026-11-22 12:57:33 +07:00
Morning Star 6494dc3ebf feat(vm): the maintenance VM's disks over NBD from the iSCSI daemon (no iscsiadm) (#6)
The daemon serves a golden / games disk to QEMU over a root-only Unix socket (NBD) through the same layers and write-key rule as an iSCSI update session; the maintenance VM needs no open-iscsi. pkgmgr is per feature (VM: QEMU + OVMF).
2026-11-22T05-38-19Z
2026-11-22 12:38:19 +07:00
Morning Star 51f1388bc7 feat(pkgmgr): detect the package manager, list what the VM features lack, Install button (#5)
Server packages card on the Diskless page: detects apt / dnf / yum, lists what the VM features lack with that system's package names, and an owner-only Install button that runs the command as root with live output.
2026-11-22T04-51-59Z
2026-11-22 11:51:59 +07:00
Morning Star bc2de79338 build(deps): bump zip to 9.0.5 and tokio to 1.53.3 (#4)
Fixes RUSTSEC-2026-0548 (zip) and RUSTSEC-2026-0386 (tokio); cargo audit is clean apart from the allowed chrono warning.
2026-11-22T04-43-51Z
2026-11-22 11:43:51 +07:00
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-22T04-28-59Z
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-30T09-27-44Z
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-30T07-26-54Z
2026-10-30 14:26:52 +07:00
morningstar-sudo 67e87eaa3d build(deps): bump zstd, rustls-webpki, webpki-roots, ctutils
Fix RustSec advisories failing the audit job: RUSTSEC-2026-0381,
-0382, -0385, -0391, -0398, -0403, -0410.
2026-10-29T15-52-20Z
2026-10-29 22:52:18 +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 61060c94a5 feat: enhance authentication and session management, add crypto tests 2026-10-19T08-27-50Z 2026-10-19 15:27:47 +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-18T19-56-57Z
2026-10-19 02:56:54 +07:00
morningstar-sudo 7c6b78632f fix!: stateful sessions, fuzz-found parser panics
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.
2026-10-18T19-32-53Z
2026-10-19 02:32:49 +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-18T18-41-37Z
2026-10-19 01:41:33 +07:00
morningstar-sudo bce46d7d61 feat: enhance driver layer handling and update related documentation 2026-10-18T14-53-26Z 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-18T14-06-23Z
2026-10-18 21:06:19 +07:00
morningstar-sudo 820359ff68 refactor: dedupe helpers found by over-engineering audit
Behavior changes:
- boot_timeout falls back to 3 s, not 10, when the stored value is bad
- MACs are trimmed and accepted in more forms (aa-bb..., aabb.ccdd...)
  by every endpoint, via devices::norm_mac
- account API 500s return "internal error"; details only in the log
- durable writes go through <file>.tmp with fsync

Kept on purpose: Db trait (MySQL/Postgres planned), hand-rolled
crc32c and HMAC, every dependency.
2026-10-18T13-08-45Z
2026-10-18 20:08:42 +07:00
morningstar-sudo 07f049bd0b feat: enhance key handling in canvas to manage held keys on blur event 2026-10-18T12-22-21Z 2026-10-18 19:22:18 +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-18T10-18-27Z
2026-10-18 17:18:24 +07:00
morningstar-sudo e8cb7961d7 feat: update broom-vnc and stage scripts for improved desktop handling and capture tool path 2026-10-18T09-09-45Z 2026-10-18 16:09:42 +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-18T08-52-50Z
2026-10-18 15:52:47 +07:00
morningstar-sudo 6dc3340472 feat: update DNS resolution methods to include passthrough and recursive options with improved caching behavior 2026-10-18T04-58-14Z 2026-10-18 11:58:10 +07:00
morningstar-sudo a11a7021dd feat: enhance DNS resolution with caching and improved fallback handling 2026-10-18T03-58-31Z 2026-10-18 10:58:27 +07:00
morningstar-sudo 9778ed886a feat: implement atomic edits for JSON values across multiple components 2026-10-18T03-47-10Z 2026-10-18 10:47:06 +07:00
morningstar-sudo 6a41a1ab17 feat: implement DNS resolution and management improvements
- Added `forget_update` function in `games.rs` to handle the deletion of update machines for disks.
- Enhanced `forget` function in `machines.rs` to remove associated disks and remote keys when a machine is deleted.
- Introduced `moved` function in `machines.rs` to manage MAC address changes and update associated configurations.
- Integrated new DNS recursive functionality in `sysmon.rs` to provide additional DNS metrics.
- Updated frontend JavaScript in `app.js` to support new DNS settings and improve user experience.
- Modified `page-network.html` to include new DNS resolution options and improve layout.
- Added unit tests for DNS resolution and caching in `dnsrec.rs` to ensure reliability and correctness.
- Enhanced SQLite database tests to validate machine uniqueness constraints and ensure proper handling of legacy data.
2026-10-18T03-35-58Z
2026-10-18 10:35:54 +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-18T03-10-07Z
2026-10-18 10:10:02 +07:00
morningstar-sudo 865e42b086 feat: enhance user account management and permissions
- Updated CSS to hide owner-specific actions for staff accounts.
- Modified JavaScript to load user roles and manage permissions based on user type.
- Enhanced HTML structure to reflect user roles and permissions in navigation and forms.
- Updated login functionality to support user accounts instead of a single admin password.
- Added tests for session tokens and user permissions to ensure proper access control.
- Implemented checks for games update permissions based on IP and MAC address.
2026-10-18T02-47-00Z
2026-10-18 09:46:56 +07:00
morningstar-sudo 3eddc62964 feat: Enhance CI workflow and asset management with bundle pinning and improved documentation 2026-10-18T02-07-11Z 2026-10-18 09:07:07 +07:00
morningstar-sudo 520ae049d1 feat: Enhance cursor handling in VNC viewer with dynamic shape updates 2026-10-17T12-23-20Z 2026-10-17 19:23:15 +07:00
morningstar-sudo 42bfe4fd53 feat: Implement kick_peer functionality to close iSCSI sessions for powered-off clients 2026-10-17T12-06-25Z 2026-10-17 19:06:20 +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-17T06-42-50Z
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 57e1a0e8a6 feat: update dependencies for improved functionality and compatibility 2026-10-17T02-00-19Z 2026-10-17 09:00:14 +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-17T01-50-36Z
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-16T18-04-10Z
2026-10-17 01:04:06 +07:00
morningstar-sudo a181b23325 feat: enhance remote control features and health monitoring in web admin 2026-10-16T17-43-49Z 2026-10-17 00:43:44 +07:00
morningstar-sudo f023150d3b fix: update STARTUPINFO struct to use Unicode charset for compatibility with CreateProcessAsUser 2026-10-16T14-54-11Z 2026-10-16 21:54:08 +07:00
morningstar-sudo 02947781ed feat: implement collapsible navigation groups for improved UI organization 2026-10-16T14-31-10Z 2026-10-16 21:31:06 +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-16T14-23-04Z
2026-10-16 21:23:00 +07:00
morningstar-sudo 458ee7c42f fix: change NVME_ADMIN and SG_IO types to u32 for compatibility with ioctl calls 2026-10-16T13-53-18Z 2026-10-16 20:53:14 +07:00
morningstar-sudo f6fb31553f Add hardware metrics collection and reporting
- 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.
2026-10-16 20:46:51 +07:00
morningstar-sudo be72b3dcf8 feat: enhance remote agent functionality with thumbnail wall and connection handling 2026-10-16T13-10-52Z 2026-10-16 20:10:49 +07:00
morningstar-sudo e475d25be4 feat: add remote VNC support for Windows machines
- 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.
2026-10-16T08-43-57Z
2026-10-16 15:43:51 +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-16T04-58-06Z
2026-10-16 11:58:00 +07:00
morningstar-sudo 7d3b2322c4 refactor: clean up comments and remove redundant text in various HTML and JS files for improved clarity 2026-10-16T01-20-13Z 2026-10-16 08:20:09 +07:00
morningstar-sudo f1a02be55a Refactor HTML structure and styles across multiple pages for improved UI consistency
- Updated page-groups.html to enhance layout with Bootstrap classes, improving responsiveness and visual hierarchy.
- Refined page-images.html with similar Bootstrap enhancements, ensuring a more modern look and feel.
- Modified page-machines.html to align with new design standards, including better button styles and input fields.
- Revamped page-network.html to utilize Bootstrap components for a cleaner interface and improved usability.
- Enhanced page-system.html with consistent styling and layout adjustments for better user experience.
- Added tests in auth.rs to ensure public paths include stylesheets while excluding app scripts.
2026-10-16T00-49-47Z
2026-10-16 07:49:43 +07:00
morningstar-sudo 098f595060 feat: update bootrom-mgmt version to 0.6.1 and rustls version to 0.23.46 2026-10-14T13-31-13Z 2026-10-14 20:31:09 +07:00
morningstar-sudo 3a9abc20e6 feat: enhance broom-bootorder and broom-fw scripts for improved UEFI BootOrder management and volume free space checks 2026-10-14T13-21-24Z 2026-10-14 20:21:20 +07:00
morningstar-sudo d306f1932a feat: enhance build process by including additional base packages for versioning 2026-10-14T11-38-24Z 2026-10-14 18:38:21 +07:00