Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1YxbkX-0006Qi-DM for pgsql-hackers@arkaria.postgresql.org; Wed, 27 May 2015 13:52:01 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1YxbkW-0005JA-SP for pgsql-hackers@arkaria.postgresql.org; Wed, 27 May 2015 13:52:00 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1YxbkU-0005FJ-5A for pgsql-hackers@postgresql.org; Wed, 27 May 2015 13:51:58 +0000 Received: from tamriel.snowman.net ([2001:4830:167b::11]) by makus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1YxbkR-0001Z6-JL for pgsql-hackers@postgresql.org; Wed, 27 May 2015 13:51:56 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 1F0FE5F7A5; Wed, 27 May 2015 09:51:55 -0400 (EDT) Date: Wed, 27 May 2015 09:51:55 -0400 From: Stephen Frost To: Dean Rasheed Cc: Alvaro Herrera , PostgreSQL Hackers Subject: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS) Message-ID: <20150527135154.GI26667@tamriel.snowman.net> References: <20150522180807.GB5885@postgresql.org> <20150526130800.GA26667@tamriel.snowman.net> <20150526144406.GU5885@postgresql.org> <20150527014206.GF26667@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NodNpjfoHgq2lViC" Content-Disposition: inline In-Reply-To: X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-46-generic (x86_64) X-Uptime: 09:45:46 up 68 days, 19:34, 19 users, load average: 0.19, 0.15, 0.13 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --NodNpjfoHgq2lViC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Dean, * Dean Rasheed (dean.a.rasheed@gmail.com) wrote: > On 27 May 2015 at 02:42, Stephen Frost wrote: > > Now, looking at the code, I'm actually failing to see a case where we > > use the RowSecurityPolicy->policy_name.. Perhaps *that's* what we > > should be looking to remove? >=20 > If we add support for restrictive policies, it would be possible, and > I think desirable, to report on which policy was violated. For that, > having the policy name would be handy. We might also arguably decide > to enforce restrictive RLS policies in name order, like check > constraints. Of course none of that means it must be kept now, but it > feels like a useful field to keep nonetheless. I agree that it could be useful, but we really shouldn't have fields in the current code base which are "just in case".. The one exception which comes to mind is if we should keep it for use by extensions. Those operate on an independent cycle from our major releases and would likely find having the name field useful. One thing which now occurs to me, however, is that, while the current coding is fine, using InvalidOid as an indicator for the default-deny policy, in general, does fall over when we consider policies added by extensions. Those policies are necessairly going to need to put InvalidOid into that field, unless they acquire an OID somehow themselves (it doesn't seem reasonable to make that a requirement, though I suppose we could..), and, therefore, perhaps we should add a boolean field which indicates which is the defaultDeny policy anyway and not use that field for that purpose. Thoughts? Thanks! Stephen --NodNpjfoHgq2lViC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJVZcv6AAoJEO1sijiDR2RVlaUP/0QVrKxSbMzWXLgzZrIGcj5H Zzcbwde7pxBMXXe5BOkjciaB/fvFNB4BUAwASSD0P4aLuqnMBLKW362DgVA0bkwr ZtwF3w5lijEvSuLWveNrglASBdIilcMG41r1HLRvEO+ByHkhgQALTM5C7Xvlz6Oy FKSF8FIOo0/HvAQk7RiO9yfbr54uMeGrwAB4U41yolJEWNyKu1uWWJ1r4CRYA1+g viBpQ4yrnW1Ztb1QApr7OyEZe8r9QNMU5/CMFU+S+yH1XXEvCH5iciwkd0ro44sq +zSc0fmrtOHqTbc1jPu2cEqN+ny0Q+Qo/KmHEX1Fsto98M1FYDn9Wjk8NZYns7ZP xcNMgWYozYGdmUjdOCqYBWjpp6K2HyweLNHzh1qAQ3EjiGSoMpe2MWQWGKHcmfaf WWqAnYaniO1gFDuaO2pz2ra4XZtBse6vCpCjj03ecTMqE88Sg+cxjPlcT7fP7Qrd Iqb+9z2jYyvnGCmxmmO31a8t0sARv+9bXwG+MDbRZPAVFLNJu1puOnwXcfgQsdeZ Vd+x9z/aV4MnN8/sBnZP4jIuPVjN1S3HuitDmyIyV0SG8V+CeX77nFEd+CXoUbI4 QmG5ET7+3id94gvZqlx3i4HQhObO7JFaVKRFV0cQ/L5TpPm4+RxwakYfM5KH9BMU xRDYOgxa4v8u4HE+4xUV =2nMu -----END PGP SIGNATURE----- --NodNpjfoHgq2lViC--