pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Noah Misch <noah@leadboat.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
Subject: Re: Converting contrib SQL functions to new style
Date: Thu, 15 Apr 2021 18:40:04 -0700
Message-ID: <20210416014004.GA1365702@rfd.leadboat.com> (raw)
In-Reply-To: <3567049.1618423436@sss.pgh.pa.us>
References: <3395418.1618352794@sss.pgh.pa.us>
	<20210414020827.GA1232417@rfd.leadboat.com>
	<3441172.1618369873@sss.pgh.pa.us>
	<20210414125811.GB1263822@rfd.leadboat.com>
	<CA+TgmoaF_DKSPRnbkakkOufWMFpOBsA8fwE-mF0fF7aeH20zqg@mail.gmail.com>
	<3489827.1618411777@sss.pgh.pa.us>
	<CA+TgmoYQB1qxb=v9xVi09-f_HRDDqwUwfcuNpsZ2SF-ePpWJcw@mail.gmail.com>
	<3566011.1618422104@sss.pgh.pa.us>
	<CA+TgmobdzZc2UET6z_=e_Uia63Btb3jMX2bVSukWvE21y75o-g@mail.gmail.com>
	<3567049.1618423436@sss.pgh.pa.us>

On Wed, Apr 14, 2021 at 02:03:56PM -0400, Tom Lane wrote:
> Robert Haas <robertmhaas@gmail.com> writes:
> > On Wed, Apr 14, 2021 at 1:41 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> >> Could we hack things so that extension scripts are only allowed to
> >> reference objects created (a) by the system, (b) earlier in the
> >> same script, or (c) owned by one of the declared prerequisite
> >> extensions?  Seems like that might provide a pretty bulletproof
> >> defense against trojan-horse objects, though I'm not sure how much
> >> of a pain it'd be to implement.

Good idea.

> > That doesn't seem like a crazy idea, but the previous idea of having
> > some magic syntax that means "the schema where extension FOO is" seems
> > like it might be easier to implement and more generally useful.
> 
> I think that's definitely useful, but it's not a fix for the
> reference-capture problem unless you care to assume that the other
> extension's schema is free of trojan-horse objects.

I could see using that, perhaps in a non-SQL-language function.  I agree it
solves different problems.





view thread (44+ messages)  latest in thread

Message-ID: <20210416014004.GA1365702@rfd.leadboat.com>
Permalink:  ../20210416014004.GA1365702@rfd.leadboat.com/
Also on:    postgresql.org/message-id/20210416014004.GA1365702@rfd.leadboat.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: noah@leadboat.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@lists.postgresql.org, peter.eisentraut@enterprisedb.com
  Subject: Re: Converting contrib SQL functions to new style
  In-Reply-To: <20210416014004.GA1365702@rfd.leadboat.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox