pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Thomas Kellerer <spam_eater@gmx.net>
Cc: pgsql-general@lists.postgresql.org
Subject: Re: Postgres Enhancement Request
Date: Wed, 20 Mar 2019 10:29:41 -0400
Message-ID: <29580.1553092181@sss.pgh.pa.us> (raw)
In-Reply-To: <67e4608d-5bce-02eb-2909-a624743d1055@gmx.net>
References: <de9a4bb5fc70414caa68330aef5f843b@zuerich.ch>
	<49902029-5742-00ba-85bd-fd0ba0b7d5f3@gmx.net>
	<28648.1553090399@sss.pgh.pa.us>
	<67e4608d-5bce-02eb-2909-a624743d1055@gmx.net>

Thomas Kellerer <spam_eater@gmx.net> writes:
> Tom Lane schrieb am 20.03.2019 um 14:59:
>> No, it wouldn't.  The point of CREATEROLE is to allow user creation
>> and deletion to be done by a role that's less than full superuser.
>> If we changed it like that, then you'd be right back at needing
>> superuser for very routine role creations.  That's *not* an
>> improvement, even if it somehow fit better into the OP's desired
>> security model (which he hasn't explained).

> I didn't take this to be a request to remove the createdb privilege in general, but a request to have finer grained control what kind of privileges the role with createrole can grant to newly created roles (or what it can do in general).

Hmm.  Thinking about it a bit more carefully, it does seem bogus that
a role that has CREATEROLE but not CREATEDB can make a role that has
the latter privilege.  It would be more sensible to have a uniform
rule that "you can't grant a privilege you don't have yourself",
which would mean that the OP's problem could perhaps be solved by
making a role that has CREATEROLE but not CREATEDB.

You could imagine going further and applying the full SQL privilege
model to these things, which would make it possible to have a role
that has CREATEDB (so can make DBs itself) but can't pass that
privilege on to others for lack of grant options on CREATEDB.
But that would be a very much bigger chunk of work, and I'm not sure
I see the payback.

			regards, tom lane




view thread (5+ messages)

Message-ID: <29580.1553092181@sss.pgh.pa.us>
Permalink:  ../29580.1553092181@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/29580.1553092181@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-general@postgresql.org
  Cc: tgl@sss.pgh.pa.us, spam_eater@gmx.net
  Subject: Re: Postgres Enhancement Request
  In-Reply-To: <29580.1553092181@sss.pgh.pa.us>
  References: <de9a4bb5fc70414caa68330aef5f843b@zuerich.ch> <49902029-5742-00ba-85bd-fd0ba0b7d5f3@gmx.net> <28648.1553090399@sss.pgh.pa.us> <67e4608d-5bce-02eb-2909-a624743d1055@gmx.net> <29580.1553092181@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