Grant Vault Access to New Role
I'm running into an edge case with vault and would appreciate some advice if folks have worked around this.
- In my application I rely on the supabase vault for a handful of operations.
- Everything works fine in my application as I'm connecting to my db as the primary (
postgres) user and bypassing any security policies that exist on vault. - I have created a separate
readonly_userthat is used for some internal admin work. This user also needs access to some of the information withinvault.decrypted_secrets(maybe this violates the intended design of the vault... but this isn't my concern right now). - Because the vault schema is owned by
supabase_adminuser I'm having trouble granting access to the newreadonly_user(even though the vault docs indicate I should be able to grant such access somehow https://supabase.com/docs/guides/database/vault#:~:text=4b19%2D86e1%2Dfebf3cd40619-,Which,-roles%20should%20have) - I'm running the following query (in supabase UI -->
postgresuser) - the query doesn't throw an error but doesn't add any privileges (I'm assuming because I'm not running this as the
supabase_admin. Confirmed by running:
Vault is a Postgres extension and accompanying Supabase UI that makes it safe and easy to store encrypted secrets.
