Skip to content

S12-03 - Host Prerequisites

Purpose: What wb setup checks on each host, and how a development build on macOS gets signed.

wb setup checks these and explains them to the user. It never changes them silently.

Host Prerequisite Who can do it
macOS Apple Silicon, macOS 27+ n/a (hardware and OS version)
Windows Virtual Machine Platform optional feature enabled (it is if WSL 2 is installed) administrator, once
Windows Permission to create VMs through HCS as a standard user decided by spike X11-windows-hostX11-windows-host: Windows host through HCSOn Windows 11 Home with only the Virtual Machine Platform feature: can a standard user create, start, save, and restore a VM through HCS?
Linux Read-write access to /dev/kvm (desktop sessions usually have it; otherwise the kvm group) administrator, once

A failed check refuses before wb setup installs anything:

Spike X11-windows-hostX11-windows-host: Windows host through HCSOn Windows 11 Home with only the Virtual Machine Platform feature: can a standard user create, start, save, and restore a VM through HCS? may show that HCS needs administrator rights for every VM operation. The Windows design then needs a narrowly scoped system service. That would change SEC12-least-privilegeSEC12-least-privilege: Least privilege on the hostNo root or administrator rights at run time and no extra host user accounts. for Windows. It requires a spec change, not a workaround.

A development build has the Keychain backend only when the developer’s own team signs it (S15-02-secret-storeS15-02-secret-store: The Secret StoreWhere credentials are held: the secret store, its backends, and the guarantees a backend must give.; S10-02-packaging-and-signingS10-02-packaging-and-signing: Packaging and SigningHow Wraith Box is packaged and signed on each host, and the one version every build stamps.). The developer sets that up once per Mac, without a paid membership (X29-dev-signingX29-dev-signing: Keychain access group for development buildsCan a developer's free personal team, an Apple ID signed in to Xcode without a paid membership, sign the helpers in Wraith Box.app (wb-proxyd, wb-hostd, wb-vmd) with a keychain-access-groups entitlement and a provisio…):

  1. Sign in to Xcode with an Apple ID (Xcode, Settings, Accounts). Xcode lists its team as a personal team.
  2. Build a small app project once in the Xcode app, with that team and “My Mac” as the destination.
    • That registers the Mac with the team. Xcode makes the Apple Development certificate and downloads the profile.
    • xcodebuild alone can’t register the Mac.
    • The organizational unit (OU) in the certificate’s subject is the team ID, the value for WB_TEAM_ID.

After that, mise run build signs from the command line. The profile lasts 365 days (X29-dev-signingX29-dev-signing: Keychain access group for development buildsCan a developer's free personal team, an Apple ID signed in to Xcode without a paid membership, sign the helpers in Wraith Box.app (wb-proxyd, wb-hostd, wb-vmd) with a keychain-access-groups entitlement and a provisio…, measured on a team with a lapsed membership). A second Mac needs both steps too.

wb doesn’t hold an access group. So it starts whatever state the profiles are in, and reports each case itself.

wb setup refuses the Keychain backend with the rule keychain-needs-team. It names both steps and WB_TEAM_ID.

wb setup reads the team from each helper bundle’s code signature, and decodes each helper’s profile with /usr/bin/security cms -D. It refuses the Keychain backend with the rule keychain-team-mixed when the helpers don’t agree on one team:

  • two helpers are signed by different teams, or one by a team and another without one;
  • a helper’s signature can’t be read;
  • a helper’s profile is missing, isn’t a regular file, or can’t be decoded;
  • a profile’s TeamIdentifier isn’t exactly the signature’s team, or its TeamName is empty or differs from another helper’s.

Its fix is to build Wraith Box again with WB_TEAM_ID and install it. Otherwise it prints the team and that the team’s groups are team-wide (S17-02-setupS17-02-setup: InstallHow wb setup installs Wraith Box from its bundle without administrator rights, and how wb setup --remove takes it out., “The Keychain backend”).

A build with WB_TEAM_ID set fails before it makes the bundle when the app from Xcode has no profile, or one whose TeamIdentifier isn’t exactly that team. Its message names both steps. macOS then never gets a bundle it would refuse to start (S10-tech-stackS10-tech-stack: Technology ChoicesFix languages, libraries, packaging, and repository layout, with the reason for each choice.).

  • wb setup and wb status read the expiry date from the helper bundles’ profiles and print it, with the fix. The fix: build the small project in the Xcode app again for a new profile, then build Wraith Box again.
  • wb-hostd reads the same date from the helpers’ profiles at start, and logs a warning with it.
  • wb claude prints one line with the date before the session starts.

A bundle without a profile, such as an ad-hoc one, gets none of these checks. Whether a release build has a profile is the assumption in S10-02-packaging-and-signingS10-02-packaging-and-signing: Packaging and SigningHow Wraith Box is packaged and signed on each host, and the one version every build stamps., “Signing”.

AMFI refuses to start a program whose profile has expired, as it refuses one with no profile (assumed in X29-dev-signingX29-dev-signing: Keychain access group for development buildsCan a developer's free personal team, an Apple ID signed in to Xcode without a paid membership, sign the helpers in Wraith Box.app (wb-proxyd, wb-hostd, wb-vmd) with a keychain-access-groups entitlement and a provisio…). The programs are wb-credset, wb-proxyd and wb-guestadmin.

  • wb setup, wb status and wb claude read the helpers’ profiles. For an expired one they print the date, the rule signing-profile-expired and the fix.
  • When wb cred sees wb-credset exit on SIGKILL, and its profile has expired, it reports the same.

wb-hostd doesn’t hold a group, so it keeps running. It gives a second signal:

  1. wb-launcher reports that a program with a group exited on SIGKILL (S04-07-supervisionS04-07-supervision: SupervisionWho starts and restarts each host process, what happens when wb-hostd stops or the bundle is upgraded, and daemon outages., “Who starts whom”).
  2. wb-hostd reads that program’s embedded.provisionprofile.
  3. For an expired one, it logs the rule signing-profile-expired with the date.

A SIGKILL of a program whose profile is valid, or that has no profile, is logged as a plain exit with the signal.

The fix is the one for a profile near its expiry date.

Status: Draft