Re: Running untrusted sql safely? - Mailing list pgsql-general

From Tino Wildenhain
Subject Re: Running untrusted sql safely?
Date
Msg-id 49991163.3060408@wildenhain.de
Whole thread Raw
In response to Re: Running untrusted sql safely?  (Scott Marlowe <scott.marlowe@gmail.com>)
List 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

Attachment

pgsql-general by date:

Previous
From: Eus
Date:
Subject: Re: Check for an empty result
Next
From: Scara Maccai
Date:
Subject: left outer join without rows from "left" table