ai-coding-minesIndexGitHub

The Supabase key overhaul and an RLS misdiagnosis

Deploy and infrastructure
TypePrefixUse
Publishable keysb_publishable_Safe to expose in the browser (old anon)
Secret keysb_secret_Server only, bypasses RLS (old service_role)
Legacy tabeyJ... (JWT)Old anon / service_role, still works

service_role moved to the Legacy tab. Current path: Settings → API Keys → Secret keys.

The anon key can't write to Storage, and it invites a misdiagnosis

Writes fail with new row violates row-level security policy, but listing buckets returns an empty array with no error. It looks like "there are no buckets," not a permissions problem.

Warning

Secret / service_role is a master key that bypasses all RLS. Server env vars only; never in the frontend or a public repo.