How to Configure Supabase Revoke Access

Published
Length
3 min read

Luis Felipe Dias

All posts

To run a supabase revoke access task, you remove privileges from roles or drop users. You also rotate shared database passwords to block old apps and team members. Many teams share the default admin role across multiple services and developers. When one person leaves, broad permissions make it hard to cut off their session. Revoking rights on a shared role can break live apps that use the same login. How a supabase revoke access setup works in Postgres Every project starts with a default post

Your coding agents run with your access.

Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.

To run a supabase revoke access task, you remove privileges from roles or drop users. You also rotate shared database passwords to block old apps and team members. Many teams share the default admin role across multiple services and developers. When one person leaves, broad permissions make it hard to cut off their session. Revoking rights on a shared role can break live apps that use the same login.

How a supabase revoke access setup works in Postgres

Every project starts with a default postgres role that holds admin privileges. The platform does not grant superuser rights because those allow destructive database actions. Instead, the default postgres role gets extra rights for common admin tasks. The password you set at project creation belongs to this default admin role. Queries you run in the web dashboard also execute under this default role.

The platform recommends that you never give this main password to outside services. Instead, you should create a separate database user for every person or service. A clean supabase revoke access workflow depends on this strict user split. When each service has its own role, you can pull table rights safely. You can remove read or write rights from one role without breaking other apps.

Projects also include built-in roles such as anon for public requests. When you create new tables, you must check which built-in roles hold rights. Removing default privileges from public roles keeps unauthenticated users from reading private rows. If a team member leaves, you revoke their custom role rights and drop the user. You also end any open database sessions tied to that specific user name.

What native role removal solves and what it misses

Native role management lets you control who can log in to the database. Separating users ensures that revoking one account does not break your whole system. It also stops outside tools from holding full admin power over your data. You can limit each service to the exact tables it needs to read.

Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Still, static database roles only check who logs in at the start. They do not inspect what individual queries do while a session is active. A user with valid read rights can still pull thousands of customer rows. Native grants cannot rewrite sensitive fields like emails, phone numbers, or card numbers. If an engineer needs temporary admin rights to fix a bug, revoking them later is manual. If someone forgets to remove those rights, the account keeps broad access forever.

Best practices for ongoing role cleanup

Start by auditing which people and apps still use the default admin password. Move every service to its own dedicated database role with narrow table privileges. Check your active database sessions before you drop an old role or user. Make role reviews a regular habit whenever an engineer changes teams or leaves.

Add query and result controls beside Postgres

Grants and pools govern who logs into PostgreSQL. Yet every query in an open session still runs with that role's full scope. In practice, hoop.dev sits inline in the wire protocol beside your database as a sidecar for your Postgres. For every plain or prepared query an agent or human runs against production, hoop.dev decides to pass, mask, block, or escalate it for review.

When a tool or agent sends SQL, hoop.dev Postgres controls block banned statements before execution or hold risky ones for human approval via an AI Analyzer you configure. Matched sensitive columns in result rows are masked in memory before they reach the caller. Each query and decision is logged per listener, which generates evidence for SOC 2, HIPAA, and GDPR audits. View the binary on GitHub.

Frequently asked questions

Why should we avoid sharing the default postgres role?

The default postgres role has broad admin privileges and uses your main project password. If you share it, you cannot cut off one user without rotating the password everywhere.

Does the platform give superuser rights to the default admin role?

No, the platform blocks superuser rights to prevent destructive database operations. The default postgres role receives admin privileges and specific extra rights instead.

How do we cut off an outside service without breaking our app?

Create a dedicated database user for every outside service before you share credentials. When you no longer trust or need the service, revoke privileges for that role alone.

The query runs. The emails stay hidden.