RE: how to remove set_config from all user - Mailing list pgsql-novice

From Stephen Froehlich
Subject RE: how to remove set_config from all user
Date
Msg-id CY1PR0601MB1927BE46890014E735437FF3E5E80@CY1PR0601MB1927.namprd06.prod.outlook.com
Whole thread Raw
In response to RE: how to remove set_config from all user  (Garry Chen <gc92@cornell.edu>)
Responses RE: how to remove set_config from all user
List pgsql-novice

Would table partitioning perhaps be a better way to do this?

 

--Stephen

 

From: Garry Chen [mailto:gc92@cornell.edu]
Sent: Thursday, January 18, 2018 12:49 PM
To: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-novice@lists.postgresql.org
Subject: RE: how to remove set_config from all user

 

Maybe you should explain why you want to do such a thing first.  There isn't really any practice, let alone a best one, to do exactly what you say.  Most system variables are changeable by users.  There are some that can be changed that could be abused but the general thinking is that while doing so maliciously is possible there are lots of others ways a user with access to a database session can cause you grief too and that solutions to this attack vector are social, not technical, in nature.

 

David J.

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

What I try to do is performing a row level security by setting a variable such that RLS function can only return the rows base on the variable.  I have two way to do this one is using SET SESSION AUTHORIZATION the other is set a variable by using set_config.  If I use SET  SESSION AUTHORIZATION it increase administration overhead.  If I use set_config the potential wrong access of RLS is possible.   Do you have any suggestion?

 

Garry

 

pgsql-novice by date:

Previous
From: Garry Chen
Date:
Subject: RE: how to remove set_config from all user
Next
From: Garry Chen
Date:
Subject: RE: how to remove set_config from all user