Securing Your PostgreSQL DB with Roles and Privileges
1–10 of 41 posts
Re: Securing Your PostgreSQL DB with Roles and Privileges
#2Re: Securing Your PostgreSQL DB with Roles and Privileges
#3Re: Securing Your PostgreSQL DB with Roles and Privileges
#4Has anyone run into issues with too many roles? Like if you want to use RLS and have a role per application-user, with millions of users.
Re: Securing Your PostgreSQL DB with Roles and Privileges
#5Has anyone run into issues with too many roles? Like if you want to use RLS and have a role per application-user, with millions of users.
Proxying connections for so many different users would be awkward too, though some proxies apparently can take on a different role for the session and revert when client-side disconnects.
Re: Securing Your PostgreSQL DB with Roles and Privileges
#6Has anyone run into issues with too many roles? Like if you want to use RLS and have a role per application-user, with millions of users.
Why have a role per user instead of just defining the row policy with the user directly?
Re: Securing Your PostgreSQL DB with Roles and Privileges
#7I've had to go through this SOC2 certification process as well, and I think a much better approach (with a lot of other benefits) is to use client side encryption to encode sensitive data like PII or PHI (personal health info) before you insert it into the DB. That way it's easy to give all of your developers read-only access to essentially the entire DB for things like debugging support while still maintaining SOC2 and other compliance (e.g. HIPAA).
Not saying there isn't also good use cases for roles and privileges (and it's a lot harder to add client-side encryption after the fact), but using client side encryption/decryption is a better approach to this issue IMO (you get more security benefits, and the compliance benefits really just are a consequence of that).
Re: Securing Your PostgreSQL DB with Roles and Privileges
#8Has anyone run into issues with too many roles? Like if you want to use RLS and have a role per application-user, with millions of users.
Why have a role per user instead of just defining the row policy with the user directly?
Re: Securing Your PostgreSQL DB with Roles and Privileges
#9This means a more complex database level of roles and privileges, which may be it’s own can of worms, but if you have to choose between problems to have, what would you select?
Re: Securing Your PostgreSQL DB with Roles and Privileges
#10Has anyone run into issues with too many roles? Like if you want to use RLS and have a role per application-user, with millions of users.