Re: [PATCH] Fix leaky VIEWs for RLS

Поиск
Список
Период
Сортировка
От Stephen Frost
Тема Re: [PATCH] Fix leaky VIEWs for RLS
Дата
Msg-id 20100607030647.GX21875@tamriel.snowman.net
обсуждение исходный текст
Ответ на Re: [PATCH] Fix leaky VIEWs for RLS  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [PATCH] Fix leaky VIEWs for RLS  (KaiGai Kohei <kaigai@ak.jp.nec.com>)
Re: [PATCH] Fix leaky VIEWs for RLS  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
* Robert Haas (robertmhaas@gmail.com) wrote:
> Another idea I had was... would it be safe to trust functions defined
> by the same user who owns the view?  If he's granted access to the
> view and the function to some other user, presumably he doesn't mind
> them being used together?  Or is that too optimistic?

This was more-or-less what I'd been kind of kicking around in my head.
Forget about functions that are defined in the view itself.  Any other
functions, etc, which are attached to the view by the calling user would
be suspect, etc.  Perhaps with the exception of some built-ins that
we've marked as "safe" in some way.

My first thought was to track the "run this as X" information on every
RTE (more-or-less, relations, function calls, etc) and then at least be
able to, hopefully, *detect* situations that might be a problem- eg:
running a function which has "run as Q" against a relation that was
accessed as "run as R" when a filter "run as R" happens later.  This is
all far too hand-wavey, I'm sure, but at least if we could detect it
then we might be able to find a way to deal with it.

Also, perhaps I'm not being paranoid enough, but all this concern over
error cases really doesn't really worry me that much.  The amount of
data one could acquire that way is pretty limited.  It'd be great if we
could deal with that case too, but maybe we could worry about the bigger
issue (at least, as I see it) first.

Just my 2c.
Thanks,
    Stephen

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

Предыдущее
От: Jaime Casanova
Дата:
Сообщение: Re: nvarchar notation accepted?
Следующее
От: Takahiro Itagaki
Дата:
Сообщение: ps display "waiting for max_standby_delay"