How to Integrate DataGrip and Supabase Safely

Published
Length
3 min read

Luis Felipe Dias

All posts

You link DataGrip and Supabase by pointing the desktop client to your cloud Postgres host. This setup lets your team run SQL queries, check schemas, and manage tables from one app. Many teams start by sharing the default database password across their local machines. That habit creates huge security risks as your company grows. A safe setup needs scoped roles, strict network rules, and clear query logs. How DataGrip and Supabase handle logins and roles DataGrip is a desktop client that talks

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 link DataGrip and Supabase by pointing the desktop client to your cloud Postgres host. This setup lets your team run SQL queries, check schemas, and manage tables from one app.

Many teams start by sharing the default database password across their local machines. That habit creates huge security risks as your company grows. A safe setup needs scoped roles, strict network rules, and clear query logs.

How DataGrip and Supabase handle logins and roles

DataGrip is a desktop client that talks to Postgres over a standard network port. When an engineer opens a session, DataGrip sends a username and password to the database. Supabase checks these details against its internal Postgres roles before allowing any query to run.

Every new Supabase project comes with a default postgres role that holds admin privileges. Supabase does not grant true superuser access because that allows destructive database actions. Instead, the platform gives this default admin role extra rights for common management tasks.

The password you pick when creating a project belongs to this default admin role. Supabase warns teams never to share this main password with outside tools or multiple users. Instead, you should create a fresh database user for every person or service.

Supabase also includes built-in roles like anon for public requests and authenticated for logged-in users. Desktop clients do not use these web roles by default. A direct client session uses the exact Postgres role name you type into the login screen.

Common risks with shared database logins

The biggest mistake teams make is giving every developer the main postgres role password. When everyone shares one admin account, your logs cannot show who ran a bad query. If someone drops a table by mistake, you cannot trace the action to a person.

End-to-End Encryption: architecture patterns and best practices

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Admin roles also bypass Row Level Security rules by default. An engineer who only needs to check a bug gets full read and write power. They can see raw emails, phone numbers, card numbers, and national IDs across every table. If an engineer leaves the company, rotating that shared password breaks every other local setup.

Unlogged queries from local laptops create another blind spot for security teams. Queries run inside the Supabase web dashboard carry a comment that marks the dashboard source. Direct traffic from a desktop client does not carry user tags unless you create separate accounts.

How to scope roles and network paths

Start by locking down the default postgres password in a safe vault. No human engineer should use this admin login for daily work in a desktop tool. Create dedicated Postgres roles for read-only checks, schema changes, and support tasks.

Grant each role only the table and column rights needed for the job. For example, give support staff a role that reads order tables but blocks sensitive user columns. Turn on Row Level Security and test how your custom roles interact with those rules.

Next, restrict how traffic reaches your database over the public internet. Set up network rules so only known office or VPN addresses can reach the database port. Review your active database users each month and remove accounts that staff no longer need.

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 runs beside your database as a sidecar for your Postgres. It reads plain and prepared queries on the wire with no change to your users or drivers.

When a tool or agent sends SQL, hoop.dev Postgres controls check each statement against your deny rules. An AI Analyzer you configure can also score intent or hold a risky query for human review. 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

Should my team use the default postgres role in DataGrip?

No, the default postgres role has admin rights across your whole project. Supabase advises creating a separate database user for each person or tool instead.

Why do queries in DataGrip return more rows than my web app?

Web apps often use the anon or authenticated roles, which follow Row Level Security rules. A direct client login using an admin role bypasses those security filters by default.

How can we protect sensitive columns during support checks?

You can restrict column privileges in Postgres or apply data masking to your query results. Masking rewrites matched fields like emails, phone numbers, and card numbers before results reach the client.

The query runs. The emails stay hidden.