Replies: 2 comments 2 replies
|
for app users using database login roles can read and change queued requests. vault encrypts the stored secret, but before production, i'd check your exposed schemas and view/function definitions and grants, including anything returning decrypted vault secrets. keep database logins limited to services you trust with those credentials, and authenticate the scheduled caller in the edge function there's no supported way to change the queue's grants or rls per project. if some database users mustn't have the credential, i'd have an external scheduler call the edge function directly, with its credential stored outside postgres and checked by the function |
|
Adding sources and one design change to the answer above.
Before production:
Design change: the docs example queues your project secret key, which bypasses RLS. Queue a credential that can only trigger this one job instead: a random value ( |
Uh oh!
There was an error while loading. Please reload this page.
Hey! I'm building a SaaS using Supabase, and I'm trying to understand a security concern with
pg_net.I'm using
pg_cron+pg_net+ Vault to call a Supabase Edge Function on a schedule. I read thatpg_net's request queue can contain HTTP headers, and that changing its permissions isn't supported on hosted Supabase.My main question is: could a normal user of my app access these queued requests or secrets, or is this mainly a concern for people with direct database access?
Also, what's the recommended way to secure this setup before going to production?
Thanks!
All reactions