How to Configure Make Postgres Read Only Access
To set up make postgres read only access, create a dedicated database role. Then grant that role only the right to read your target tables. Teams often link workflow tools to production databases using admin accounts. This shortcut creates huge risks when a workflow task runs bad queries. If a scenario has write rights, a logic bug can delete live data. A strict read-only role stops workflow tasks from changing or dropping rows. How to set up make postgres read only access Start by creating a
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 set up make postgres read only access, create a dedicated database role. Then grant that role only the right to read your target tables. Teams often link workflow tools to production databases using admin accounts. This shortcut creates huge risks when a workflow task runs bad queries. If a scenario has write rights, a logic bug can delete live data. A strict read-only role stops workflow tasks from changing or dropping rows.
How to set up make postgres read only access
Start by creating a group role in your database for read-only tasks. Group roles help teams manage rules when many users or tools need access. You grant permissions to the group role first. Next, you create a login user for your workflow tool. You then add that login user as a member of the group role. This keeps your permission setup clean as you add more tools.
Next, you must check the default rules on the database. A special role called PUBLIC gives default rights to every role on the system. By default, PUBLIC gets the right to connect and make temporary tables. It also gets the right to run functions and procedures. In Postgres 15 and later, users cannot create objects in the public schema by default. Older databases, or ones upgraded from older versions, still allow this. On those systems, an admin must revoke create rights on the public schema from PUBLIC. You should also revoke function run rights from PUBLIC if functions write data.
Now you can grant read rights to your new group role. In Postgres, the SELECT privilege lets a role read from tables and views. It also works on materialized views and other table-like objects. You can grant SELECT on a whole table or only on specific columns. Column rules help when a table holds secrets beside basic app data. Note that SELECT also allows the role to export data with copy commands.
Finally, you must plan for new tables that your team builds later. Table grants only cover the tables that exist right now. You must alter default privileges so the read role sees future tables too. Wait to link your workflow tool until you test the new role. Log in as the new user and try to change a row. The database should block the change right away.
What native roles solve and what they leave open
Native database roles do a great job of blocking direct data edits. When your workflow tool logs in, Postgres checks its role memberships. The database engine blocks any insert, update, or delete commands from running. It also blocks the tool from dropping tables or changing schemas. This protects data integrity against broken workflows or bad user inputs.
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.
Still, native database setup only decides who can log in. It does not inspect what individual queries do while in flight. Even with column grants, managing rules across hundreds of tables gets hard. Most teams end up granting read rights across whole schemas to save time. Once the workflow tool has schema read rights, it pulls every column. That means sensitive fields like emails and phone numbers flow into third-party logs. Card numbers and national IDs can also leak into external workflow histories.
Static database credentials also create a long-term security headache for your team. You have to type a password into the external workflow app. That password stays valid until an engineer manually rotates it in both places. Also, database logs only show the shared workflow user name. When a bad query slows down the database, you cannot see who built it. Teams need a way to inspect queries and mask data in flight. Masking rewrites matched fields like emails or card numbers in query results.
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
Can a Postgres read-only role still change data through functions?
Yes, if a function has write logic, running it can change data. Because PUBLIC lets all roles run functions by default, you must revoke that right.
How do I hide specific columns from a Make workflow?
You can grant the SELECT privilege on specific columns instead of the whole table. Another option is to use dynamic data masking to rewrite sensitive fields in results.
Why can my read-only user still create tables in the public schema?
Databases made before Postgres 15 let the PUBLIC role create objects in the public schema. An admin must revoke create rights on the public schema from PUBLIC.
Related guides
In this post