docs(adr): ADR-0069 enterprise authentication hardening#2275
Merged
Conversation
Proposes the target end-state for the auth settings surface (password policy, enforced MFA, SSO/OIDC, session controls, IP allowlist, anti-brute-force), each capability specified as a (setting -> enforcement seam -> mechanism) triple per ADR-0049 (no unenforced security properties). Distinguishes better-auth-native knobs (rateLimit, haveibeenpwned, twoFactor, genericOAuth, session windows) from the custom hooks/middleware + identity fields needed for complexity/expiry/history, account lockout, org-wide MFA requirement, idle/ absolute/concurrent sessions, and IP gating. SAML scoped P3/external (not in better-auth core). Phased P1/P2/P3; SCIM deferred to a separate ADR. Grounded in a read of plugin-auth (better-auth 1.6.x wiring) + auth.manifest + identity objects. Relates to #2246. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds ADR-0069: Enterprise authentication hardening — the design for taking the auth settings surface from "demo-grade" (10 fields: email/password, signup, verify, password min/max, session expiry/refresh, Google) to "enterprise security-review-grade".
Why now
Dogfooding the Setup app as a new system administrator (#2246) showed a real company can't enable the platform without a password policy, enforced MFA, SSO beyond Google, session controls, IP gating, and brute-force protection. This ADR specifies that end-state.
The discipline
Per ADR-0049 (no unenforced security properties), every capability is written as a (setting → enforcement seam → mechanism) triple — no field is proposed without the runtime code path that enforces it. It explicitly separates:
rateLimit,haveibeenpwnedbreached-password,twoFactor,genericOAuth/oidcProvider, sessionexpiresIn/updateAge/freshAge.SAML is called out as not in better-auth core → scoped P3/external (don't ship a SAML settings surface before an enforcing implementation exists — that would itself violate ADR-0049). SCIM/bulk-provisioning is deferred to a separate ADR.
Grounded in a read of
plugin-auth(better-auth wiring,bindAuthSettings/applyConfigPatch),auth.manifest.ts, and the identity objects. Phased P1/P2/P3.Docs-only (
Status: Proposed) →skip-changeset. Relates to #2246.