Files
sentio/crates
Jens Nylander 7fd794ac75 tenant isolation: name the cross-tenant scope platform:admin
Wildcard scope was doing two jobs. A new tenant could never get its
first API key: ensure_tenant_match is strict equality and nothing
bypassed it, so only SQL could provision one. And every handler in
routes/tenants.rs was scope-gated only, so any `*` key could read,
rename, suspend or delete another tenant, including a `*` key a tenant
minted for itself.

Cross-tenant reach is now platform:admin. `*` does not cover it, and a
session cannot grant it unless it holds it, so a tenant has no way to
mint itself out of its tenant. Migration 005 gives it to the system
tenant's wildcard keys, which are the ones that already had the reach.
2026-10-17 09:43:50 +02:00
..