feat(supabase): db:trial grants owner with one verified TOTP factor

Owner decision 2026-11-11: on the trial stack one verified factor suffices
for owner as for admin, a second one optional. The count before the typed
confirmation and the recount inside the grant transaction stay; SQL, aal2
and the rule for every other stack are unchanged.
This commit is contained in:
bchanot committed 2026-11-11 22:37:40 +01:00
1 parent 0573d66864
commit 45d74536f5
4 files changed
+30 -18

No files matched your search

+7 -1
View File
@@ -413,7 +413,8 @@ A1 to A6):
(residual, §13). V1-2.5 records what removing a factor does to the
account's other open sessions.
- Loss of a factor: Supabase Auth issues no recovery codes. The owner enrols
two factors on two devices before the first grant on any stack. Another
two factors on two devices before the first grant on any stack (db:trial
exception: §5.7.1). Another
account that loses its factor keeps its `aal1` access (catalogue, rest of
the application) and loses the administration until recovery.
- Recovery is an operator procedure, never an application feature: no RPC,
@@ -550,6 +551,11 @@ the reverse:
API, email confirmed, and hands over the initial secret out of band;
2. the future owner signs in, enrols two TOTP factors on two devices and
verifies both; no role exists yet, so nothing is at stake in the window;
(db:trial exception, owner, 2026-11-11: on the persistent trial stack of
`pnpm db:trial` one verified TOTP factor suffices for the owner grant, as
for admin; a second factor is an optional backup. This rule, for every
other stack, production included, is unchanged until a distinct study and
authorisation.)
3. the operator checks, read-only, that the account has verified factors and
that their names and creation times match what the owner did;
4. only then the operator assigns the owner role from a privileged SQL