PC sign-in: a logged-in home PC signs its browser in with no prompt (AUT-13) #203
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!203
Loading…
Reference in a new issue
No description provided.
Delete branch "pc-sign-in"
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?
A logged-in home PC signs its browser in to auth.romaine.life with no prompt, as the PC's sponsor: the same user row, role (admin included) and apps as a Microsoft sign-in. Nelson's ask: "if im logged in to my pc, that should log me in to auth. it shouldn't even ask".
Added
romaine-auth pc-cert(client/pc-cert*.go): a self-signed certificate over the PC's existing TPM device key, subject and issuerCN=romaine.life PC sign-inon every PC, installed in the Windows user's personal store linked to the key; idempotent (installed/current). Verified on nelsonpc: certutil's signature test passes and Windows TLS 1.3 presents it with no prompt. home-sync runs it and sets Chrome/Firefox auto-selection (romaine-life/at-home-tools#565, delivered).pc.auth.romaine.life(k8s/templates/pc-sign-in.yaml): a ListenerSet listener with a ClientTrafficPolicy that requests a client certificate naming only that issuer, verifies no chain, and forwards it (XFCC SanitizeSet) to the pod's own port 8081. A NetworkPolicy lets only the shared gateway's Envoy proxies reach 8081; every other port's ingress is unchanged. DNS is a DNSEndpoint CNAME to auth.romaine.life; the route parents only the ListenerSet, so no plain-HTTP path reaches it.GET /api/auth/pc/code(exact CORS for auth.romaine.life), matching the certificate's public key to a non-revoked device row and refusing a pending sponsor; a 60-second one-time code, redeemed atPOST /api/auth/pc/redeem, a Better Auth endpoint, so the session and cookie are Better Auth's own and a pending OIDC authorization resumes throughoauth_query./admin,/cli,/api/auth/cli/user-login, break-glass and Azure access approval pages), falling back at once (5-second cap) to what it did before. Sign-out sets a browser-session cookie so the PC doesn't sign straight back in.Changed: the rule that a machine key never signs a person in (README, src/device-helpers.ts) is reversed, as Nelson decided; any process running as that Windows user can use the key, which he accepted.
Depends on the shared gateway running Envoy Gateway v1.9 (romaine-life/infra-bootstrap#42, delivered).
Work package: https://openproject.home.romaine.life/wp/AUT-13
🤖 Generated with Claude Code