Home devices: sign in from the Windows login with a key the machine can't export (ROMAINE-46, BAO-2) #104

Merged
nelsong6 merged 2 commits from romaine-46-home-devices into main 2026-11-01 20:34:56 -08:00
nelsong6 commented 2026-11-01 20:29:33 -08:00 (Migrated from github.com)

Work packages: https://openproject.romaine.life/wp/ROMAINE-46 and https://openproject.romaine.life/wp/BAO-2

A home PC (or the NAS) registers once with the public half of a key it can't export (a TPM key under Nelson's Windows user), then trades a short assertion signed with that key for a token, with no browser. POST /api/auth/device/enroll needs a user sign-in from the last 10 minutes and refuses device and bot tokens. POST /api/auth/device/token returns either the same 24h user token /api/auth/cli/user-token mints (plus a device claim, for the at menu), or, with audience: "openbao", a 5-minute federation-shaped token with sub = device:<user id>/<device> and no role or email, so no first-party consumer accepts it. Errors carry a distinct reason (device_not_registered, device_revoked, …); devices are listed and revocable on /admin; every enroll, exchange and revoke is logged and counted (auth_device_total).

drizzle/0004-device.sql (expand only) is applied before this image rolls.

Work packages: https://openproject.romaine.life/wp/ROMAINE-46 and https://openproject.romaine.life/wp/BAO-2 A home PC (or the NAS) registers once with the public half of a key it can't export (a TPM key under Nelson's Windows user), then trades a short assertion signed with that key for a token, with no browser. `POST /api/auth/device/enroll` needs a user sign-in from the last 10 minutes and refuses device and bot tokens. `POST /api/auth/device/token` returns either the same 24h user token `/api/auth/cli/user-token` mints (plus a `device` claim, for the at menu), or, with `audience: "openbao"`, a 5-minute federation-shaped token with `sub` = `device:<user id>/<device>` and no role or email, so no first-party consumer accepts it. Errors carry a distinct `reason` (`device_not_registered`, `device_revoked`, …); devices are listed and revocable on /admin; every enroll, exchange and revoke is logged and counted (`auth_device_total`). `drizzle/0004-device.sql` (expand only) is applied before this image rolls.
Sign in to join this conversation.
No description provided.