Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

vole
Site
Clone

Read only, no credentials:

https://rodent.software/vole.git

Write over SSH with a registered key:

git clone ssh://git@rodent.software/vole.git

Self-hosted forge that lives in your Git repo.

#407

Protect secrets with access lists on Windows

merged · by keenan 2d ago · merged into main at 33cbbc9d by keenan 2d ago

keenan opened this 2d ago

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, and audit.log all granted only to SYSTEM, Administrators, and the service account, with AreAccessRulesProtected = 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 push and git clone against ssh://git@…/demo.git.
  • go build ./..., go vet ./..., and go test ./internal/secure ./internal/audit natively 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.

Discussion (0)

No discussion yet.