pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: pgsql: Add new GUC createrole_self_grant.
Date: Tue, 10 Jan 2023 21:40:07 -0500
Message-ID: <404209.1673404807@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoZdOYxkPOWHD+3gG=DDccg9cDVYS8EtpO9EY85NNMaNtg@mail.gmail.com>
References: <E1pFIhD-0030IS-UU@gemulon.postgresql.org>
	<399118.1673401630@sss.pgh.pa.us>
	<CA+TgmoZdOYxkPOWHD+3gG=DDccg9cDVYS8EtpO9EY85NNMaNtg@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> On Tue, Jan 10, 2023 at 8:47 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> [ squint ... ]  Are you sure it's not a security *hazard*, though?

> I think you have to squint pretty hard to find a security hazard here.

Maybe, but I'd be sad if somebody manages to find one after this is
out in the wild.

> That said, in my original design, this was controlled via a different
> mechanism which was superuser-only. I was informed that made no sense,
> so I changed it. Now here we are.

Yeah.  I concur that a SUSET GUC isn't much fun for a non-superuser
CREATEROLE holder who might wish to adjust the default behavior they get.
I also concur that it seems a bit far-fetched that a CREATEROLE holder
might create a SECURITY DEFINER function that would do something that
would be affected by this setting.  Still, we have no field experience
with how these mechanisms will actually be used, so I'm worried.

The scenario I'm worried about could be closed, mostly, if we were willing
to invent an intermediate GUC privilege level "can be set interactively
but only by CREATEROLE holders" ("PGC_CRSET"?).  But that's an awful lot
of infrastructure to add for one GUC.  Are there any other GUCs where
that'd be a more useful choice than any we have now?

			regards, tom lane





view thread (20+ messages)  latest in thread

Message-ID: <404209.1673404807@sss.pgh.pa.us>
Permalink:  ../404209.1673404807@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/404209.1673404807@sss.pgh.pa.us

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, pgsql-hackers@postgresql.org
  Subject: Re: pgsql: Add new GUC createrole_self_grant.
  In-Reply-To: <404209.1673404807@sss.pgh.pa.us>
  References: <E1pFIhD-0030IS-UU@gemulon.postgresql.org> <399118.1673401630@sss.pgh.pa.us> <CA+TgmoZdOYxkPOWHD+3gG=DDccg9cDVYS8EtpO9EY85NNMaNtg@mail.gmail.com> <404209.1673404807@sss.pgh.pa.us>

* 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