Replies: 2 comments 3 replies
|
with your current
i'd give whoever runs the inspection a reviewed metadata export, or a service exposing fixed catalog queries without accepting arbitrary sql or handing out its database credentials rls controls table rows, not notification channels or advisory locks. large objects have their own permissions. those execute grants alone don't establish a tenant-data bypass. ownership by your before an authorised lab change, i'd check anything set up to connect as it, its memberships, what it owns or was granted, and its sessions and open transactions in i can't confirm hosted supavisor's disconnect known inspector clients first when retiring existing sessions. terminating their remaining backends can roll back in-flight work |
|
For B13, I would make the verification distinguish a new client connection to Supavisor from a new PostgreSQL backend connection. A pooled backend can outlive the client that originally caused it to be opened. These read-only checks could supplement your existing metadata collection: select rolname, rolcanlogin, rolinherit,
rolsuper, rolbypassrls, rolconnlimit
from pg_roles
where rolname = 'sf_g2_inspector';
select pid, usename, application_name,
backend_start, state, xact_start
from pg_stat_activity
where usename = 'sf_g2_inspector';The second query identifies database sessions; it does not enumerate Supavisor frontend clients. Some activity details also depend on the observer's privileges. After a separately authorised
For any successful connection, this metadata-only query helps establish the effective identities and backend: select session_user, current_user, pg_backend_pid();Compare its PID with PostgreSQL documents Backend timing and activity fields are documented here: This test matrix would distinguish PostgreSQL login denial, existing-session survival, and pooler behaviour without querying application data. It does not establish hosted Supavisor's authentication-cache or invalidation guarantees; that still needs confirmation from Supabase. Given your constraint that no database changes are authorised, I would keep the current work to the read-only checks. Also, a zero-row database-session result alone would not prove that no pooler clients remain connected. |
Uh oh!
There was an error while loading. Please reload this page.
Hello Supabase community,
We are building a multi-tenant SaaS ERP application using Supabase PostgreSQL 17.
During an authorized security audit in a non-production Security Lab, we identified limitations affecting a dedicated SQL-login inspection role (
sf_g2_inspector).We would appreciate technical guidance from Supabase maintainers and experienced PostgreSQL developers.
B11 — PUBLIC EXECUTE privileges
Our audit identified PUBLIC-derived EXECUTE access on PostgreSQL routines including:
lo_create,lo_from_bytea,lo_put,lo_unlink,lowritepg_notifySome routines are owned by
supabase_admin.Questions:
B12 — Strict read-only inspector role
Our custom inspector role has:
An authenticated inspector-login metadata test completed successfully (4/4 sections, exit code 0).
However, its session reported:
transaction_read_only = offdefault_transaction_read_only = offQuestions:
default_transaction_read_only = onsufficient, or can users override it?B13 — Safe retirement of the inspector
The role was created for temporary security inspection and is not required for a confirmed active application feature.
We intend to disable LOGIN rather than immediately drop the role.
Questions:
ALTER ROLE sf_g2_inspector NOLOGINthe recommended reversible retirement method?Constraints
We have already completed metadata, permission-impact, and authenticated inspector smoke-test collections. The remaining question is the safest supported security approach.
We would be grateful for documentation references or guidance from Supabase maintainers.
Thank you,
StitchFlow ERP V2 Development Team
All reactions