How to Configure Windsurf Supabase Read Only Access

Published
Length
3 min read

Luis Felipe Dias

All posts

You set up windsurf supabase read only access by creating a restricted database role. You then give that role's login details to the IDE agent. Many teams skip this step at first. They hand the default admin login to the AI tool so it works fast. Broad roles let the agent change tables, delete rows, or read secret fields. How windsurf supabase read only access works in practice Cognition renamed Windsurf to Devin Desktop in June 2026. It keeps the same IDE and features under the new name. Ins

Auditor Read-Only Access + Customer Support Access to Production: the complete guide

Architecture patterns, implementation strategies, and security best practices. Delivered to your inbox.

Free white paper. No spam. Unsubscribe anytime.

You set up windsurf supabase read only access by creating a restricted database role. You then give that role's login details to the IDE agent. Many teams skip this step at first. They hand the default admin login to the AI tool so it works fast. Broad roles let the agent change tables, delete rows, or read secret fields.

How windsurf supabase read only access works in practice

Cognition renamed Windsurf to Devin Desktop in June 2026. It keeps the same IDE and features under the new name. Inside the editor, the agent can run terminal commands on its own. It asks for user permission before running them. The agent uses a dedicated shell on your machine. It runs zsh on macOS and bash on Linux. Because this shell loads your normal profile, the agent sees your local variables. The legacy Cascade agent also talks to Model Context Protocol servers.

Every Supabase project starts with a default postgres role. This role has admin rights, though it is not a full superuser. Supabase blocks superuser access to prevent destructive database actions. Still, the password you set at project creation belongs to this admin role. Supabase warns you never to share this admin password with outside tools. Instead, you should make a fresh database user for each tool or service.

To lock down the agent, you make a new Postgres role in your project. You grant this role permission to read specific schemas and tables. You do not grant permission to insert, update, or drop anything. Next, you pass this read-only login to your local shell or MCP server. When the agent runs a query, Postgres checks the role rules. The database blocks any write attempt right away.

Why database roles alone leave gaps for AI agents

A read-only Postgres role stops the agent from changing or deleting your data. It solves the risk of an AI tool dropping a table by mistake. Still, native database roles only check who logs in and which tables they read. They do not inspect what individual queries do while running.

First, a read-only role can still read every column in an allowed table by default. If a table holds customer emails, phone numbers, or card numbers, the agent pulls them. Those values then flow into the AI model context. Native roles do not rewrite matched fields in query results on the fly.

Second, local shell setups require you to store database passwords on developer laptops. Since the agent loads the user shell profile, it can read local secrets. Managing and rotating static database passwords across a whole engineering team takes constant work.

Auditor Read-Only Access + Customer Support Access to Production: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Third, database roles do not give you a clean audit trail per developer prompt. When several engineers share one read-only service role, all queries look the same. You cannot easily link a slow or sensitive query back to one person.

Steps to tighten native database permissions

You can improve your native setup with a few extra Postgres rules. Start by granting read access only to the exact tables the agent needs. Avoid granting access to an entire schema at once. If a table has sensitive columns, create a safe view that leaves them out. Grant the agent role access to the view instead of the base table.

You should also set a statement timeout on the read-only role. AI agents often write bad joins that scan millions of rows. A short timeout kills runaway queries before they hurt production performance. Finally, review your database roles every month and remove unused logins.

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

Did Windsurf change its name to Devin Desktop?

Yes, Cognition announced on June 2, 2026 that Windsurf is now Devin Desktop. It keeps the same IDE features, and the old docs redirect to the new site.

Should I give the default Supabase postgres password to an AI agent?

No, the default postgres role has admin rights across your project. Supabase advises creating a separate, limited user for every external tool or service.

Can a read-only role still expose sensitive customer data to the model?

Yes, read permission lets the agent select all columns in an allowed table by default. Without data masking or restricted views, emails, phone numbers, and card numbers return in plain text.

Save the open-source gateway.

hoop is MIT-licensed infrastructure for controlling how AI agents reach production data. Star hoophq/hoop so you can inspect it, deploy it, or share it when your team starts governing agent access.