Re: [v9.3] Row-Level Security

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [v9.3] Row-Level Security
Дата
Msg-id 13183.1340897349@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [v9.3] Row-Level Security  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Ответы Re: [v9.3] Row-Level Security  (Florian Pflug <fgp@phlo.org>)
Re: [v9.3] Row-Level Security  (Kohei KaiGai <kaigai@kaigai.gr.jp>)
Список pgsql-hackers
Kohei KaiGai <kaigai@kaigai.gr.jp> writes:
> 2012/6/27 Florian Pflug <fgp@phlo.org>:
>> Hm, what happens if a SECURITY DEFINER functions returns a refcursor?

> My impression is, here is no matter even if SECURITY DEFINER function
> returns refcursor.

I think Florian has a point: it *should* work, but *will* it?

I believe it works today, because the executor only applies permissions
checks during query startup.  So those checks are executed while still
within the SECURITY DEFINER context, and should behave as expected.
Subsequently, the cursor portal is returned to caller and caller can
execute it to completion, no problem.

However, with RLS security-related checks will happen throughout the
execution of the portal.  They might do the wrong thing once the
SECURITY DEFINER function has been exited.

We might need to consider that a portal has a local value of
"current_user", which is kind of a pain, but probably doable.
        regards, tom lane


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: experimental: replace s_lock spinlock code with pthread_mutex on linux
Следующее
От: Florian Pflug
Дата:
Сообщение: Re: [v9.3] Row-Level Security