Agent devices: enrolled only on Nelson's approval, SSH only as ROMAINE\claude (SES-314) #210
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
queue
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
romaine-life/auth!210
Loading…
Reference in a new issue
No description provided.
Delete branch "agent-devices"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Work package: https://openproject.home.romaine.life/wp/SES-314
The Claude agents get their own Windows account on each home PC,
ROMAINE\claudein the home domain. This makes that account a device of its own,agent-<pc>, enrolled only on Nelson's approval, and makes its SSH certificates log in as that account and nothing else. Nelson's own devices, grants and certificates are unchanged.Enrolment (
src/agent-device.ts, README "Agent devices on approval"):POST /api/agent-devices/requests, with a PC's own machine token and the agent account's public key, files a request foragent-<that PC>. An agent device can't file one; a key that is already a live device's is refused.romaine-auth approve|deny --kind agent-device IDfrom an approver device, or/agent-device/<id>, which takes only a browser session, never an admin bearer token, and shows the key's thumbprint. A request lapses undecided after an hour.agent-<pc>, and creates its machine account with no SSH grants. The personal enroll now refusesagent-names, so every agent device came through an approval.GET /api/agent-devices/requests/<id>?wait=Nlets the filing PC follow it; approved, it carries the registration.romaine-auth agent-device key(run as the agents' account: its own TPM key's public half; refused on an account enrolled as a PC),request [--no-wait],wait,registration, andadopt(run as the agents' account: saves the registration only after a machine token signed with its own key comes back for that device).What an agent device may do:
sshtokens only: noazure,home-cluster-break-glassortailscaletoken.machineSshPrincipal(the grants route and certificate issuance) lets an agent device log in only asromaine\claude, Win32-OpenSSH's name for the domain account, and lets no other device have that login. Certificates staypermit-ptyonly.Host trust (
client/ssh-host.go):ssh-hostaccepts a domain logindomain\user. sshd expands%utoromaine\claude, so on Windows its principals file isromaine-principals\romaine\claude. Read from Win32-OpenSSH'scontrib/win32/win32compat/pwd.c: a domain user's name isdomain\user, lowercased. Its uid switching is a no-op there, so sshd reads the file as SYSTEM and today's SYSTEM-and-Administrators ACL serves a non-admin login.--installedlists the login asromaine\claude. Removing it removes the domain's folder with its last file.Not a boundary yet: until agents leave Nelson's Windows session, anything there can sign the approver's assertion or sign the browser in as him. The comments and README say so. owner-guard refusing
approve/denyfrom a session is the interim control.Tested: Go tests for the request, wait, adopt and key-refusal client paths, and for domain logins in
ssh-host. TS tests for the agent rules, the SSH login rule throughmachineSshPrincipal, theagent-devicedecide kind, and PC sign-in refusing an agent key. Not tested live: no agent device, account or domain exists yet. A certificate login asromaine\claudebelongs in the upstairspc proof.Not here:
sshPrincipalsand removes installed trust it doesn't list, so the state.json line forromaine\claudewaits on that change.ALLOWED_DEVICESentry foragent-<pc>, and strip-owner presenting--kind agent-devicein the window.