How to Integrate Looker and Supabase Safely

Published
Length
3 min read

Luis Felipe Dias

All posts

Pairing looker and supabase lets analytics teams run dashboards directly against production Postgres data. You set up a dedicated read role so charts update without risking app tables. Many teams start by pasting their main database password into their reporting tool. That shortcut gives every dashboard viewer admin rights over your core data. A safer setup separates reporting traffic from app traffic at the database level. How looker and supabase share data and permissions Looker connects t

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.

Pairing looker and supabase lets analytics teams run dashboards directly against production Postgres data. You set up a dedicated read role so charts update without risking app tables.

Many teams start by pasting their main database password into their reporting tool. That shortcut gives every dashboard viewer admin rights over your core data. A safer setup separates reporting traffic from app traffic at the database level.

How looker and supabase share data and permissions

Looker connects to your database using standard Postgres wire protocol over a network port. It sends SQL queries to read tables and build visual reports for your team. On the other side, Supabase runs a full Postgres database for your project.

Every new project starts with a default postgres role that holds admin privileges. Supabase does not grant full superuser status because that allows destructive database operations. Even so, the default password set at project creation belongs to this admin role.

Supabase docs states you should not give this main password to external services. Instead, you should create a fresh database user for each external tool. When you run queries in the Supabase dashboard, they run as the postgres role. Those dashboard queries also attach a source comment to help you spot them.

Your reporting tool does not need those broad admin rights to build charts. It only needs permission to read specific schemas and tables meant for analytics. You set up a custom role with read access to those exact tables. Then you put those specific login details into your reporting tool settings.

Common failure modes and how to scope roles

The biggest risk in this setup is sharing the main admin account. If a user gets SQL runner access in your reporting tool, they inherit that role. With the default admin role, a bad query can drop tables or change data. Shared accounts also make it hard to see which person ran a heavy query.

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

Continue reading? Get the full guide.

Free. No spam. Unsubscribe anytime.

Broad table access creates a second problem for data privacy. Production tables often hold raw emails, phone numbers, card numbers, or national IDs. If the reporting role can read every column, analysts might pull private user records by default. You can fix this by granting select rights only on safe columns or views. Dynamic data masking can also rewrite matched fields in query results before charts load.

Unlogged queries and open network paths add more risk to your database. When every chart uses one static login, database logs only show that single role name. You lose track of which team member triggered a slow or expensive data export.

To lock this down, start by creating a dedicated read role for analytics. Revoke write permissions and block access to private auth or system schemas. Set a statement timeout on that role so bad dashboard queries do not hang. Limit network paths so your database only accepts traffic from known addresses. Review your query logs often to check what data your reporting tool pulls.

Run guardrails and masking on the Postgres connection

Role grants and firewall rules are needed setup. Setup alone cannot check single SQL statements or mask sensitive rows in a response. By design, hoop.dev is an open-source proxy that sits beside Postgres, RDS, or Aurora as a sidecar for your Postgres. Clients and agent tools keep their credentials and point their connection string at the listener.

On each query, hoop.dev guardrails refuse disallowed drops, deletes, or table reads before they run. Next, hoop.dev data masking rewrites sensitive fields in returned rows that match your rules. Furthermore, hoop.dev holds SOC 2 Type II and logs every statement and verdict per resource. Check out the project on GitHub.

Frequently asked questions

Should I use the default postgres role for my Looker setup?

No, the default postgres role has admin privileges across your project. Supabase recommends creating a separate database user for every third-party service you use.

How do I stop dashboards from exposing sensitive user columns?

Grant your reporting role read access only to specific columns or curated views. You can also use masking to rewrite emails, phone numbers, or card numbers in results.

How can I prevent slow dashboard queries from hurting app performance?

Assign a dedicated Postgres role to your reporting tool with a strict statement timeout. This stops heavy analytics queries before they lock up resources needed by your app.

The query runs. The emails stay hidden.