How to Configure Supabase Password Policy
You set up a supabase password policy by creating strong secrets for each database role. You must also stop teams from sharing the default admin password across services. Every new project starts with a default postgres role that holds admin rights. The password you pick at project setup belongs to this admin role. Many teams share this single secret across apps, tools, and staff laptops. If that password leaks, anyone with it gains full admin control over your data. How a supabase password po
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.
You set up a supabase password policy by creating strong secrets for each database role. You must also stop teams from sharing the default admin password across services. Every new project starts with a default postgres role that holds admin rights. The password you pick at project setup belongs to this admin role. Many teams share this single secret across apps, tools, and staff laptops. If that password leaks, anyone with it gains full admin control over your data.
How a supabase password policy works with database roles
A good password plan starts with how the platform handles database roles. Every project comes with the default postgres role for admin tasks. The platform does not grant full superuser status to this role. It blocks superuser status to stop bad commands from breaking the server. Instead, the platform gives this admin role extra rights for most daily tasks. Any query you run in the web dashboard runs as this admin role.
Your project also includes built-in roles for app traffic, such as anon and authenticated. You should never hand the main admin password to outside services. Instead, the vendor says you should make a new user for each service. Each user needs a long, random password and only the rights it needs. This step keeps one leaked password from putting the whole database at risk. Teams also rotate these secrets on a set schedule to limit exposure.
Why role passwords need tighter session rules
When engineers debug live issues, they often log in with a database client. If they share the main postgres password, you lose track of who did what. The database log only shows the role name, not the person on the keyboard. Even if each person gets a separate database user, static passwords still carry risk. People store passwords in plain text files or paste them into chat rooms.
A password rule only checks who can log in at the start. It does not check what commands that person runs after the session opens. An engineer with a valid password can still read tables with private customer data. They can pull emails, phone numbers, card numbers, or national IDs in one query. They might also run a drop or update command by mistake during a fix. Static role passwords cannot ask for peer approval before a risky query runs. They also cannot mask private fields in query results on the fly.
Application-to-Application Password Management: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
Steps to manage database secrets for your team
Start by keeping the main project password locked away for emergencies only. Never put that primary secret into app code or CI pipelines. Next, create separate database roles for each outside tool and team group. Give each role a strong password and restrict its table rights right away. Grant read rights only to the tables a specific role must check.
Review your active database roles every month to spot old or unused accounts. Delete any user role that belongs to a past project or former contractor. Change passwords right away if a laptop is lost or a secret leaks. Finally, pair your role setup with controls that inspect queries during the session. Checking commands and rewriting matched fields in results protects live data from human error.
Check every Postgres query on the wire
Database roles and network rules decide who can open a session. They do not read what each SQL statement does after login. With hoop.dev, you run an open-source proxy, a sidecar for your Postgres, inline in the Postgres wire protocol. On every query an AI agent or engineer runs against production, hoop.dev decides to pass, mask, block, or hold it for human review. Your apps and agents keep their login details and change only the host and port in the connection string their tool uses.
Before a query runs, hoop.dev guardrails refuse bad deletes or drops with a real Postgres error, or hold risky queries for approval. On the way back, hoop.dev data masking rewrites sensitive values in returned rows in memory, and every verdict goes to the audit trail. Furthermore, hoop.dev holds SOC 2 Type II, is MIT licensed, and generates evidence for HIPAA, GDPR, and PCI DSS. See the code on GitHub.
Frequently asked questions
What role uses the password created at project setup?
The password you set when creating a project belongs to the default postgres role. This role holds admin rights, and dashboard queries also run under this role.
Does the default postgres role have superuser rights?
No, the platform does not grant superuser access because it allows destructive server actions. The default postgres role gets admin rights with extra permissions for common tasks instead.
Should I share the main database password with third-party services?
No, you should never share the main postgres password with outside tools or services. Create a dedicated database user with its own strong password for every single service.
Related guides
In this post