Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6bxv-0006F2-3J for pgsql-general@arkaria.postgresql.org; Wed, 20 Mar 2019 14:13:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1h6bxt-00084n-HN for pgsql-general@arkaria.postgresql.org; Wed, 20 Mar 2019 14:13:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6bxt-0007tq-1S for pgsql-general@lists.postgresql.org; Wed, 20 Mar 2019 14:13:09 +0000 Received: from mout.kundenserver.de ([212.227.126.135]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h6bxp-0006iS-Qj for pgsql-general@lists.postgresql.org; Wed, 20 Mar 2019 14:13:07 +0000 Received: from [10.8.0.101] ([185.40.248.10]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.129]) with ESMTPSA (Nemesis) id 1MSLAe-1hZAMI3iie-00ShEN for ; Wed, 20 Mar 2019 15:13:02 +0100 Subject: Re: Postgres Enhancement Request To: pgsql-general@lists.postgresql.org References: <49902029-5742-00ba-85bd-fd0ba0b7d5f3@gmx.net> <28648.1553090399@sss.pgh.pa.us> From: Thomas Kellerer Message-ID: <67e4608d-5bce-02eb-2909-a624743d1055@gmx.net> Date: Wed, 20 Mar 2019 15:13:01 +0100 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.23) Gecko/20090812 Thunderbird/2.0.0.23 Mnenhy/0.7.6.666 MIME-Version: 1.0 In-Reply-To: <28648.1553090399@sss.pgh.pa.us> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:e42YQOteQrnkX9e13E9mYWbHJFakgwt4D8Qiggsaie5esVL8QKK OK4cq75yailacpoO35bqaRl3M+no9v28wVl0UoPVj2JpQIEHK6nHLv7ZNZedPkq/rbBpbTg 8uyu19aIYjxyhmTm+8FpIqvrFHWFPKS/+GXWkD2WRFUGEGrCEyt9rHMCBTzncLAF8+eqsSb D4TQ0AhBYym7qF83jPI8w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:GeWZ8IOLxPQ=:rwvM4MaqX6MSI370x2G5aM IE5EClA4mTtrGVO2eB9zmnYP39+sn+icJXXtdVOXxcrxpIDXx0jlvY+ojnUDgCDGuw7GW/CDv 7Ei2zYAAdic7f/ooJgCBIJ7RHXw/6VRrbgbydsBTUTAGdTJBzIWBLrsdb4q4AFb3T6gP+r4RF wLCh0ADCKYB3FKpaJBNLtvTamTzX0o9lZJHxyrfOIRnUWZASP28cKPOcPS5RWSKWup/OsibYL 3hHjmsVKpkvhlSdWL/e6jnUx16NfmQe7h+GjgUbc0g4EeU9yDhwZIGOQ5nuiR7reF3vqTF272 GYpNGuoGlkNry8P9DrhzH3A4GJE1InXupntYqfHy5nTpFfnSNmav/JnjtrkyZLnVqsp95oxGk NTYes27jBpMzRKlPCz5zxuucPADmOfkAnvcS3mjtIuXpUVLh6zkcAAvyNOJqOXTBUGAohttzg V+8sHRd0S0t1/NLwcrcAVkCEndMDb41A47UOlS3d7nDA9tJF9fRQPtFI7z+vgHG32F/qCTQQD 6zDgZQVAWAwwD08aayWI7ql4rpnPq7wxjw+FGK7PIJX+u+iPa7AJAunRJDhXBqOyB+LwtDgFr +ggpGAi0p8X9iVqLCNySXF3pMuSA+0KehOf/JZ7OazVKwF6D7cAPRXH+rz0W7ipLUXSl23NFD rh9CyVUkV8/WKKmjZn9MwgfJE2hWEgqBYBx/z+hzgEekbA8jctjdedcHaiBid/CuQsJm/8Uor lt2pkCS5QlZfZGK2+MLL2JAbYFDph4F3C3+fdvE1JCe4OMSLdJVT0An+G7k= List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Tom Lane schrieb am 20.03.2019 um 14:59: >>> Please prevent users with CREATEROLE to create roles having CREATEDB (analogous SUPERUSER and REPLICATION). > >> I agree that would be a welcome enhancement. > > 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). Maybe if "createrole" was a regular privilege (like "create table"), then something like this would be possible: create role user_admin; grant create role to user_admin; Thomas