Enforces pgsodium Vault for secret storage accessed only via SECURITY DEFINER functions on service_role.
100
100%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Passed
No known issues
SECURITY DEFINER. Every function that reads from vault.decrypted_secrets MUST be SECURITY DEFINER.EXECUTE on secret-accessor functions to anon or authenticated roles. Only service_role MUST have access.RAISE NOTICE, or function return types visible to non-service roles.vault.secrets. All secrets MUST reside in the Vault.postgres and granted exclusively to service_role.vault.create_secret(), not raw INSERT into vault.secrets.supabase.rpc('get_secret', ...) using the service-role key, not the anon key.service_role succeeds, anon is denied.vault.update_secret(secret_id, new_secret). NEVER delete and re-create — this breaks referencing UUIDs.execute_sql tool to maintain audit traceability.