Enforces absolute data boundaries between tenants in shared schema via RLS policies on tenant_id.
100%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
custom-access-token-hook tile MUST already be deployed and emitting tenant_id inside app_metadata of every JWT.supabase-mcp-verification tile MUST be available to validate migration output.tenant_id column of type uuid (or text if legacy).information_schema.columns to confirm tenant_id column exists on the target table.ALTER TABLE <schema>.<table> ENABLE ROW LEVEL SECURITY;.pg_class.relrowsecurity for the target table.false.CREATE POLICY tenant_select ON <schema>.<table>
FOR SELECT USING (
tenant_id = (auth.jwt() -> 'app_metadata' ->> 'tenant_id')::uuid
);WITH CHECK using the same tenant_id extraction.USING clause.TO public -- always scope policies to authenticated role.anon role on the target table.anon exists, HALT and report the conflict.SELECT policyname, cmd, qual, with_check FROM pg_policies WHERE tablename = '<table>';.auth.jwt() -> 'app_metadata' ->> 'tenant_id'.