feat/lc-22-bunyip-rp-cutover #346
No reviewers
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
psa-systems/lets-chat!346
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lc-22-bunyip-rp-cutover"
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?
Replaces lets-chat's local username + password / TOTP / password-reset surface with a Bunyip OIDC RP (`/auth/bunyip/{start,callback}`) as the sole sign-in path. Mirrors the drillmark + mokosh series posture so lets-chat stops being the odd-one-out in the PSA stack. Implementation spec lives at docs/lets-chat/sso/bunyip-only/ (overview, architecture, prerequisites, account provisioning, server cutover, rollout + testing). The four `LETS_CHAT_BUNYIP_SSO_{ISSUER,CLIENT_ID,CLIENT_SECRET,REDIRECT_URI}` env vars are mandatory at startup; lets-chat refuses to start without a working OP (no flag, no fallback). Added: `server/src/oidc/` (config + RP client + EdDSA verifier + PKCE primitives), `server/src/routes/bunyip_sso.rs` (start + callback only, no settings-Connect/Disconnect dance), `server/src/db/oidc_pending.rs`, `server/src/db/auth.rs` bunyip helpers (find_user_id_by_bunyip_sub, get_user_auth_flags_by_bunyip_sub, create_user_from_bunyip, username_exists). Login template rewritten as a "Sign in with Bunyip" shell. Deleted: routes/{auth password handlers, two_factor, password_reset, login_alerts, email_verification}, db/{two_factor, password_reset, login_alerts, email_verification}, templates/auth/{register, forgot, reset, verify_email_result, form_errors}, settings page's change-password + 2FA + email-verification sections, settings POST /settings/password handler. Migrations: 0029 adds `users.bunyip_sub` (NOT NULL DEFAULT ''), 0030 hard-cuts every pre-cutover row (operator must snapshot beforehand per docs/.../05-rollout-and-testing.md §5.1), 0031 creates the UNIQUE index now that no empty strings remain, 0032 creates `oidc_pending`, 0033 NULLs/empties the legacy password + TOTP + email-verification data on any rows that survived (v2 drops the columns themselves). The `saas` build is untouched (its `saas_auth.rs` JWT path stays); the cutover applies to the standalone build only. Bots + API tokens are orthogonal and unaffected. #LC-22 Operator-Action: Land the bunyip-api oauth_clients seed migration first, set the four `LETS_CHAT_BUNYIP_SSO_*` env vars on every deployment, take a pre-deploy snapshot of auth.db (the hard-cut migration is irreversible), then deploy. Existing local users cannot sign in post-cutover; operator manually re-grafts their authored content if a pre-cutover user comes back via Bunyip. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>