docs(security): ratify AR-1 MFA for platform roles

AR-1 option B (BDR-083): aal2 for every platform role change. Contract 5.7 rule, path inventory, bootstrap, factors, recovery, sessions; F17-F19; M4 scope, tests, DEV preconditions; fresh security review integrated (19.4).
This commit is contained in:
bchanot committed 2026-10-28 12:20:11 +01:00
1 parent 41d3b09120
commit 9c13bae4bc
5 files changed
+447 -57

No files matched your search

+10
View File
@@ -603,3 +603,13 @@ Supersedes for official sheets the 2026-10-25 rule « no graphic editor until St
Consolidation also fixed: rights table moved to M4 (M4 used table created in M5); core step V1-2.2 now before worker step V1-2.3; progressive review via per-group acknowledgments with digests.
Alt: options not chosen listed in contract §17 and the 2026-10-28 review; O15 B and O4 C rejected outright.
Status: ratified; contract under owner final review; V1-2.1 not authorised.
## BDR-083 | 2026-10-28 | AR-1 ratified option B: aal2 for every platform role change
Decision (owner brief « V1-2.0 : résolution définitive d'AR-1 »): grant, revoke, replace, promote, demote of any platform role (owner, admin, moderator, support) need valid aal2 session, checked server-side in RPC at call time. No permanent exception (owner, first admin, old accounts, admin UI, direct RPC). aal2 necessary never sufficient: can_manage_platform_role, self-target refusal, last-owner guard stay. Ordinary users no MFA. Completes O4, no change to D1-D9, O1-O23.
Why: aal1 owner session could grant owner to attacker account → enrol own TOTP → aal2 → self-grant all catalogue capabilities. Read from `20261008100200` RPCs.
Shape (contract §5.7): aal2 check 2nd after auth, before role checks (no role oracle); private assign/withdraw re-check for non-null actor; service_role revoked on profile_roles/profiles + RPC EXECUTE (F17); owner-count race locked (F18); first owner: enrol 2 factors first, role assigned last by operator; DEV owner: enrol before M4 applied; recovery operator-only, ban account during enrol window; GoTrue v2.197.0 enrol/unenroll need aal2 once verified factor (source read, sandbox proves).
Alt: A (owner+admin only) rejected: leaves moderator/support weak path; C (accept residual) rejected.
Review (fresh challenger FATAL(4), all integrated, no ratified decision changed): grant needs target with verified factor; private fns: non-null actor = auth.uid() + aal2, null actor only without JWT; advisory lock both RPCs; DEV precondition before M4 = ENVIRONMENTS §3.6 hardening (public default JWT secret + demo service key + 54321 LAN → aal2 forgeable) + seed owner password changed + role holders listed; recovery reordered (ban, password set with owner, unban, enrol).
Reserves: staff read policies (is_platform_admin) stay aal1, owner decision; stolen aal2 session residual; refused attempts not in audit table.
Status: ratified; contract only, no code/migration/DEV change; V1-2.1 not authorised.