pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: Dean Rasheed <dean.a.rasheed@gmail.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: PostgreSQL Hackers <pgsql-hackers@postgresql.org>
Subject: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)
Date: Wed, 27 May 2015 09:51:55 -0400
Message-ID: <20150527135154.GI26667@tamriel.snowman.net> (raw)
In-Reply-To: <CAEZATCWK=YjbKF3mGPW=astWK7pmNWdcU26_RGszgkRXsDNV4Q@mail.gmail.com>
References: <E1XV0JP-0003h6-O6@gemulon.postgresql.org>
	<20150522180807.GB5885@postgresql.org>
	<20150526130800.GA26667@tamriel.snowman.net>
	<20150526144406.GU5885@postgresql.org>
	<20150527014206.GF26667@tamriel.snowman.net>
	<CAEZATCWK=YjbKF3mGPW=astWK7pmNWdcU26_RGszgkRXsDNV4Q@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

Dean,

* Dean Rasheed (dean.a.rasheed@gmail.com) wrote:
> On 27 May 2015 at 02:42, Stephen Frost <sfrost@snowman.net> 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?
> 
> 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

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (19+ messages)  latest in thread

Message-ID: <20150527135154.GI26667@tamriel.snowman.net>
Permalink:  ../20150527135154.GI26667@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20150527135154.GI26667@tamriel.snowman.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: sfrost@snowman.net, dean.a.rasheed@gmail.com, alvherre@2ndquadrant.com, pgsql-hackers@postgresql.org
  Subject: Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)
  In-Reply-To: <20150527135154.GI26667@tamriel.snowman.net>
  References: <E1XV0JP-0003h6-O6@gemulon.postgresql.org> <20150522180807.GB5885@postgresql.org> <20150526130800.GA26667@tamriel.snowman.net> <20150526144406.GU5885@postgresql.org> <20150527014206.GF26667@tamriel.snowman.net> <CAEZATCWK=YjbKF3mGPW=astWK7pmNWdcU26_RGszgkRXsDNV4Q@mail.gmail.com> <20150527135154.GI26667@tamriel.snowman.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox