Moving Off Retool's All-or-Nothing Permissions to Row-Level and Column-Level Access Control
Retool's new policies close the per-app gaps, but not the database's.

Least-privilege access for internal database tools needs row, column, and export rules that apply beyond any one app, with restricted database credentials to back them up. Moving off Retool’s traditional all-or-nothing permissions means moving those rules out of individual interfaces while potentially keeping the platform. Tool-layer enforcement makes self-service possible, while database permissions protect the boundary that a tool cannot control.
How Retool's app-level permission model creates the access control problem
In Retool’s traditional resource model, the apps, workflows, and agents that connect to a resource all use the same set of database credentials. Those credentials determine which tables and columns the connection can reach. An app might show only customer names and ticket status, even though the resource behind it can also read sensitive financial fields. The interface shows less than the connection permits.
Builders narrow what users see by writing scoped queries, choosing which columns appear in a table component, or disabling an edit button. These controls shape the app’s behavior, but they do not reduce the database resource’s authority. A WHERE clause in one query cannot constrain another query that omits it.
This distinction is easy to miss because a carefully built interface can look thoroughly locked down. But what happens when someone uses another surface that connects to the same resource? The rule must be built there too. Each new app, workflow, or agent therefore creates another place where the same access decision has to be expressed correctly.
What breaks when access control is embedded in individual apps
The two failure modes are over-exposure and constant rebuild work. Over-exposure appears when a user gains a route beyond the app’s intended queries. A contractor invited to build a support dashboard, for example, can open the query editor and run arbitrary SQL against the same production database resource. The dashboard’s carefully scoped query does not constrain what that editor accepts. The credentials, rather than the screen, set the effective boundary.
Constant rebuild work is the other side of that arrangement. To limit what someone sees, engineering must build an interface with tight controls for each use case. Each new question about the data leads to another request for a locked-down app. Self-service stops at the edge of the interface. Letting users explore beyond it exposes the broader resource, while keeping them inside it makes engineers the queue through which every question passes.
Organizations can end up with both problems at once. Some interfaces receive painstaking restrictions, while other paths retain broad access. Compliance then inherits an awkward puzzle, because a query log records activity without supplying the missing authorization policy. When no data-level rule sets the boundary, a query that succeeds cannot on its own show whether the access was allowed or was lateral movement. Maintaining least-privilege database credentials per resource has an administrative cost, but that bounded task is different from rebuilding authorization into every new interface.
What Retool's Data Access Enforcement actually does and how it works

