Replies: 1 comment
-
As described here I got this running enabling the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey,
Love the library's ease of use, but struggling to adapt it to work with RLS. I'm currently using pgsodium for transparent column encryption in a PostgreSQL database and I want to combine it with row-level security based on the
user_id
. I have a table calledsecrets
with the following schema:I've enabled row-level security on this table like this:
Now, I want to enable transparent column encryption on the
secret
column using pgsodium, but I would like the encryption to be done with a user's unique key. The corresponding key_id should be specific to each user, and I want to store it in another table (e.g.,user_preferences
).Is the best approach to have a separate function such as
create_key_for_user(user_id)
, that is then referenced like this?Would love some guidance on how to best achieve this.
Beta Was this translation helpful? Give feedback.
All reactions