Dont grant permissions to run functions by default
I dont want anyone to be able to run a function by default. I want to manually grant it, since its security sensitive and that should be explicit.
So in the beginning of my migrations I have:
But when i try to run the function it still works. unless I explicitly revoke the permissions after creation (I dont want this) with:
2 Replies
The proacl is null of newly created functions while I would expect it to be just postgres
Check how they are enabled for future functions/routines in the recommended schema settings (if you used those).
https://supabase.com/docs/guides/api/using-custom-schemas
Otherwise a new schema should not have grants at all to other roles than postgres.