Replies: 2 comments
|
Short version: there's no endpoint or catalog view that exposes the effective config of the hosted PostgREST process. Both settings can come from env vars ( Where the values can come from (config docs):
You've already ruled out the role-level path, so what's left is env vars and a pre-config function. How they show up at runtime (from the PostgREST source):
Both show up in -- 1) PostgREST's config-loading query; a pre-config function would appear as "JOIN <func>() _ ON TRUE"
select userid::regrole, calls, query
from extensions.pg_stat_statements
where query ilike '%kv_settings%';
-- 2) Candidate pre-request calls: bare "select schema.func()" run as API roles
select userid::regrole, calls, query
from extensions.pg_stat_statements
where userid::regrole::text in ('anon', 'authenticated', 'service_role')
and query ~* '^\s*select\s+[a-z0-9_."]+\s*\(\s*\)\s*$'
order by calls desc;How to read the results:
Caveats:
For an authoritative answer about the platform defaults, a support ticket is the definitive route, but the above gives you evidence from the database itself. |
|
Hi Chris, Thank you very much for taking the time to answer my question in such detail. Your explanation was especially helpful in clarifying how I tested the approach you suggested on my staging project, and it gave useful additional evidence for our security assessment. I really appreciate the precision of your response and the references to the PostgREST source code. Thanks again for your help. |
Uh oh!
There was an error while loading. Please reload this page.
Hi,
I am performing a read-only security review of a managed Supabase staging project before enabling a server-side pg_cron + pg_net scheduler.
I am trying to determine the effective managed PostgREST configuration for:
I do not need or want to change any configuration.
What we have already verified:
anonymous and authenticated Data API probes against schema "net" return:
406 / PGRST106 / Invalid schema: net
the authenticator role has no pgrst.* role-level override
no application-accessible RPC, view, trigger, or known database bridge to net.* has been identified
GraphQL has not provided a route to net.*
The remaining question is only:
How can a Supabase-hosted project owner verify whether the effective managed PostgREST process has db-pre-config or, if either is configured, obtain only the schema-qualified function name(s)?
If these values are not directly visible to users, is there a supported way to confirm either:
db-pre-config: unset
db-pre-request: unset
or, if configured, obtain only the schema-qualified function names?
I am not asking for credentials, JWTs, secrets, database passwords, or internal infrastructure details.
This is a read-only verification question. No configuration changes are desired.
Thanks.
All reactions