Re:Securing Your PostgreSQL DB with Roles and Privileges
by pphysch on Saturday August 12, 2023 @02:17PM
(#37102778)
Oh sweet. That approach makes a lot more sense. Access would be through a server-side ORM so users would not be able to run arbitrary SQL. Thanks!
Re:Securing Your PostgreSQL DB with Roles and Privileges
by edmundsauto on Saturday August 12, 2023 @05:06PM
(#37104227)
Supabase has pretty good docs and a nice Ui to play around with this, btw.
You can e.g. something like storing the session "application user" in a configuration variable (SET myapp.rls_user =...). But if the user can influence the SQL and that's part of the threat model, you need to do more, because that could be changed by further SQL.
Another solution is to just have a session level temp table indicating the current application user.