mirror of
https://github.com/truespar/sentio.git
synced 2026-11-17 08:16:11 +00:00
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.