Part of the metadata liveness audit umbrella #1878 (P0 security cluster).
Problem
PolicySchema is 100% dead: password complexity, session idle/absolute timeout, forceMfa, IP allow-list (trustedRanges/vpnRequired), and audit retention/redaction are all parsed but enforced by nothing. It is not even registered as a metadata type. better-auth runs hardcoded defaults instead (auth-manager.ts:458), producing a false sense of compliance — an admin can author a strict policy and the system silently ignores it.
Decision required (enforce or remove)
- Enforce: register
policy as a metadata type, wire each group into its enforcement point (better-auth config for password/session/MFA, request middleware for IP allow-list, audit pipeline for retention/redaction).
- Remove: delete
PolicySchema from the spec so authors aren't misled, and document the actual (hardcoded) behavior.
Shipping it parsed-but-unenforced is a compliance/security liability and is not an acceptable end state.
Evidence
docs/audits/2026-06-security-identity-property-liveness.md
auth-manager.ts:458 (hardcoded defaults)
Part of the metadata liveness audit umbrella #1878 (P0 security cluster).
Problem
PolicySchemais 100% dead: password complexity, session idle/absolute timeout,forceMfa, IP allow-list (trustedRanges/vpnRequired), and audit retention/redaction are all parsed but enforced by nothing. It is not even registered as a metadata type.better-authruns hardcoded defaults instead (auth-manager.ts:458), producing a false sense of compliance — an admin can author a strict policy and the system silently ignores it.Decision required (enforce or remove)
policyas a metadata type, wire each group into its enforcement point (better-auth config for password/session/MFA, request middleware for IP allow-list, audit pipeline for retention/redaction).PolicySchemafrom the spec so authors aren't misled, and document the actual (hardcoded) behavior.Shipping it parsed-but-unenforced is a compliance/security liability and is not an acceptable end state.
Evidence
docs/audits/2026-06-security-identity-property-liveness.mdauth-manager.ts:458(hardcoded defaults)