New Public Beta: Data Access Enforcement for Postgres resources

Hey Retool community :waving_hand: If you're running Postgres resources with more builders or more sensitive data than you're fully comfortable with, this beta is for you. :backhand_index_pointing_down:

Data Access Enforcement lets a resource owner write table-, column-, and row-level policies once, on a Postgres resource. Retool checks every query against them on its backend, from every app, workflow, saved query, and AI agent that uses the resource, including the ones nobody has built yet.

What you can do

  • Grant specific tables. A query against an ungranted table fails, and the error names the table.
  • Grant specific columns. SELECT * does not get anyone into a column they were not granted.
  • Filter rows by the signed-in user, such as their email or a user attribute like team or region.
  • Grant read-only or read-and-write, separately from who can use the connection.

Before you turn it on

It is closed by default. Once enforcement is on, every query on that resource is blocked until a policy grants it, in every environment. The safe order is: turn it on, grant your admin group full access so nothing breaks, then write the real policies group by group. Connect the resource directly to Postgres; poolers such as PgBouncer are not supported.

One thing will always block access: workflow runs without a user identity present (schedules, unattended webhooks, inbound emails, agent-to-agent calls). Retool lists the affected workflows when you enable enforcement, and the workflow resource guide shows the fix.

Where to find it

Open any Postgres resource you own and go to the Access enforcement tab. Resources with enforcement on show a Controls on marker in the resources list. On self-hosted, turn on the feature flags first. Setup guide.

What we want to know from you :speech_balloon:

Our team will be around to answer your questions and field your feedback! Here is what is most useful for us to learn right now:

  1. Where did the policy work as expected?
  2. A policy you wanted to write and could not express.
  3. Which resource you would protect next. Retool Database and REST APIs are planned; your order matters.
  4. If you are on the business plan and can make use of this feature and how you might use it.
1 Like