Re: [RFC] A tackle to the leaky VIEWs for RLS

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, pgsql-hackers(at)postgresql(dot)org, sfrost(at)snowman(dot)net
Subject: Re: [RFC] A tackle to the leaky VIEWs for RLS
Date: 2010-06-02 01:52:06
Message-ID: AANLkTilSzr595fcMPGhMYkQVkPptoR0D_KS_V8xcgRFI@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/6/1 KaiGai Kohei <kaigai(at)ak(dot)jp(dot)nec(dot)com>:
>> Eh, if that's the consensus, it doesn't bother me that much, but it
>> doesn't really answer the question, either: supposing we add an
>> explicit concept of a security view, what should its semantics be?
>
> How about a GUC option to provide the default, like default_with_oids?

Bad idea. We already have enough problems with GUCs that can create
security problems if they're unexpectedly set to the wrong value. We
don't need any more. Anyhow, that's trivia. The real thing we need
to decide here is to design the security mechanism. We can change the
syntax to whatever we want very easily.

Here's another thought. If we're leaning toward explicit syntax to
designate security views (and I do mean IF, since only one person has
signed on to that, even if it is Tom Lane!), then maybe we should
think about ripping out the logic that causes regular views to be
evaluated using the credentials of the view owner rather than the
person selecting from it. A security view would still use that logic,
plus whatever additional stuff we come up with to prevent leakage.
Perhaps this would be viewed as a nasty backward compatibility break,
but the upside is that we'd then be being absolutely clear that a
non-security view isn't and can never be trusted to be a security
barrier. Right now we're shipping something that purports to act as a
barrier but really doesn't.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-06-02 01:54:30 Re: CommitFest FAQ (was: dividing money by money)
Previous Message KaiGai Kohei 2010-06-02 01:16:26 Re: [RFC] A tackle to the leaky VIEWs for RLS