Milestone 2 of the Windows port (#404): the server runs on Windows, not only builds.
Secret store. internal/secure gets a Windows implementation: a protected DACL naming the service account, NT AUTHORITY\SYSTEM and BUILTIN\Administrators at full control, inherited entries removed, then read back. VerifyACL is the check: owner in the trusted set, every entry an allow for a trusted principal at full control, at least one entry for the service account, no empty or absent DACL. Directories are additionally required to be protected so a later change to a parent cannot open an already-hardened data directory. harden only rewrites when something is wrong, and a second pass is a no-op.
Audit log. internal/audit checks the log with the same secure.VerifyACL, so the log cannot be held to a weaker rule than the files beside it.
Paths. ssh_socket defaults to %ProgramData%\vole\ssh.sock on Windows; the unix default made validation refuse every Windows start. Documented in the configuration reference.
Tests. The mode-based tests in internal/secure and internal/audit are unix-only by construction. New Windows-only tests cover: replacing an Everyone-granting ACL, a directory that inherits being protected and passing that on to a file created later, and an owner outside the trusted set being refused.
Verified on a Server Core 2022 guest (Windows Server 2022 Standard Evaluation, 10.0.20348, Docker + KVM):
vole admin init,account create,vole serve; data dir,instance.db,secrets.key, SSH host key, andaudit.logall granted only to SYSTEM, Administrators, and the service account, withAreAccessRulesProtected = True. An instance whose data directory was clean but still inheriting is rewritten on the next start.- HTTP 200; admin CLI over Vole’s SSH listener (
account list,repo create,acl set-role);git pushandgit cloneagainstssh://git@…/demo.git. go build ./...,go vet ./..., andgo test ./internal/secure ./internal/auditnatively on Windows.
Locally: vole workflow check, vole workflow run verify (all steps, including the windows cross-compile and the race suite).
Leaves the rest of the Windows work to its own changes, listed on #406: service installation, ssh_listen = "socket" (still unix-shaped: 0660 chmod, os.ModeSocket, no exec), Job Objects and graceful stop for the CI runner, and packaging/deployment docs.