Re: Removing pg_pltemplate and creating "trustable" extensions

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Stephen Frost <sfrost(at)snowman(dot)net>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: Removing pg_pltemplate and creating "trustable" extensions
Date: 2020-01-08 22:49:06
Message-ID: CA+TgmoYB4z5R1E61qtwJHDrogsY+dg4R48TRNFSiaO3JDT=X3g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Jan 7, 2020 at 7:32 PM Stephen Frost <sfrost(at)snowman(dot)net> wrote:
> You raised the point regarding postgres_fdw and a DB owner being able to
> run 'create extension postgres_fdw;' and to then make network
> connections, but that's proven to be invalid because, assuming we make
> postgres_fdw trustable, we will surely make the FDW itself that's
> created be owned by the bootstrap superuser and therefore the DB owner
> *couldn't* create such network connections- at least, now without an
> additional step being taken by a superuser. Further, it's pretty clear
> to everyone *why* that additional step has to be taken for postgres_fdw.

To me, this seems more accidental than the natural fallout of good design.

> Why would a $SCARY_EXTENSION be marked as trusted?

Well, again, my point in using postgres_fdw as an example was not that
it should be untrusted, or that it should be trusted, but that
different people might have different views about that question, and
therefore configurability would be good. I believe the same thing
applies in other cases. For me, this boils down to the view that the
superuser can have arbitrary preferences about what C code they want
to let users run, and they need not justify such views with reference
to anything in particular. Some superuser can decide that they think
hstore is great stuff but bloom is too experimental and isn is a pile
of crap, and that all seems perfectly legitimate to me. And some other
superuser can have a different view and that seems fine, too. I can't
think of any reason why a particular installation should have to
decide between certifying most of contrib and certifying none of it,
with no intermediate options. I guess you see it differently.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2020-01-08 22:56:22 Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.
Previous Message Tom Lane 2020-01-08 22:31:06 Re: src/test/recovery regression failure on bionic