Re: [RFC] Interface of Row Level Security

Поиск
Список
Период
Сортировка
Искать
От
Alastair Turner
Тема
Re: [RFC] Interface of Row Level Security
Дата
в 16:21:31
Msg-id
CAFgq2fVRtWMenCamGmoPmx2gy8aLomeLR1B853v4KzE33qVM9A@mail.gmail.com
Ответ на
Список
Дерево обсуждения
[RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Tom Lane <tgl@sss.pgh.pa.us>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Yeb Havinga <yebhavinga@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Tom Lane <tgl@sss.pgh.pa.us>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Tom Lane <tgl@sss.pgh.pa.us>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Alastair Turner <bell@ctrlf5.co.za>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Robert Haas <robertmhaas@gmail.com>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Noah Misch <noah@leadboat.com>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
Re: [RFC] Interface of Row Level Security Florian Pflug <fgp@phlo.org>
Re: [RFC] Interface of Row Level Security Alastair Turner <bell@ctrlf5.co.za>
Re: [RFC] Interface of Row Level Security Kohei KaiGai <kaigai@kaigai.gr.jp>
On Wed, May 23, 2012 at 5:09 PM, Tom Lane  wrote:
> Kohei KaiGai  writes:
>> Let me have a discussion to get preferable interface for row-level security.
>> My planned feature will perform to append additional conditions to WHERE
>> clause implicitly, to restrict tuples being visible for the current user.
>> For example, when row-level policy "uname = getpgusername()" is configured
>> on the table T1, the following query:
>>     select * from T1 where X > 20;
>> should be rewritten to:
>>     select * from T1 where (X > 20) AND (uname = getpgusername());
>
> Hm.  Simple and fairly noninvasive, but ... would this not be subject to
> the same sorts of information-leak hazards that were addressed in the
> "security views" feature?  That is, I see no guarantee that the RLS
> condition will be evaluated before any conditions supplied by the user.
> So it seems easy to get information out of rows the RLS policy is
> supposed to prevent access to.  It would be far more secure to just
> use a security view to apply the RLS condition.

Since adding a condition to the where clause is a relatively simple
operation (compared to the full potential scope of a view) could the
RLS rewrite of the query create a CTE with the additional condition[s]
rather than adding condition[s] to the user-supplied query? This would
provide the forced ordering of the evaluating the conditions, thereby
avoiding many of the potential points of leakage.

Bell.

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
Сообщение: adding and upgrading metapages
От: Peter Eisentraut
Дата:
FAQ