How to access secrets inside triggers in local Docker
I have a simple trigger (with security definer) which calls a function (with security definer) which then uses the recommended way to get a decrypted secret from the vault.
This works in my client DBeaver when connected as
my function:
When I INSERT from my DB client I can see the trigger logging:
But from postgrest I can see the role is different:
I'm using the basic docker/compose setup with latest image and SDK
It doesnt seem to be an issue in my production/cloud/supabase version of my project
This works in my client DBeaver when connected as
postgres but when I try via my React app (which has role authenticated ) it gives a decryption error:my function:
When I INSERT from my DB client I can see the trigger logging:
But from postgrest I can see the role is different:
I'm using the basic docker/compose setup with latest image and SDK
It doesnt seem to be an issue in my production/cloud/supabase version of my project