On this page
- Why can a Supabase RLS user update their own role?
- How do I set column-level grants for authenticated in Supabase?
- How do I prevent users changing subscription_tier in Supabase?
- How do I connect Claude Code, Cursor or Codex to the hosted MCP?
- How do I verify the Supabase column grant fix?
- Related guides
- Official docs behind this checklist
- FAQ for builders before launch
Why can a Supabase RLS user update their own role?
An ownership policy using auth.uid() = id keeps the edit on the caller’s row. If authenticated also has table-wide UPDATE, both checks permit changes to server-managed fields on that row. Keep the ownership policy and narrow the effective grant.
How do I set column-level grants for authenticated in Supabase?
For a profiles table where users edit display_name and avatar_url, put the revokes and grant below in one migration. Substitute your table and actual editable and protected columns.
Check for additional grants through roles that authenticated or anon inherit and remove any grants that still allow updates to protected columns. Confirm service_role keeps the grants it needs for server writes.
revoke update on table public.profiles from public, anon, authenticated;
revoke update (role, subscription_tier, is_admin) on table public.profiles
from public, anon, authenticated;
grant update (display_name, avatar_url) on table public.profiles to authenticated;How do I prevent users changing subscription_tier in Supabase?
Keep subscription_tier out of the editable column grant and write it from trusted server code using service_role. For profiles users can create, give INSERT its own allowlist or create the row on the server with trusted defaults. Review upserts and any exposed RPC functions that can write the protected fields.
How do I connect Claude Code, Cursor or Codex to the hosted MCP?
Run the matching command for Claude Code or Codex. In Cursor, add a Streamable HTTP MCP server named viberaven and paste the URL on the last line.
claude mcp add --scope project --transport http viberaven "https://viberaven.dev/mcp?src=site"
codex mcp add viberaven --url "https://viberaven.dev/mcp?src=site"
https://viberaven.dev/mcp?src=siteHow do I verify the Supabase column grant fix?
- 1Run this from your project folder to check the migrations for supported server-managed column findings in a local Postgres model.
Terminal npx viberaven check - 2The proof-gated fixer is in development. In a CLI build that includes it, run this from your project folder. It offers a migration only after your migrations and the candidate fix load in in-memory Postgres and the proof confirms that the protected write is denied, normal profile edits still work and service_role can still write the protected field.
Terminal npx viberaven check --fix - 3Review the migration and verify the effective grants and permitted writes on your Supabase staging database. The in-memory proof covers the migrations and writes it exercised.
Related guides
Official docs behind this checklist
Browse all launch guides · Read resources · How to make and check your next change