News for hackers. Stuff that matters.
Re:Securing Your PostgreSQL DB with Roles and Privileges by programmarchy on Saturday August 12, 2023 @12:18PM (#37101701)
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 by hn_throwaway_99 on Saturday August 12, 2023 @12:24PM (#37101766)
In Postgres a "role" really is equivalent to a user. A user in Postgres is just a role with the ability to log in.
Re:Securing Your PostgreSQL DB with Roles and Privileges by programmarchy on Saturday August 12, 2023 @06:10PM (#37104678)
Yes but I’m presuming the person I was responding to meant “role” in the context you’re talking about, but by “user” they meant a row in some “users” or “customers” table corresponding to their application. Questioning the need to “create role” for every application user.
Re:Securing Your PostgreSQL DB with Roles and Privileges by pphysch on Saturday August 12, 2023 @12:21PM (#37101740)
How does that work? With per "user" roles, I can SET ROLE "user-1000" and enter their authz context without changing any of my queries. How would this work without per-user roles?