chore(memory): BDR-112 db:trial one-factor owner grant, contract and plan

This commit is contained in:
bchanot committed 2026-11-11 22:37:57 +01:00
1 parent 45d74536f5
commit 3189a1917d
4 files changed
+113

No files matched your search

+8
View File
@@ -910,3 +910,11 @@ Owner brief « R0 — Autorisation des trois dernières corrections graphiques
**Why coherent**: trial GoTrue SITE_URL / API_EXTERNAL_URL / redirect allowlist already = http://192.168.1.100:5194 (set at create and rotation from trial_host); a 127.0.0.1 app origin mismatches GoTrue links.
**Trade-off**: app proxies signed-in sessions to the trial gateway; reachable by every device of the private network. Firewall not changed (ENVIRONMENTS.md §3 owner action). Playwright LAN tests still gated by arbitration 2 (environment check before any LAN test): this decision covers manual use of the app only.
**Apply**: every later trial session starts the app on 192.168.1.100 unless owner says otherwise; same for `pnpm dev` (already LAN by scripts/dev-env.sh).
## BDR-112 — db:trial owner grant needs one verified TOTP factor (narrows BDR-083 to non-trial stacks) (2026-11-11)
**Decision** (owner 2026-11-11 « Modification de la règle MFA »): db:trial stack only, one verified TOTP factor suffices for owner grant, as for admin and practitioner; second factor optional backup.
**Narrows** BDR-083 Shape "first owner: enrol 2 factors first, role assigned last by operator" → db:trial carve-out only. Every other stack (production included), V1-2 §5.6/§5.7.1/§5.7.7 procedure text, IDENTITY.md recommendation: unchanged until distinct study + owner authorisation.
**Kept**: verified TOTP before owner/admin (count before typed confirmation + recount `>= :need` inside grant tx, `\gset` zero rows → rollback); catalogue rights need has_verified_totp (+ admin for editor/publisher); aal2 in RPCs/policies; SQL untouched; no bypass.
**Where**: scripts/db-trial.sh grant_platform_role `local need=1` (owner branch need=2 dropped), harness 375/0 (0 factors refused, 1 granted, 2 granted, tx recount 0 refused); SUPABASE.md §5.2; V1-2 §5.7.1 step 2 dated note + §5.6 pointer. Commit 45d7453; contract .claude/tasks/contracts/2026-11-11-trial-owner-one-factor-2050.md; verifier CONFORME 7/7, security PASS, 3-lens challenge folded.
**Alternatives**: keep 2 for owner (rejected by owner: trial friction); change SQL/production rule (forbidden without study).
**Trade-off**: one-factor owner losing device → no second path; recovery = V1-2 §5.7.7 by hand at trial db, or new account via `grant` (SUPABASE.md §5.2).