Re: [v9.4] row level security

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [v9.4] row level security
Дата
Msg-id CA+TgmobRiYj8NCb4Lra5-MzvjnVKz6OrYSsn-Z04YJGsmiQAsg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [v9.4] row level security  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [v9.4] row level security  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: [v9.4] row level security  (Kevin Grittner <kgrittn@ymail.com>)
Список pgsql-hackers
On Wed, Sep 4, 2013 at 10:50 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
>> On Wed, Sep 4, 2013 at 10:45 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> Well, the security-barrier view stuff did not present itself as a 100%
>>> solution.  But perhaps more to the point, it was conceptually simple to
>>> implement, ie don't flatten views if they have this bit set, and don't
>>> push down quals into such sub-selects unless they're marked leakproof.
>
>> Right.  IMHO, this new feature should be similarly simple: when an
>> unprivileged user references a table, treat that as a reference to a
>> leakproof view over the table, with the RLS qual injected into the
>> view.
>
> And for insert/update/delete, we do what exactly?

The same mechanism will prevent UPDATE and DELETE from seeing any rows
the user shouldn't be able to touch.

Simon and Greg are arguing that when an INSERT or UPDATE happens, we
ought to also check that the NEW row matches the RLS qual.  I don't
find that to be terribly important because you can accomplish the same
thing with a per-row trigger today; and I also don't think everyone
will want that behavior.  Some people will, I'm pretty sure, want to
let users "give away" rows, either unconditionally or subject to
defined restrictions.  Perhaps it's worth having, but it's a separate
feature, IMHO.

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



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: 9.4 regression
Следующее
От: Andres Freund
Дата:
Сообщение: Re: 9.4 regression