© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•3y ago•
2 replies
Jeremy Evans

Can't access Vault secrets from Edge Functions without making them publicly accessible

Hi there!

I'm trying to make it so that decrypted secrets in Supabase Vault are available from Edge Functions (acting as the 'service_role' role) but not to users.

I've tried creating a database function, which works except that
security definer
security definer
makes it publicly accessible and
security invoker
security invoker
makes it not even accessible to the
service_role
service_role
user in the backend.

I've tries creating a view, but this isn't accessible to any users (even
service_role
service_role
) and Supabase doesn't let me edit RLS on either the vault or the view.

Where am I going wrong here? Thanks!
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Vault - Creating secrets in edge functions
SupabaseSSupabase / help-and-questions
6mo ago
How to keep edge function not publicly accessible ?
SupabaseSSupabase / help-and-questions
14mo ago
Can't deploy edge functions
SupabaseSSupabase / help-and-questions
3y ago
Edge Functions Access Issue
SupabaseSSupabase / help-and-questions
8mo ago