Re: dblink connection security

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Magnus Hagander <magnus(at)hagander(dot)net>, Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, pgsql-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: dblink connection security
Date: 2007-07-09 04:16:36
Message-ID: 20070709041636.GT4887@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

* Joe Conway (mail(at)joeconway(dot)com) wrote:
> Stephen Frost wrote:
>> No, it doesn't... Said arbitrary function in y, in untrusted language
>> z, could be perfectly safe for users to call.
> ^^^^^
> *Could* be. But we just said that the admin was not interested in reading
> the documentation, and has no idea if it *is* safe. And, it very well might
> not be safe. We have no way to know in advance because the language is
> untrusted.

If it's not safe then it shouldn't be enabled by default. That's pretty
much the point. If something is known to be unsafe for users to have
access to then it should be disabled by default.

>> Being written in an untrusted language has got next to nothing to do with
>> the security
>> implications of a particular function. It depends entirely on what the
>> function is *doing*, not what language it's written in.
>
> Sure it matters. A function written in a trusted language is known to be
> safe, a priori. A function written in an untrusted language has no such
> guarantees, and therefore has to be assumed unsafe unless carefully proved
> otherwise.

I see.. So all the functions in untrusted languages that come with PG
initially should be checked over by every sysadmin when installing PG
every time... And the same for PostGIS, and all of the PL's that use
untrusted languages?

On my pretty modest install that's 2,206 functions. For some reason I
see something of a difference between 'generate_series' and 'dblink' in
terms of security and which one I'm comfortable having enabled by
default and which one I'm not.

Thanks,

Stephen

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Gregory Stark 2007-07-09 04:22:19 Re: dblink connection security
Previous Message Joe Conway 2007-07-09 04:07:34 Re: dblink connection security