How to Lock Down Retool Permissions and Row-Level Access
Default Retool apps are open to everyone in your organisation. A table bound to SELECT * FROM customers shows every customer to the intern who just joined and the contractor who left last month but still has a seat.
Fixing that is not one setting. It’s four layers: who can open the app, which database credential the query uses, what rows the query returns, and what the user can do once the data is on screen.
Who can open which Retool app?
Access lives on groups, and users belong to groups. Enterprise plans get custom groups; lower tiers have fixed groups (All Users, editors, admin).
To restrict a single app:
- Open the app, hit Share in the top right.
- Under Specific groups, add only the group that needs it.
- Verify by impersonating. Retool has a Preview as user option in the share dialog — use it. Access bugs are always discovered by the wrong person.
Environment access is a separate axis. Your production environment can be restricted to an Editors group while staging stays open. Most teams set this up once and never revisit, then wonder why a new hire’s app is pointed at live data.
How do resource credentials and per-user auth differ?
Two models, and choosing wrong is the most expensive mistake in Retool security.
Shared credentials: the resource stores one database user; every Retool user queries as that user. Simple. The database logs show one identity, so you can’t tell who ran what. Fine for internal metrics, wrong for customer data.
Per-user authentication: each Retool user supplies their own database credentials, or you use OAuth/SSO with a mapped database role. The database sees the real user and your existing grants apply. This is the option to pick if your database already has row-level security or column grants.
Setting up per-user auth means editing the resource, choosing Authentication: per user, and toggling the environments where it applies. Users then connect on first use. Expect complaints for a week — that’s the cost of auditable access.
A middle path many teams use: shared credential with a restricted database role. Grant SELECT on the specific views the app needs, nothing more. No pg_read_all_data, no owner role. Retool doesn’t need write access to users just because an app displays emails.
How do you enforce row-level access?
The database does it best. Postgres row-level security:
ALTER TABLE customers ENABLE ROW LEVEL SECURITY;
CREATE POLICY support_sees_own_region ON customers
FOR SELECT USING (region = current_setting('app.region', true));
Then in Retool, set the session variable before each query with a second statement, or use per-user auth with roles that already have the policy. If you’re on a shared credential, RLS won’t help — one connection, one identity.
The in-Retool alternative is filtering in the query with a user attribute:
SELECT * FROM customers
WHERE {{ current_user.groups.includes('admin') }}
OR region = {{ current_user.metadata.region }}
This works, but it’s application-level enforcement. Anyone with editor rights on the app can delete the WHERE clause. If that’s a risk, restrict who can edit: app editors are powerful in Retool in ways not obvious from the UI.
Custom attributes are set on the user object under Settings → Users → Advanced. Keep them accurate — they’re the input to every filter.
What stops an editor from breaking production?
Turn on Source control (GitLab/GitHub integration) so changes go through a branch. Without it, an editor’s experiment is live the moment they hit save, and there’s no diff to review.
Then use protected environments: mark production as protected so publishing requires approval. On Business tier, you can restrict resource access per environment so staging queries can’t accidentally point at the production database.
Two more guards worth setting:
- Query timeout. Set it on the resource (default is 120 seconds on some connectors). A runaway
JOINon a shared credential can saturate the primary database for everyone. - Rate limits on write queries. Retool doesn’t do this natively; wrap destructive queries in a workflow that checks a counter. Sounds paranoid until a support rep clicks “Refund” 12 times because the button didn’t respond.
What about SSO, audit logs and compliance?
SSO (SAML/OIDC) and audit logs are Business tier, $50/user/month. Below that, Retool gives you email/password and Google login, no per-query audit trail.
If audit is a hard requirement and Business pricing is too steep, self-hosted Retool is an option: Community edition is free for unlimited users, but you run Postgres, the container and the upgrades. Many teams under 20 users find the self-hosted path cheaper than $50/user.
Self-hosting does mean your app now depends on your own infrastructure. Plan the upgrade cadence before committing.
Who should not bother with Retool hardening?
A five-person startup where everyone already has production database access. The app adds no new exposure, and spending a week on RLS buys nothing.
Once there’s a contractor, a departing employee, or a support team that should see only tickets and not revenue, the four layers above become mandatory. The moment a Retool app becomes the thin layer between “can’t see customer data” and “can”, access control stops being optional.
Quick Summary
- Restrict app access by group in the Share dialog and always verify with Preview as user.
- Shared credentials hide identity in the database — use per-user auth if you need attribution.
- Enforce row-level access in the database with RLS; in-app
WHEREfilters are bypassable by editors. - Enable source control and protected environments so saves can’t hit production unreviewed.
- SSO and audit logs are Business tier ($50/user); self-hosted Community is an alternative for small teams.
- Restrict the database role to specific views — an app that only displays emails still gets write access by default.</}