With Retool’s Data Access Enforcement, the resource layer decides who can access the data. Its two components have distinct jobs. Data access enforcement switches query checks on or off per resource, while access policies define what each group may reach by table, column, and row. If the switch is on and no policy is active, everyone is blocked, including admins.
Tables and columns added later stay blocked until a policy covers them, unless a grant already in place explicitly includes future objects. Requiring explicit permission for a new field is the core difference from broad access with exceptions. Access begins blocked and opens through deliberate grants.
Query evaluation follows a defined order, beginning with identity, then table access, column access, and the row filter. A failed table or column check stops the query with an error naming the object. Row restrictions instead narrow the result set. These checks allow fewer records to be returned while stopping queries that would unexpectedly lose a column an app depends on. SELECT * is blocked under a fixed-column grant and allowed only with full access or an “all present and future columns” grant.
The same policy applies to apps, user-triggered workflows, agents acting for a user, the Query Playground, and raw SQL against the resource. Row filters can use expressions such as {{ current_user.email }} or {{ current_user.metadata.<attribute> }} to base access on managed attributes such as team or region. The identity travels with the request.
Consider an account manager clicking “Prepare renewal brief.” A workflow pulls usage, tickets, and invoices from Postgres and hands them to an AI agent. A row filter on account_owner limits the app, workflow, and agent to that manager’s accounts. If the agent selects discount_pct or gross_margin, which are granted only to Finance, the query fails. The policy governs the whole chain rather than relying on three separate implementations of the same intention.
The genuine limits of enforcement that teams need to plan around
Data Access Enforcement currently covers PostgreSQL resources only, leaving SQL Server, MySQL, and other database types outside these policies. Availability is also restricted to public beta for Enterprise organizations on cloud, edge, and stable deployments. Business and lower plans do not have it. For those plans and unsupported databases, the available foundation remains least-privilege database credentials and scoped resources.
Identity creates another limit for automated work. Scheduled runs, webhook-triggered runs, runs triggered by another agent through an A2A call, and runs from public or embedded apps are blocked when they cannot be attributed to a signed-in user. They require a service user as the run identity to continue. Automation does not get an anonymous pass. Connection pooling proxies such as PgBouncer can also break enforcement, which requires a direct Postgres connection.
Row filters control which rows someone can read, update, or delete, leaving newly created rows unvalidated. A user can insert a record outside their own filter or edit an accessible record so that it no longer matches. Schema visibility has a separate boundary, because someone with Edit access can discover all table and column names even when policies grant no access to them. The filtered schema browser does not make that information confidential, and DDL statements such as CREATE, ALTER, DROP, and RENAME require Full access.
The most consequential limit sits outside Retool altogether. Anyone connecting directly to the database with the resource’s credentials bypasses every Retool access policy. Enforcement runs exclusively in the tool, outside PostgreSQL itself. No more careful policy configuration can close a path that never passes through the policy evaluator. This is why enforcement is a strong governance control without being a complete database security boundary.
Why database-layer permissions are the security floor, not an alternative to tool-layer enforcement
The tool layer applies group and user rules consistently across its query surfaces, making self-service possible without encoding authorization in every app. It also makes those decisions auditable. Database permissions constrain the connection itself, regardless of which tool, script, or direct client uses it. A Retool policy cannot stop a psql session using the same credentials.
Least-privilege database credentials bound what the resource can do at all, while tool-layer policies narrow what individual users may do within that boundary. Neither substitutes for the other’s job.
Teams without Enterprise access or PostgreSQL resources can still establish a foundation for access control with scoped connections and restricted database credentials. AI agents make the distinction more urgent because an agent with access to every column can exfiltrate data at a scale and speed unlike a human query pattern. Moving authorization out of apps means less work repeating policies, but the connection beneath them still needs limits on what it can reach.
How can sales and support get row- and column-level access without rebuilding apps?
Basedash is one option for this shift: it connects directly to production databases including Postgres and MySQL and presents its self-serve analytics as a way to use row, column, and export rules set by engineering without locking down each app on its own. Its documented Postgres RLS mechanism sets a basedash.groups session variable containing the user’s group memberships, which database policies can reference to filter rows.
That mechanism gives the general principle a concrete implementation. Rules belong to the access path, so a support agent can be scoped to assigned accounts and a sales rep to their region without a separate interface for each team. Non-technical users can ask questions and edit records within their grants. Export permission is a distinct criterion, too. A team choosing a destination needs more than a promise that sensitive columns can be hidden on screen, and the documented Postgres RLS mechanism should not be assumed to describe every supported database.
What to do before turning on enforcement, and what to watch once it's on

For teams adopting Retool’s enforcement, preparation must precede the switch. First, audit which groups use each resource and plan the policies they need. Without an active policy, enabling enforcement immediately blocks existing queries, including admin queries. Next, identify every workflow using the resource and distinguish user-triggered work from scheduled, webhook, and A2A runs. Automated work needs a service user run identity where no signed-in user can be attributed.
Connection settings come next, before any policy rollout. Check whether “Disable converting queries to prepared statements” is enabled and turn it off, because that setting is incompatible with enforcement. Verify that the resource connects directly to Postgres rather than through PgBouncer or another connection pooler. A sound policy cannot compensate for an incompatible query or connection setup.
The rollout sequence starts with a single Full Access policy for all users, restoring the pre-enforcement behavior. Then add narrower granular policies for groups that need restricted access, using “Except” to remove those groups from the broad policy. The exclusion is essential to the intended narrowing. This sequence gets enforcement running before it reduces access, so existing queries do not have to face both changes at once.
Once enforcement is on, watch the less obvious query dependencies. A column referenced in a WHERE clause still requires permission even if it never appears in the results. Queries that use SELECT * must name the columns when a grant covers a fixed list. New columns added outside Retool are not automatically included in an “all present columns” grant, so queries referencing them can fail. Insert operations also deserve attention because row filters do not validate whether new records fall inside the user’s boundary.
For teams outside the supported plan or database scope, the practical path is least-privilege credentials per resource, combined with Use, Edit, and Own permission levels to control who can run or modify queries. Where enforcement is available, ongoing review can use audit logs showing which policies applied, which policies changed, and which queries were blocked or narrowed by a row filter. Those records give compliance a policy against which to interpret activity.


