No description
  • TypeScript 77.2%
  • Go 18.6%
  • JavaScript 1.9%
  • PLpgSQL 1.1%
  • HCL 1%
  • Other 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Nelson c530cc7748
All checks were successful
Suite tofu / scope (push) Successful in 5s
Suite web-app / scope (push) Successful in 6s
Suite release / scope (push) Successful in 6s
Suite tofu / check-plan (push) Has been skipped
Suite tofu / apply (push) Has been skipped
Suite tofu / reused-checks (push) Has been skipped
Suite web-app / check-image (push) Has been skipped
Suite web-app / publish (push) Has been skipped
Suite web-app / publish-static (push) Has been skipped
Suite web-app / check-test (.) (push) Has been skipped
Suite web-app / reused-checks (push) Has been skipped
Suite release / module (push) Has been skipped
Suite release / reserve (push) Has been skipped
Suite release / check-manifest (push) Has been skipped
Suite release / check-build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (push) Has been skipped
Suite release / check-package (push) Has been skipped
Suite release / build (go, ubuntu-latest) (, go, false, ubuntu-latest, , go) (push) Has been skipped
Suite release / finalize (push) Has been skipped
Suite release / reused-checks (push) Has been skipped
Suite release / publish (push) Has been skipped
Suite release / deliver (push) Has been skipped
Suite release / deploy-image (push) Has been skipped
Suite release / deliver-prune (push) Has been skipped
Pin romainecr.azurecr.io/auth v0.1.80 (#219)
2026-12-01 04:57:30 -08:00
.forgejo/workflows CI from the suites; providers pinned in the repo; the image tests itself (#166) 2026-11-16 19:28:47 -08:00
cmd/romaine-auth romaine-auth builds on auth-client; its own commands move to internal/client (AUT-14) (#218) 2026-12-01 04:54:58 -08:00
docs Migrate the OAuth provider: rotation with reuse detection, auth_time in seconds (#91) 2026-08-11 20:22:20 -07:00
drizzle Home devices: sign in from the Windows login with a key the machine can't export (ROMAINE-46, BAO-2) (#104) 2026-11-01 20:34:55 -08:00
internal/client romaine-auth builds on auth-client; its own commands move to internal/client (AUT-14) (#218) 2026-12-01 04:54:58 -08:00
k8s Pin romainecr.azurecr.io/auth v0.1.80 (#219) 2026-12-01 04:57:30 -08:00
scripts Migrate the OAuth provider: rotation with reuse detection, auth_time in seconds (#91) 2026-08-11 20:22:20 -07:00
src A session asks to continue after its PRs land: auth stores and decides the continue kind (AGT-83) (#212) 2026-11-29 20:42:25 -08:00
tofu Run on the tofu suite's shared provider set (#186) 2026-11-25 23:17:48 -08:00
.dockerignore Initial scaffold: Hono + Better Auth + Drizzle on CNPG Postgres (#1) 2026-05-15 13:43:14 -07:00
.gitignore auth-db backups: cutover to workload identity (#27) 2026-05-16 00:29:11 -07:00
.goreleaser.yaml The GoReleaser config's comment says the release suite builds from it (PIPT-31) (#174) 2026-11-18 00:56:54 -08:00
.npmrc Write auth's logs as the estate's log line (AHT-204) (#189) 2026-11-26 14:06:16 -08:00
.nvmrc The repo's Node major is in .nvmrc, not pipeline-templates' fleet.json (PIPT-33) (#171) 2026-11-17 23:36:45 -08:00
at-app.json at-app.json: this repo's apps for at-update (AHT-231) (#206) 2026-11-29 02:43:29 -08:00
Dockerfile Write auth's logs as the estate's log line (AHT-204) (#189) 2026-11-26 14:06:16 -08:00
drizzle.config.ts Initial scaffold: Hono + Better Auth + Drizzle on CNPG Postgres (#1) 2026-05-15 13:43:14 -07:00
go.mod romaine-auth builds on auth-client; its own commands move to internal/client (AUT-14) (#218) 2026-12-01 04:54:58 -08:00
go.sum romaine-auth builds on auth-client; its own commands move to internal/client (AUT-14) (#218) 2026-12-01 04:54:58 -08:00
ONBOARDING.md Drop the XListenerSet now the gateway serves the ListenerSet (AUT-13) (#201) 2026-11-28 18:21:27 -08:00
package-lock.json Take newer packages (#216) 2026-11-30 17:10:04 -08:00
package.json Take newer packages (#216) 2026-11-30 17:10:04 -08:00
README.md romaine-auth builds on auth-client; its own commands move to internal/client (AUT-14) (#218) 2026-12-01 04:54:58 -08:00
romaine-auth Let ssh-host list and remove installed machine SSH trust (#130) 2026-11-08 16:01:13 -08:00
tsconfig.json Initial scaffold: Hono + Better Auth + Drizzle on CNPG Postgres (#1) 2026-05-15 13:43:14 -07:00

auth

Central auth service for *.romaine.life. Apps redirect users here to sign in with Microsoft / Google, then verify the issued JWTs against this service's JWKS endpoint. Replaces the per-app microsoft-routes.js + shared api-jwt-signing-secret pattern that previously lived in kill-me, plant-agent, investing, house-hunt, and fzt-frontend.

Machine authentication

Machine authentication uses a distinct role=service, purpose=machine account per registered machine, with a 15-minute first-party token. The human who enrolls its public key is the sponsor, not the identity the machine later presents. A machine account never becomes a human account itself; its grants live on its own account's apps object. The one exception: a device on APPROVER_DEVICES (src/device-helpers.ts) may approve or deny a pending break-glass, Azure access or continue request as its sponsor, who must be an administrator (Deciding from an approver device, below). It decides that one request; it mints nothing and signs in as no one. apps.fzt.owner_sub grants writes to that owner's menu and bookmark trees, and apps.ssh is an explicit array of {target,user}.

PC sign-in

A home PC's browser is signed in as the PC's sponsor with no prompt, because being signed in to the PC's Windows account is the proof (AUT-13). romaine-auth pc-cert puts a self-signed certificate over the PC's TPM device key in the Windows user's personal certificate store; its subject and issuer are CN=romaine.life PC sign-in on every PC, and it lasts ten years, since nothing checks its dates. home-sync runs it, and sets Chrome's AutoSelectCertificateForUrls and Firefox's client-certificate preferences so neither browser asks which certificate to send.

When a sign-in finds no session, the page asks https://pc.auth.romaine.life first. The gateway requests the certificate there, naming only that issuer, and forwards it to the pod's own port 8081, which serves that one endpoint and which a NetworkPolicy lets only the gateway's proxies reach, so no one inside the cluster can forge the forwarded certificate (k8s/templates/pc-sign-in.yaml); auth trusts it only when its public key is a device's enrolled key that isn't revoked, and the TLS handshake has already proven the browser holds that key. auth answers with a one-time code, which the page redeems on auth.romaine.life for an ordinary session of the device's sponsor, the same user, role and apps as a Microsoft or Google sign-in, then carries on where the sign-in was going. Without the certificate the page shows the Microsoft and Google choices at once. Revoking the device ends PC sign-in from it; sessions it already made last their normal time.

Any process running as that Windows user can use the key, so whatever runs as the user (Claude sessions included) can be signed in as the sponsor, admin role included. Nelson accepted that (AUT-13); a separate Windows account for agents is the fix if it matters.

Home tools sign in as their machine with auth-client, the Go library that was this repository's client package (AUT-14). It holds the machine key, its assertions, auth's token exchange, home tokens, OpenBao calls and OpenProject credentials. romaine-auth's own commands are internal/client, built on it, so a release of this repository reaches no other tool. Both use the Windows TPM key, macOS Keychain or Linux KWallet/Secret Service credential. There is no plaintext key fallback. The TPM takes one command at a time and turns the rest away while busy, so on Windows a busy answer is retried for up to ten seconds (AUT-5). user-login stores personal credentials in user-token.json; machine refresh uses machine-token.json. Neither reads the old mixed auth-token.json, and machine renewal never updates a human credential.

romaine-auth enroll nelson-laptop
romaine-auth pc-cert
romaine-auth whoami
romaine-auth user-login
romaine-auth whoami --human
romaine-auth ssh --user nelson nelsonpc hostname
romaine-auth ssh -t --user nelson nelsonpc tmux -L at attach
romaine-auth op get /api/v3/users/me
romaine-auth bao get secret/data/home/ntfy
romaine-auth home-token --role shows --out FILE
romaine-auth version

bao (auth-client's BaoRequest) makes one OpenBao API call as this machine's device login, at a path under /v1/ (get, list, post, patch, delete; a body from a file or --body-stdin, never the command line). patch sends a JSON merge patch, so {"data":{"key":null}} removes one value. What it may do is the device role's policies in nelsong6/openbao; the home PCs Claude works on keep every secret there (BAO-12).

ssh (client.SSH) trades a fresh key for a short-lived certificate and runs the system OpenSSH client with it, so known-host checks and terminal handling stay OpenSSH's. Everything after HOST is the remote command. -t, before HOST, asks OpenSSH for a terminal (its own -t), which an interactive remote command such as tmux attach needs (AUT-12).

Every call romaine-auth and auth-client make to auth, OpenBao, OpenProject or Tailscale goes through netclient, the home tools' client for slow, lossy links (a hotel Wi-Fi at 250 ms and heavy loss, with the tunnel home up). No call has a total-duration cap. Connecting and the TLS handshake are bounded at 30 seconds each and the wait for response headers at 60; a response body fails only after 60 seconds with no byte arriving. Dial errors, timeouts, connection resets and HTTP 502/503/504 are retried with capped exponential backoff and jitter (one second doubling to 30 seconds) for up to ten minutes, each retry printing slow link to <host>: <short error>, retrying (n) in <d> to stderr, and a call that never gets through fails naming the host and how long it was tried. A request is resent only when that cannot repeat an action: a failure before any byte of it was written is resent whatever the method, and a later one only for GET, HEAD, OPTIONS, PUT or DELETE, or a request the code marks netclient.Idempotent (only the OpenProject client-credentials grant, which just issues another token). So op post/op patch (work-item-management set, work-item-management comment), OpenBao logins and writes, and auth's token exchanges are never resent once sent, nor on a 5xx. Redirect policy is each client's own: auth, OpenBao and OpenProject calls never follow one.

home-token (auth-client's HomeToken) gets a five-minute token OpenBao signs for a home service, with no call to this service, and reuses it from home-token-<role>.json beside machine-token.json until a minute before it expires; IsHomeDevice recognizes one, and its device claim names the machine, because its sub is an OpenBao entity UUID.

Enrollment uses a recent browser sign-in only to authorize the public-key registration. Re-enrollment changes the key registration while keeping the machine account stable. grant MACHINE-SUBJECT APPS-JSON-FILE needs a recent personal administrator sign-in. An administrator installs host trust with ssh-host --user USER --principals FILE; the principals are target-qualified machine identities, one per line, as returned by the SSH exchange. A home PC's file may also hold the one line that lets a release job's certificate run at-update (A release job's certificate), accepted only with its forced command and restrict. The command checks the SSH configuration before replacing it, keeps the prior configuration, and reloads the host's SSH listener. ssh-host --user USER --principals FILE --check changes nothing: it prints current when the installed CA key, principals and SSH configuration match, otherwise one line per part that differs. ssh-host --installed changes nothing: it prints each OS login with installed principals, or none. ssh-host --user USER --remove deletes that login's principals; removing the last login's also removes the CA key and the SSH configuration block, checked and reloaded the same way. On macOS and Linux, ssh-host --user USER --principals FILE --user-scope instead installs the CA and exact principal list in the current account's authorized_keys. This needs no administrator access or listener restart and preserves existing keys. OS logins containing @, such as a macOS directory account, are accepted literally.

POST /api/auth/device/token requires an explicit audience: machine for first-party credentials, or audience=ssh with public_key, target and user, returning a certificate lasting at most ten minutes. It requires request_hash, the hexadecimal SHA-256 of sorted-key JSON containing the request fields other than assertion. audience=tailscale returns a five-minute federation token, subject machine:<device name>, for the romaine.life tailnet's trust credential (the one exact api.tailscale.com/... entry in FEDERATION_AUDIENCE_ALLOWLIST): the machine trades it at Tailscale for a tagged, pre-approved join, so a home PC rejoins the tailnet with no browser sign-in and no stored key (AUT-10).

auth has no OpenProject audience: OpenProject answers at home only, so romaine-auth token --audience openproject and romaine-auth op read the machine's own OpenProject client from OpenBao (secret/devices/<device>/openproject, nelsong6/openbao) with its device login and sign in to OpenProject directly. homesvc's machine-account provisions those clients, a distinct OpenProject administrator account per machine (Nelson's current permission choice).

Revocation stops new exchanges. Already-issued credentials expire naturally: fifteen minutes for first-party machine tokens and ten for SSH certificates. Old clients omitting the audience are refused so they cannot select machine subjects as personal trees. Legacy device-as-human tokens must be discarded by clients; fzt rejects them. Other existing JWT verifiers may accept such tokens until their original 24-hour expiry.

Stack

  • Hono on Node 22 (Web Standards request/response, portable to Bun / edge if we want it)
  • Better Auth for the OAuth/OIDC flow, session storage, custom user fields, and JWT issuance
  • Drizzle (postgres-js driver) against a CloudNativePG Postgres cluster running in this app's namespace
  • All secrets injected via env: DB creds come from CNPG's auto-managed auth-db-app Secret; OAuth client secrets and BETTER_AUTH_SECRET arrive via an ExternalSecret synced from the auth-owned ng6-auth Key Vault. The pod itself has no direct Azure dependencies
  • Logs: the estate's one log line (romaine-life/logline, @romaine-life/logline from Forgejo's npm registry, read through .npmrc) on stdout, through src/log.ts: a fixed message and key=value fields, one request line per answered request (method, path without its query, status, ms). A token, code, cookie, certificate or Authorization value is never passed to the log; error text, upstream bodies and caller-supplied values go through outside/errorText, which mask credentials

Endpoints

  • POST /api/auth/sign-in/social/microsoft — kicks off the Entra ID flow
  • POST /api/auth/sign-in/social/google — kicks off the Google flow
  • GET /api/auth/get-session — returns the current session for the cookie
  • GET /api/auth/jwks — JSON Web Key Set; apps verify issued JWTs against this URL
  • GET /api/admin/origins[/{project}] — list glimmung-managed slot wildcards (k8s-SA-auth)
  • PUT /api/admin/origins/{project} — replace a project's slot wildcards (k8s-SA-auth, idempotent)
  • DELETE /api/admin/origins/{project} — drop a project's slot wildcards (k8s-SA-auth)
  • POST /api/auth/exchange/k8s — exchange a session-pod's projected SA token for an auth.romaine.life role=service JWT
  • POST /api/auth/exchange/federation — exchange a workload's projected SA token for an external-audience JWT (RFC 7523 client_assertion; today: Tailscale). Distinct allowlist + output shape from the /k8s path
  • POST /api/auth/exchange/ssh-cert — exchange an issuance gateway's projected SA token for a short-lived OpenSSH user certificate (auth owns the SSH CA key). Distinct signing key class (ed25519 SSH CA, not the JWKS key), distinct allowlist (K8S_SSH_CERT_SA_ALLOWLIST). See "SSH certificate issuance" below
  • GET /api/ssh/ca — the SSH CA public key as a TrustedUserCAKeys line (unauthenticated; a CA public key is published-by-design). 404 when the CA is unconfigured
  • POST /admin/bot-tokens — admin-only: mint a 24h bot token (role=admin, purpose=bot) for break-glass CLI / curl use
  • POST /admin/service-tokens — admin-only: mint a 24h service token (role=service, purpose=bot, actor_email=<admin>) for calling service-only MCPs (e.g. mcp-github) from a workstation
  • POST /admin/test-slot-model-approvals/grants — admin-only: approve a Tank test-slot session to use a model or reasoning effort above the low-cost baseline from an intent=test-slot-model approval URL. Production sessions are not eligible for this approval path
  • POST /api/cli/device + POST /api/cli/token — browser-approved CLI/device flow for minting the same 24h bot token without copying an auth cookie
  • GET /api/auth/cli/user-login + POST /api/auth/cli/user-token — native-desktop sign-in flow (RFC 8252, PKCE + loopback). The user signs in normally with Microsoft/Google in the browser; a native app on the same machine receives the user's own JWT (role=user|admin, no purpose=bot) via a one-time code redeemed at the token endpoint. No admin approval — the user IS the requester. First consumer: romaine-life/shows's desktop/.
  • GET /metrics — Prometheus scrape (PodMonitor in k8s/templates/podmonitor.yaml); exports auth_romaine_exchange_total{result}, auth_admin_origins_requests_total{method, result}, auth_admin_bot_tokens_minted_total, auth_admin_service_tokens_minted_total, auth_admin_test_slot_model_approvals_total, auth_federation_exchange_total{result}, auth_ssh_cert_exchange_total{result}, auth_continue_total{action,result}, plus prom-client Node/process/GC defaults (prefixed auth_). See src/metrics.ts.
  • GET /health — liveness probe
  • GET /ready — readiness probe

Managed slot origins

Per-project slot wildcards (e.g. https://*.tank.dev.romaine.life) live in the managed_origin table, owned by glimmung's reconciler. Each row contributes to both Better Auth's trustedOrigins (callbackURL validation) and Hono's CORS allowlist on /api/auth/*. Static peers (the apps in PROD_TRUSTED_ORIGINS / CROSS_APP_ORIGINS) stay in source; slot wildcards do not.

Writes to /api/admin/origins/* authenticate via the inbound caller's k8s ServiceAccount token — an RS256 JWT signed by the cluster's OIDC issuer. Validation pins issuer, audience (https://auth.romaine.life), and the (namespace, serviceAccount) claim against K8S_ADMIN_SA_ALLOWLIST. Glimmung's deployment mounts a projected token with the right audience so a stolen token cannot be replayed against another JWT verifier.

See romaine-life/glimmung#142 for the cross-repo architecture.

Service-principal exchange

Kubernetes session pods (today: tank-operator) authenticate to this service via POST /api/auth/exchange/k8s and receive a normal auth.romaine.life JWT with role=service. Apps that opt in accept service callers by extending their role gate to include service; the JWT is otherwise identical in shape to a human JWT (same iss, same JWKS, same verifier) so an app that ignores service callers needs no code changes.

Inbound bearer is the pod's projected SA token (RS256, audience pinned to https://auth.romaine.life per K8S_SERVICE_AUDIENCE, namespace+SA pinned per K8S_SERVICE_SA_ALLOWLIST). Per-session consumers read the bound pod's tank-operator/owner-email and tank-operator/session-id annotations at exchange time; pod-stable consumers use a configured stable service identity. Cross-namespace pods/get RBAC for annotation-reading consumer namespaces is scaffolded from k8sOidc.serviceConsumerNamespaces in k8s/values.yaml.

Tank-operator native test-slot orchestrators are allowlisted as tank-operator-slot-N/tank-operator-slot-N and route through the same elevated tank-operator consumer as prod, with slot-specific synthetic service users. Tank-operator native test-slot session pods are allowlisted as tank-operator-slot-N-sessions/tank-operator-slot-N-session and route through the per-session tank consumer with slot-prefixed synthetic ids. That keeps /api/auth/exchange/k8s testable for both repo discovery and repo cloning without collapsing slot audit rows into prod identities.

Service-principal users are stored in Better Auth's user table under a reserved synthetic email (pod-<session-id>@service.<consumer>.romaine.life) that no human IdP can squat — the databaseHooks.user.create.before guard in src/auth.ts refuses any IdP-sourced user-create whose email is in a reserved domain. The issued JWT carries an extra actor_email claim with the human owner so downstream services can audit and scope per-owner.

See romaine-life/tank-operator#486 for the cross-repo architecture and rollout plan.

SSH certificate issuance

auth owns the SSH certificate authority for romaine.life-managed remote-host execution. It holds the only SSH CA private key and is the only issuer of OpenSSH user certificates. This replaces glimmung's retired local signer (glimmung/internal/server/ssh_ca.go + the glimmung-ssh-ca-private-key KV secret + GLIMMUNG_SSH_CA_PRIVATE_KEY env, all deleted in the glimmung-side PR of this migration). The trust root for SSH on a managed host is now the identity provider, not the workflow orchestrator.

Flow: a per-run issuance gateway (today: glimmung's native-runner ssh-cert callback, which validates the run token and derives the run-scoped key_id glimmung-run:<project>/<run_id> and principal <project>-agent) presents its projected k8s SA token plus a freshly minted ed25519 public key to POST /api/auth/exchange/ssh-cert. auth validates and clamps every security-relevant field server-side before the CA key signs anything:

  • principals must match SSH_CERT_PRINCIPAL_PATTERN (default ^[a-z0-9][a-z0-9-]{0,62}-agent$ — a caller cannot request root or an arbitrary login), capped at 4;
  • extensions are restricted to permit-pty (no port/agent/X11 forwarding, no user-rc); critical options are never honored from the caller;
  • TTL is bounded [60s, 1h] (default 10m) and rejected, never silently clamped, when out of range;
  • the public key must be ssh-ed25519 and must not itself be a certificate.

Inbound bearer is the gateway's projected SA token (RS256, audience pinned to https://auth.romaine.life per K8S_SSH_CERT_AUDIENCE, namespace+SA pinned per K8S_SSH_CERT_SA_ALLOWLIST). That allowlist is deliberately narrower than the service/federation allowlists — minting a host login credential is a higher-trust action than minting a service or federation JWT — so only the issuance gateway (glimmung/infra-shared) lands there.

The signing primitive (src/ssh-cert.ts) is a hand-rolled OpenSSH PROTOCOL.certkeys encoder over Node's stdlib ed25519 crypto.sign — no third-party SSH crypto dependency enters the identity provider's trust boundary. The contract test (src/ssh-cert.test.ts) proves the cert decodes to the requested structure, the signature verifies under the CA public key, and (in CI, with openssh-client installed) that real ssh-keygen -L parses it and reports the same principal / key id / validity / extension.

The CA private key is the auth-ssh-ca-private-key KV secret (PKCS#8 PEM ed25519), synced into env SSH_CA_PRIVATE_KEY via the ExternalSecret. An unset key fails issuance closed (503) and returns 404 from GET /api/ssh/ca rather than serving an empty trust anchor. The CA public key is served at GET /api/ssh/ca for hosts to populate TrustedUserCAKeys. See k8s/values.yaml (k8sOidc.sshCert*) for the one-time key-provisioning steps.

auth_ssh_cert_exchange_total{result} counts issuances by outcome; per-mint identity (subject, key id, principals, expiry) is in a structured ssh certificate issued log line, not a metric label (cardinality discipline). A sustained error_ca_unconfigured means issuance is down even while sign-in and the JWT exchanges are healthy.

A release job's certificate (AHT-231)

A release reaches the home PCs with no stored key. The delivery job makes an ed25519 key for one connection, asks Forgejo for its own job token (OIDC, audience https://auth.romaine.life/ssh-cert) and sends both to POST /api/auth/exchange/ssh-cert/forgejo with the token as the bearer and the body {"public_key": "ssh-ed25519 ...", "purpose": "..."}. The answer is {certificate, valid_before, key_id, principals, force_command}. The caller chooses nothing else; src/forgejo-actions-auth.ts fixes the rest:

purpose Principal The only command the certificate runs (its force-command)
at-update-release forgejo-release:at-update "C:\Program Files\at-home\at-update\current\at-update.exe" --task-run
treadmill-wake forgejo-release:nas-wake sudo /usr/syno/sbin/synonet --wake E8:FF:1E:D8:9B:FB eth0

Every certificate lasts 600 seconds, has the key id forgejo:<repository>:<run_id> (what a host's sshd log shows for the login) and carries no extensions: no terminal, no forwarding. A host lists the principal on a line that forces the same command; sshd refuses a login whose certificate and line name different commands, so the two change together. romaine-auth ssh-host installs forgejo-release:at-update only as that line (client.ReleasePrincipalLine), with command="..." and restrict, and refuses it bare.

The token is verified like the k8s exchanges' (RS256, the issuer's published keys, issuer https://forgejo.romaine.life/api/actions, the audience above, unexpired), and then one row of the claim rules must accept it. The rules are forgejoActions.sshCertRules in k8s/values.yaml: a row names a repository pattern and the exact ref, event_name and workflow values it accepts, and optionally workflow_ref patterns. As shipped: the release workflow (release/ci.yml) of any nelsong6/* or romaine-life/* repository on refs/heads/main or refs/heads/master, started by push or workflow_dispatch, and pipeline-templates' deliver.yml when dispatched on its main. A job no row accepts is refused, an empty or unreadable table refuses every job, and a pull request event is refused whatever the table says.

Not yet confirmed from a real token: which workflow a called workflow's token names in workflow and workflow_ref (the release suite reaches the PCs through pipeline-templates' deliver.yml as a called workflow). Every refusal writes one forgejo ssh certificate refused log line with reason, and for a verified token its repository, ref, workflow, workflow_ref, event_name and run_id, never the token, so the first delivery either gets its certificate or shows the values the rule needs. auth_ssh_cert_forgejo_exchange_total{result} counts the outcomes (denied_claims is a job the rules refused; error_issuer_unreachable is auth failing to read Forgejo's keys); an issued certificate's run is in the forgejo ssh certificate issued line.

Admin bot tokens (break-glass CLI auth)

POST /admin/bot-tokens is the break-glass path for an admin who needs a JWT they can paste into Authorization: Bearer … from outside a browser — typically to salvage state when one of the apps (tank-operator's chat UI, glimmung's pane, etc.) is broken and the normal browser flow is unusable.

Flow:

  1. Sign in to https://auth.romaine.life/admin (admin only — the page itself rejects non-admin callers).
  2. Click Mint bot token. The page POSTs to /admin/bot-tokens, displays the resulting JWT once with a copy-to-clipboard button, and forgets it client-side after navigation.
  3. Paste into an environment variable and curl: curl -H "Authorization: Bearer $TANK_JWT" https://tank.romaine.life/api/sessions/8/events.

JWT shape: standard auth.romaine.life claims (sub, email, name, role=admin, apps) plus a purpose: "bot" custom claim so downstream audit logs can distinguish bot mints from browser sign-ins. TTL is 24 hours — long enough for an unhurried debugging session, short enough that a token leaked into a shell history file is recovered automatically.

Revocation before natural expiry. No per-token revocation table — az keyvault key rotate auth-jwt-signing invalidates every outstanding auth.romaine.life JWT (cookie tokens, exchanged tokens, bot tokens) by rolling the signing key. This is the right tool for "I think a bot token leaked" since the bot-token surface is rare-event by design; rolling has no steady-state cost.

Observability: auth_admin_bot_tokens_minted_total (Prometheus, label-free — the per-mint identity is captured by a bot token minted log line that includes the admin's email, so log search is the audit path).

Admin service tokens (CLI auth for service-only MCPs)

POST /admin/service-tokens is the sibling of /admin/bot-tokens for the case where the downstream consumer's verifier pins on role=service rather than role=admin. The motivating consumer is romaine-life/mcp-github, whose JWT validator requires:

role == "service"  AND  actor_email is non-empty

The bot-token mint produces role=admin and never carries actor_email (the helper in src/mint-jwt-helpers.ts forbids it for non-service tokens), so an admin-minted bot token can't satisfy that contract. The service-token mint produces role=service and sets actor_email=<admin's email> — the admin is acting as a service principal on their own behalf, and the audit field carries the human responsible.

Flow is the same as bot tokens: sign in to /admin, click Mint service token, paste the resulting JWT into Authorization: Bearer …. TTL is 24 hours and revocation is the same key-rotation path.

Design note: this surface intentionally does NOT route through the k8s service-account exchange (/api/auth/exchange/k8s). That flow exists for pods whose identity comes from a projected SA token and whose actor is encoded in pod annotations — an admin at a workstation has neither, and threading the SA-exchange's synthetic-email / pod-lineage machinery through it would be machinery for machinery's sake. If a future use case wants a long-lived service identity for a named admin (separate user row, reusable sub, etc.), the right move is to add a mode: "admin-bot" consumer to src/service-exchange.ts rather than evolve this surface.

Observability: auth_admin_service_tokens_minted_total (Prometheus, label-free, same posture as the bot-token counter). A separate service token minted log line per mint carries the admin's email and the issued actor_email (equal today, kept explicit so a future decoupling surfaces in the log diff).

Tank app approvals

Tank-owned operational break-glass grants, including Git and Azure session grants, live in romaine-life/tank-operator. auth only keeps the narrow admin approval surface for test-slot model/effort elevation: auth authenticates the admin, mints a short-lived service JWT server-side, calls Tank's slot grant endpoint, and returns only the grant status to the browser.

Azure access on approval

A home machine gets Azure access by asking for it and having an administrator approve it, as tank-operator sessions did with request_azure_break_glass (AUT-9). No one's personal Azure sign-in is involved.

romaine-auth azure request --reason "read infra-aks's Argo CD and pods" --session <claude-session-id> --minutes 60
  1. The machine files the request with its own machine token (POST /api/azure-access/requests, {reason, minutes, session?}; 15 to 480 minutes, 60 by default; session is the Claude session the access is for, optional) and prints the approval link, https://auth.romaine.life/azure-access/<id>.
  2. An administrator opens the link, signed in, sees the machine, the session if one is named, the reason and the duration, and approves or denies. An undecided request lapses after 30 minutes.
  3. The machine waits on GET /api/azure-access/requests/<id>?wait=10, which auth holds open until the decision lands (at most 10 seconds a call, under the gateway's 15-second limit).
  4. Approved, the machine asks its device-token exchange for audience azure. While the grant lasts, auth signs a federation token (iss https://auth.romaine.life, aud api://AzureADTokenExchange, sub azure-access:approved-grant, at most 10 minutes and never past the grant), with the identity's client and tenant ids.
  5. az login --service-principal --federated-token turns it into Azure access as the azure-access user-assigned managed identity, whose federated credential trusts exactly that issuer and subject (romaine-life/infra-bootstrap tofu/azure-access.tf). Azure's access token lasts about an hour; romaine-auth azure login signs in again while the grant lasts.

The identity holds what mcp-azure-personal held: Contributor, Cost Management Reader and Key Vault Secrets Officer on the workload subscription, Key Vault Secrets Officer on the cluster subscription, data access to infra-cosmos-serverless, and the AKS Contributor and Cluster User roles on infra-aks.

The session's Azure clients. owner-guard refuses az and kubectl run by hand unless the session holds a grant (AHT-209). An Azure grant that names a session is one for those two clients, so the one approval covers both the sign-in and the guard (AHT-225): GET /api/break-glass/active?include=azure lists it after the break-glass grants as {id, kind: "azure", session, grantExpiresAt}, and break-glass status --session ID --azure reports it when the session holds no break-glass grant. Without include=azure the list holds break-glass grants alone, so an owner-guard that reads every grant as break-glass never sees one.

Revoking. The approval page of an active grant has Revoke now: auth signs no more tokens for it, and owner-guard stops letting its session run the Azure clients. An Azure sign-in already made keeps its access token until that ends, within the hour.

Record. Every request and decision is a row in azure_access_grant (created at startup), logged as azure access ... lines, and counted in auth_azure_access_total{action,result}.

azure request --no-wait files the request, prints it as one JSON line and returns without signing in; azure wait ID [--json] follows it, and azure login signs in once it is approved (Deciding from an approver device, below).

Configuration. azureAccess.clientId and azureAccess.tenantId in k8s/values.yaml are infra-bootstrap's tofu outputs azure_access_client_id and azure_access_tenant_id. Empty, the azure exchange refuses with not_configured.

Break-glass on approval

One Claude session on a home machine gets past owner-guard, and cluster-admin on the home k3s cluster, for a while, by asking for it and having an administrator approve it (AHT-209). It runs on Azure access's grant machinery: the same request rules, statuses, held status requests and refusals.

romaine-auth break-glass request --reason "move the sync runners' keys off their volumes" --session <claude-session-id> --minutes 60
romaine-auth break-glass request --reason "..." --session <claude-session-id> --no-wait
romaine-auth break-glass wait <id> --json
romaine-auth break-glass status --session <claude-session-id> --json
romaine-auth cluster token
  1. The machine files the request with its own machine token (POST /api/break-glass/requests, {reason, minutes, session}; 15 to 480 minutes, 60 by default; session is the Claude session id and required), answered {id, status, session, minutes, approveUrl, requestExpiresAt}. break-glass request prints the approval link, https://auth.romaine.life/break-glass/<id>, to stderr.
  2. An administrator opens the link, signed in, sees the machine, session, reason and duration, and approves or denies. An undecided request lapses after 30 minutes.
  3. The machine waits on GET /api/break-glass/requests/<id>?wait=10, held open as Azure access's is, answered {id, status, device, session, reason, minutes, requestExpiresAt, grantExpiresAt, decidedBy}. break-glass request exits 0 only when approved.
  4. owner-guard asks GET /api/break-glass/active?include=azure with the machine token: the machine's approved, unexpired, unrevoked grants, [{id, kind, session, grantExpiresAt}], kind break-glass, then its Azure grants that name a session, kind azure (Azure access, above). break-glass status --session ID [--azure] exits 0 and prints the session's grant, a break-glass one before an Azure one (--json: one such object), or exits 1 when it has none.
  5. While a grant lasts, the machine's device-token exchange with audience home-cluster-break-glass signs a JWT (iss https://auth.romaine.life, aud home-cluster-break-glass, sub the machine's subject, device the machine's name as its machine token and OpenBao's home-cluster token name it, grant the grant id), at most 10 minutes and never past the grant, with the keys the issuer's discovery already publishes. The home cluster's API server takes it as cluster-admin (nelsong6/home-cluster). cluster token prints it as a client.authentication.k8s.io/v1 ExecCredential for a kubeconfig exec plugin, asking auth each time, never cached.

Times in the answers are Unix seconds.

Revoking. The approval page of an active grant has Revoke now: the grant leaves active at once, so owner-guard stops letting the session past, and auth signs no more cluster tokens for it. One already signed lasts until it ends, within 10 minutes.

Record. Every request, decision and revoke is a row in break_glass_grant (created at startup), logged as [break-glass] ... lines, and counted in auth_break_glass_total{action,result}.

Deciding from an approver device (AGT-74)

A Claude session's break-glass, Azure access or continue request is presented to Nelson in the session's own window, and he decides it there instead of on the approval page. strip-owner files it and follows it; at-claude shows it and runs the decision.

romaine-auth break-glass request --reason TEXT --session ID [--minutes N] --no-wait
romaine-auth azure request --reason TEXT [--session ID] [--minutes N] --no-wait
romaine-auth continue request --reason TEXT --session ID --no-wait
romaine-auth break-glass wait ID [--json]
romaine-auth azure wait ID [--json]
romaine-auth continue wait ID [--json]
romaine-auth approve --kind break-glass|azure-access|continue ID
romaine-auth deny --kind break-glass|azure-access|continue ID
  • request ... --no-wait files the request and prints one line to stdout, {"kind","id","approveUrl","requestExpiresAt","reason","minutes"} (kind break-glass, azure-access or continue, whose minutes is always 0; requestExpiresAt Unix seconds), and exits 0. Without it, request prints the link to stderr and waits, as before.
  • wait ID returns once the request is no longer pending and exits 0 whatever the decision; only failing to learn it is an error. --json prints one line, {"kind","id","status","decidedBy","grantExpiresAt","requestExpiresAt"}: status approved, denied, revoked, or expired for a request that lapsed undecided (30 minutes) or a grant already over. A lapsed request is never filed again.
  • approve|deny --kind K ID signs a device assertion with this PC's device key and posts it to POST /api/approvals/decide, {kind, id, decision, assertion}. The assertion is the token exchange's (header kid the device id, iss = sub = the device id, at most five minutes, a fresh jti) addressed to https://auth.romaine.life/api/approvals/decide, with request_hash the hexadecimal SHA-256 of the sorted-key JSON {decision, id, kind}. auth takes it only from a device on APPROVER_DEVICES under its own name, unrevoked, whose sponsor is an administrator now, and records the decision as the sponsor's (decided_by_email), with the same effect as the approval page's form: the request is approved for its minutes (a continue request has none) or denied, and a status request held open on it wakes. It answers {kind, id, status, decidedBy, grantExpiresAt}; a request no longer pending answers 409, reason not_pending, with its status. The command prints one line and exits 0 on a decision made.

APPROVER_DEVICES names Nelson's home Windows PCs (nelsonpc, upstairspc, treadmill, nelsonlaptop) by device id, each checked to hold its key in the TPM (the Microsoft Platform Crypto Provider, not exportable) under the PC's Windows user. A PC re-enrolled gets a new id and is no approver until it is added. Until agents leave his Windows account (SES-291), anything running in his session can sign with that key, so this is no security boundary: the decision is his in the window, and owner-guard refuses approve and deny from a session.

A PC's request for its agent device (below) is decided the same way, kind agent-device.

Continuing after landing (AGT-83)

A Claude session whose PRs land cleanly is not woken again; one that needs to keep working after they land asks Nelson first. strip-owner (romaine-life/agent-tools) files the request when the session runs strip-owner approval --kind continue --reason "<why>", puts it to him in the session's window, and follows it; approved, it wakes the session once when its PRs have all landed and leaves their work package open.

romaine-auth continue request --reason TEXT --session ID [--no-wait]
romaine-auth continue wait ID [--json]
romaine-auth approve|deny --kind continue ID             # Nelson, in the window
  1. The machine files the request with its own machine token (POST /api/continue/requests, {reason, session}, both required), answered {id, status, session, reason, approveUrl, requestExpiresAt}. A request naming minutes is refused, and continue request has no --minutes: an approval lasts until the session's PRs have all landed, which strip-owner watches for, not auth. An agent device can't file one.
  2. Nelson decides it in the window (Deciding from an approver device, above, kind continue) or on https://auth.romaine.life/continue/<id>, signed in in the browser; no bearer token decides one. An undecided request lapses after 30 minutes, as a break-glass request does. There is no revoke.
  3. The machine waits on GET /api/continue/requests/<id>?wait=10, held open as break-glass's is, answered {id, status, device, session, reason, requestExpiresAt, decidedBy}, status pending, approved, denied or expired (lapsed undecided). An approved request stays approved: it has no end time.

It is a recorded decision, not a grant. It gives the session no access: no token exchange reads it, GET /api/break-glass/active never lists it, so owner-guard never sees it, and its decision carries no grantExpiresAt.

Record. Every request and decision is a row in continue_request (created at startup), logged as continue ... lines, and counted in auth_continue_total{action,result}.

Agent devices on approval (SES-314)

The Claude agents get a Windows account of their own on each home PC, ROMAINE\claude in the home domain, and that account is a device of its own, agent-<pc>, with a TPM key under that account (ROMAINE-51's one device per PC). It is enrolled only when Nelson approves the PC's request, never with a bearer token: the personal enroll (romaine-auth enroll) refuses a name starting agent-.

romaine-auth agent-device key --out FILE                 # as ROMAINE\claude
romaine-auth agent-device request --public-key FILE [--out FILE] [--no-wait]   # as the PC's own account
romaine-auth agent-device wait ID [--json]
romaine-auth agent-device registration ID [--out FILE]
romaine-auth approve|deny --kind agent-device ID         # Nelson, in the window
romaine-auth agent-device adopt --registration FILE      # as ROMAINE\claude
  1. As the agents' account, agent-device key creates that account's own TPM key if it has none and writes its public JWK. It refuses an account enrolled as anything but an agent device.
  2. As the PC's own account, agent-device request files it with the PC's machine token (POST /api/agent-devices/requests, {public_key_jwk}), answered {id, status, pc, name, approve_url, request_expires_at}. The device asked for is always agent-<the PC's device>; an agent device can't file one, and a key already a live device's is refused. --no-wait prints the AGT-74 line, kind agent-device, for the window to present.
  3. Nelson decides it from an approver device (approve|deny --kind agent-device, above) or on https://auth.romaine.life/agent-device/<id>, which takes only a browser session, never an admin bearer token, and shows the PC, the device name and the key's JWK thumbprint. An undecided request lapses after an hour. Approving makes the device row from the request's key under the PC's sponsor, revokes any earlier live agent-<pc>, and creates its machine account with no SSH grants.
  4. The PC follows it on GET /api/agent-devices/requests/<id>?wait=10, answered {id, status, pc, name, request_expires_at, decided_by} and, approved, registration: {device_id, name, token_url, machine_subject}, which request and registration write.
  5. As the agents' account, agent-device adopt exchanges a machine token signed with its own key for that registration and saves it (~/.romaine-device.json) only if auth answers for that device.

An agent device gets machine and ssh tokens only: no azure, home-cluster-break-glass or tailscale token, no PC sign-in (its key never signs a browser in as its sponsor), no Azure access or break-glass request, and it is never an approver. Its SSH grants, set as any machine's with romaine-auth grant, may name only the login romaine\claude (Win32-OpenSSH's name for the domain account), and no other device may be granted that login; its certificates carry permit-pty only, as every machine's do. A host trusts it with ssh-host --user 'romaine\claude', whose principals are kept at romaine-principals\romaine\claude because sshd reads %u as romaine\claude.

Until agents leave Nelson's Windows session, neither decision route is a boundary against them, as for break-glass: anything there can sign the approver's assertion or sign the browser in as him. Every request and decision is a row in agent_device_request (created at startup), logged as agent device ... lines and counted in auth_device_total{action="agent_*"}.

Rejoining the tailnet (AUT-10)

romaine-auth tailnet join puts a home machine back on the tailnet with no browser sign-in and no stored key. The machine asks its device-token exchange for audience tailscale, a five-minute federation token with subject machine:<device name> for the tailnet's trust credential; Tailscale trades it for a short-lived API token, which mints a one-use, pre-approved key carrying the node's own advertised tags; tailscale up joins with it, restating the node's prefs. A tagged node joined by key has no key expiry. A running node is left alone unless --force. Tailscale's trust credential decides which subjects and tags it accepts.

CLI-approved bot-token flow

/api/cli/device is the safer CLI path for agents like Codex. The local client creates a pending request, opens the browser approval page, and receives the same role=admin, purpose=bot JWT that /admin/bot-tokens mints after the signed-in admin approves.

Fetch requester guidance before choosing approval-page fields:

curl -sS https://auth.romaine.life/api/cli/requester-guidance

Response:

{
  "instructions": "Choose requester fields before calling POST /api/cli/device...",
  "fields": {
    "where_happening": "Describe where this request is happening...",
    "intended_use": "Describe what the bot token will be used for...",
    "misc_identifier": "Choose one common concrete singular noun..."
  },
  "constraints": {
    "where_happening_max_length": 500,
    "intended_use_max_length": 500,
    "misc_identifier_max_length": 80,
    "previous_misc_identifiers_limit": 50
  },
  "supported_approval_inputs": {
    "environment_name": {
      "label": "Environment name",
      "description": "Choose the non-secret DNS-safe name...",
      "placeholder": "loading-feature",
      "max_length": 63
    }
  },
  "previous_misc_identifiers": ["lantern", "teapot"]
}

Start a request:

curl -sS -X POST https://auth.romaine.life/api/cli/device \
  -H 'Content-Type: application/json' \
  -d '{
    "where_happening": "Codex desktop session in D:\\repos\\auth",
    "intended_use": "Use auth.romaine.life bot-token auth for follow-on romaine API calls requested in this session",
    "misc_identifier": "anvil",
    "approval_inputs": ["environment_name"],
    "redirect_uri": "http://127.0.0.1:49152/callback",
    "state": "opaque-client-state",
    "code_challenge": "<base64url-sha256-code-verifier>",
    "code_challenge_method": "S256"
  }'

Response:

{
  "device_code": "...",
  "user_code": "VK-ABCD-1234",
  "verification_uri": "https://auth.romaine.life/cli",
  "verification_uri_complete": "https://auth.romaine.life/cli?user_code=VK-ABCD-1234",
  "expires_in": 600,
  "interval": 5
}

where_happening, intended_use, and misc_identifier are required and intentionally loose. Agent callers should describe where the request is coming from, what the token is intended for, and provide a noun-style misc identifier that is not listed in previous_misc_identifiers. The approval page shows all three fields before the admin approves.

approval_inputs is optional. Each requested name must appear in supported_approval_inputs; unknown and duplicate names are rejected. Auth owns the label, help text, normalization, and validation so an untrusted requester cannot turn the approval page into an arbitrary data-entry form. Requested values are explicitly non-secret and the approval page warns that they are returned to the requesting CLI.

The client should try to open verification_uri_complete. If that fails, show verification_uri and user_code so the admin can enter the code manually. After approval, the page displays a one-time code for paste fallback. If a loopback redirect_uri was supplied, the page also shows a visible user-clicked return link with ?code=...&state=.... It does not automatically contact localhost from the browser.

Poll with the device code:

curl -sS -X POST https://auth.romaine.life/api/cli/token \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "urn:ietf:params:oauth:grant-type:device_code",
    "device_code": "<device_code>"
  }'

Or exchange the callback/pasted one-time code with PKCE:

curl -sS -X POST https://auth.romaine.life/api/cli/token \
  -H 'Content-Type: application/json' \
  -d '{
    "grant_type": "authorization_code",
    "code": "<one-time-code>",
    "code_verifier": "<original-code-verifier>"
  }'

The token response extends /admin/bot-tokens with the approved values: { token, expires_at, expires_in_hours, purpose, approval_values }. A request for environment_name returns, for example, "approval_values": { "environment_name": "loading-feature" }. These values are grant metadata, not JWT claims. Request secrets and one-time codes are stored only as SHA-256 hashes in Postgres. Loopback redirects are limited to explicit-port http://localhost, http://127.0.0.1, or http://[::1], and loopback use requires code_challenge_method=S256.

How apps consume this

Replace the per-app microsoft-routes.js + shared-secret jwt.verify() with JWKS-based verification:

import { createRemoteJWKSet, jwtVerify } from "jose";
const JWKS = createRemoteJWKSet(new URL("https://auth.romaine.life/api/auth/jwks"));

export async function requireAuth(req, res, next) {
  const token = req.cookies.auth_token ?? req.headers.authorization?.slice(7);
  if (!token) return res.status(401).end();
  try {
    const { payload } = await jwtVerify(token, JWKS, {
      issuer: "https://auth.romaine.life",
    });
    req.user = payload; // { sub, email, name, role, apps }
    next();
  } catch {
    res.status(401).end();
  }
}

Frontends start sign-in via redirect:

window.location.href =
  `https://auth.romaine.life/api/auth/sign-in/social/microsoft?callbackURL=${encodeURIComponent(location.origin)}`;

The session cookie is scoped to .romaine.life — SSO across every subdomain. Apps on another registrable domain use this service's OIDC authorization-code flow instead. chess-tactics.com is a public PKCE client whose backend performs the exchange and maintains host-only application cookies.

Custom user attributes

user.role and user.apps (JSON string) are defined under additionalFields in src/auth.ts and surface as columns in src/db/schema.ts. To add more, declare them in both files and run npx @better-auth/cli generate to regenerate the schema, then npm run db:push to apply.

Per-app data heavier than a few KV-style preferences belongs in the app's own database keyed by user.id, not in apps.

Local development

npm install
docker run -d --name auth-pg -p 5432:5432 \
  -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=auth \
  postgres:17
export DATABASE_URL=postgres://postgres:postgres@localhost:5432/auth
export BETTER_AUTH_SECRET=$(openssl rand -hex 32)
export MICROSOFT_CLIENT_ID=...      # see Key Vault `microsoft-oauth-client-id`
export MICROSOFT_CLIENT_SECRET=...
export GOOGLE_CLIENT_ID=...
export GOOGLE_CLIENT_SECRET=...
export BASE_URL=http://localhost:3000
npm run db:push
npm run dev

Deployment

ArgoCD renders the Helm chart in k8s/ (Application manifest lives in infra-bootstrap/k8s/apps/auth.yaml). The pipeline is:

  1. CI comes from pipeline-templates' suites (its fleet.json entry). A merge that changes the server or the clients releases v0.1.N: the native clients (Windows signed), the Go module's tag, and the image, self-tested and pushed to romainecr; the release opens a checked PR updating k8s/values.yaml.
  2. After that image pin merges, ArgoCD rolls the Deployment.
  3. CNPG manages the Postgres cluster lifecycle alongside

Cluster credentials come from CNPG's auto-generated auth-db-app Secret; OAuth client secrets and BETTER_AUTH_SECRET come from the auth-owned ng6-auth Key Vault via an ExternalSecret in k8s/externalsecret.yaml.

Bootstrap dance

After the first tofu apply against this repo (which writes auth-better-auth-secret to Key Vault) and the first ArgoCD sync (which brings up the Postgres cluster and the auth pod):

  1. Once-only — push the Drizzle schema into the empty auth database. drizzle-kit isn't shipped in the production image (devDep only), so do it from your laptop via a port-forward:

    kubectl -n auth port-forward svc/auth-db-rw 5432:5432 &
    export DATABASE_URL="$(kubectl -n auth get secret auth-db-app -o jsonpath='{.data.uri}' | base64 -d | sed 's/auth-db-rw\.auth\.svc\.cluster\.local/localhost/')"
    npm run db:push
    

    The pod will crash-loop until this is done (Better Auth queries tables that don't exist yet). Once pushed, the next pod start succeeds.

  2. The tofu lockfile for this repo is created by running the Update Tofu Lockfile workflow once via workflow_dispatch. After that, the Check Tofu Lockfile check on PRs will pass.

Follow-ups (separate PRs)

  • infra-bootstrap: add https://auth.romaine.life/api/auth/callback/microsoft to the azuread_application.microsoft_login redirect URIs and drop the per-app SPA redirects
  • infra-bootstrap: add k8s/apps/auth.yaml ArgoCD Application pointing at this repo
  • per-app PRs (kill-me, plant-agent, investing, house-hunt, fzt-frontend): replace microsoft-routes.js + shared-secret JWT with JWKS verification; replace MSAL frontend with the redirect snippet above