From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <rhaas@postgresql.org>
Cc: pgsql-committers@lists.postgresql.org
Subject: Re: pgsql: Add new GUC createrole_self_grant.
Date: Tue, 10 Jan 2023 20:47:10 -0500
Message-ID: <399118.1673401630@sss.pgh.pa.us> (raw)
In-Reply-To: <E1pFIhD-0030IS-UU@gemulon.postgresql.org>
References: <E1pFIhD-0030IS-UU@gemulon.postgresql.org>
Robert Haas <rhaas@postgresql.org> writes:
> Add new GUC createrole_self_grant.
> Can be set to the empty string, or to either or both of "set" or
> "inherit". If set to a non-empty value, a non-superuser who creates
> a role (necessarily by relying up the CREATEROLE privilege) will
> grant that role back to themselves with the specified options.
> This isn't a security feature, because the grant that this feature
> triggers can also be performed explicitly.
[ squint ... ] Are you sure it's not a security *hazard*, though?
It troubles me that we're introducing a command-semantics-altering
GUC at all; we have substantial experience with regretting such
choices. It troubles me more that the semantics change bears on
security matters, and even more that you've made it USERSET.
That at least opens the door to unprivileged user X causing code
belonging to more-privileged user Y to do something other than
what Y expected.
I'll hold my tongue if you're willing to make it SUSET or higher.
regards, tom lane
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, rhaas@postgresql.org
Subject: Re: pgsql: Add new GUC createrole_self_grant.
In-Reply-To: <399118.1673401630@sss.pgh.pa.us>
References: <E1pFIhD-0030IS-UU@gemulon.postgresql.org> <399118.1673401630@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