Re: Running untrusted sql safely?

Поиск
Список
Период
Сортировка
От Tino Wildenhain
Тема Re: Running untrusted sql safely?
Дата
Msg-id 49991163.3060408@wildenhain.de
обсуждение исходный текст
Ответ на Re: Running untrusted sql safely?  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
Scott Marlowe wrote:
> On Sun, Feb 15, 2009 at 4:39 PM, Christophe <xof@thebuild.com> wrote:
>> On Feb 15, 2009, at 2:47 PM, Stuart McGraw wrote:
>>
>>> I just hoping for some confirmation that the permissions based approach
>>> did not have some holes in it that I am
>>> not seeing.
>> Another possibility is to create a set of functions that contain the query
>> operations you would like to allow, isolate those in a schema, and make that
>> schema the only thing accessible to the (semi-)trusted users.
>
> I can see that getting complex real fast in a big operation, but for a
> database that runs a few big reporting queries every day or sits on an
> intranet would be workable.
...

And to actually answer Christophes question: yes, granting only
SELECT to a few tables is enough to prevent them doing anything else
in the database. But watch out for the default permissions on the
public schema of all the databases the users are able to connect to.

Regards
Tino

Вложения

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

Предыдущее
От: Eus
Дата:
Сообщение: Re: Check for an empty result
Следующее
От: Scara Maccai
Дата:
Сообщение: left outer join without rows from "left" table