Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxBcg-0000fC-Es for pgsql-general@arkaria.postgresql.org; Mon, 21 Nov 2022 18:34:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oxBce-0005LG-TW for pgsql-general@arkaria.postgresql.org; Mon, 21 Nov 2022 18:34:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxBcd-0005Kv-S5 for pgsql-general@lists.postgresql.org; Mon, 21 Nov 2022 18:34:24 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oxBca-0008VS-GF for pgsql-general@lists.postgresql.org; Mon, 21 Nov 2022 18:34:23 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 909235C0144; Mon, 21 Nov 2022 13:34:18 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 21 Nov 2022 13:34:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1669055658; x= 1669142058; bh=qGhKt0x/Sa4HiuM2HRrB9aUT4feUZuD4dNEDT7a+2fc=; b=v 8rDteqokg2ik5EhNwxBw+GM41T3xchnYnhdwnj87d8jFL+Stw9JyKBb4yJCaRZgC qwL90I10vl67CXKatzk7BzNrLmR/X+30+jMe85cp1BULtTINjf4aqL9wCNMt/5Lj GVRogbANCagDxeu3+LSiZfsqufPQikpi6Nk1f671mseC4XyhTGMFU4m2DjB3eSeN iZu4I9S+WtXptdV9cZox5mXCylElhnFy6eZAKgQBVXpaNU3vPRfnVSOQtIHbHNTY YKw37O9caYD9efchNeRX5YqH7EQuLra56pceDjJ7cXOpleJZGTpDx2qnyAqjHZZT q3dGL/9wUnMWU3agLGm4Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669055658; x= 1669142058; bh=qGhKt0x/Sa4HiuM2HRrB9aUT4feUZuD4dNEDT7a+2fc=; b=u 6E5GwY8j7fOONHaT1Q5KZiwEKswOx1JuDxohHK9PsuSfYQsN5+T8nvkaYNR5wZHO WUi1lmhgOq5wV/luERMXlrfZNOv8weO67VtLkOyQ2FRL7lmp2iK5DwxFv2vf+tER cXeataglv6kfB2GqIlbgecIsK5IIeAy31JHAEexhydqlCPmgR5mUdzDliIuyjUvE ubGqY8yLQmsCzfW4ooue4jQUUGiwi4nwejxNEpYEMAiOiTDwOxaZ3QLXRzZw7pX4 Fxlz2At0sNX8B07wOruH63w9T8UT/8B0Zcb/YVuSRRYYE9yDy8kPdDgqb+c13b4m wuFk7ySXctqmhQEyrWXxg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedrheeigdduudefucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvvehfhffkffgfgggjtgfgsehtkeertddtfeejnecuhfhrohhmpeetughr ihgrnhcumfhlrghvvghruceorggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtg homheqnecuggftrfgrthhtvghrnhepgefhheehteelgfffkedukeelkeehffeiuddttdfg jeffudfggeefvdejjeefuedunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpe hmrghilhhfrhhomheprggurhhirghnrdhklhgrvhgvrhesrghklhgrvhgvrhdrtghomh X-ME-Proxy: Feedback-ID: i76984098:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Nov 2022 13:34:17 -0500 (EST) Subject: Re: Seeking practice recommendation: is there ever a use case to have two or more superusers? To: Bryn Llewellyn , david.g.johnston@gmail.com Cc: pgsql-general list References: <290EF7B8-D150-4AE1-8FFE-A38912CD1A8B@yugabyte.com> <20221118200835.sgva7b6wgg4w7py7@hjp.at> <0B653B38-2D7D-45D6-B87F-DD07200EA676@yugabyte.com> <20221118221305.ku2ibj2bowahzn2y@hjp.at> <11d24370-18c6-f736-85db-e9ae1814bb64@gmail.com> <20221119085225.uivmxue2gef5utv2@hjp.at> <40623F5C-5B99-4AFD-9AA6-ABFFE6B17606@yugabyte.com> <6f5bb172-eea8-3456-60ab-0dd332b89d56@aklaver.com> <4380c01d-a182-8c13-f4e2-278ba8a3cf01@aklaver.com> <9B82247D-3F56-47C1-A918-18E2E8DEDFAB@yugabyte.com> From: Adrian Klaver Message-ID: Date: Mon, 21 Nov 2022 10:34:17 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <9B82247D-3F56-47C1-A918-18E2E8DEDFAB@yugabyte.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 11/21/22 9:40 AM, Bryn Llewellyn wrote: >> adrian.klaver@aklaver.com wrote: > Then there’s this (from the doc): > >> It is good practice to create a role that has the CREATEDB and CREATEROLE privileges, but is not a superuser, and then use this role for all routine management of databases and roles. This approach avoids the dangers of operating as a superuser for tasks that do not really require it. > > > That, too, reads like a recommendation that intends to inform a security policy. But, I suppose, one could argue that saying something “is good practice” is very different from making a recommendation. > > Consider this wording. It also uses “good practice”. > > « > It is good practice to limit the number of superuser roles that exist in a cluster to exactly one: the inevitable bootstrap superuser. This recognizes the fact that, once the initial configuration of a cluster has been done immediately after its creation (which configuration is done while still in self-imposed single-user mode), there are then very few, and infrequent, tasks that require the power of the superuser role. > » > > Nobody supports it! I went back through the thread and don't anywhere when you made the above statement, correct me if I am wrong. In that case there was nothing to support or not support until now. What people where responding to the title of the thread: "Seeking practice recommendation: is there ever a use case to have two or more superusers?" That is a different ask. > > I’m puzzled why the good practice statement about a role with the CREATEDB and CREATEROLE attributes earns a place in the doc while nobody at all is prepared to make a practice statement about how many superusers is good. I’d like very much to understand the critical parts that I’m missing of the essential mental model in this general space. > > -- Adrian Klaver adrian.klaver@aklaver.com