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 1pFYvl-0001EW-4n for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 11:06:05 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pFYvj-0004HN-4b for pgsql-hackers@arkaria.postgresql.org; Wed, 11 Jan 2023 11:06:03 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFYvi-0004H8-6l for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 11:06:02 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pFYvf-0003Vy-Rw for pgsql-hackers@lists.postgresql.org; Wed, 11 Jan 2023 11:06:01 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 854D85C0189; Wed, 11 Jan 2023 06:05:58 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Wed, 11 Jan 2023 06:05:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc: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=1673435158; x=1673521558; bh=pU+tYwO4IV 7RRYkHIsvUnv2eARMc2bdj8Iz2f2kAWVc=; b=RCSANtjX3pw75P+Tw89bYdOeyp WYt2I1ilyjhMGh84NZXWYHsC45lw8CqnRfjO7a7/jgtLposcOLI9OWI+NHO2gNTC Ik70fL6cZcOpZMPrl0LqlNMSZT+T3hHnE30def8YKPKjnSeJ3K1+RneQi/X2YB5r jZjPhP3o1+jRf8OWqMagmY9ZU8ERCHcbGrgxng9keOuXxVn510WvkMEtRRIJx+Dg wJQSe/qTfoxRuHEsf4ZcrI7QyWO2d6WzdOPi8pNXr9gWaoS5JZs19CnWLhVgQppB wcfRP30pGyTvTykq75a6uInj8Bnyy3FWeR+gYxm4+q2qGspATx5Ltdwx0RIw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc: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= fm3; t=1673435158; x=1673521558; bh=pU+tYwO4IV7RRYkHIsvUnv2eARMc 2bdj8Iz2f2kAWVc=; b=UXy6Wzo3lXozNPam4X0kej3nm93PiFN9E8FXT1EEw8Os hP72+fcvGlNsvlqP9FPdCKYqpCTUsCgmnpd4Lkn8Hw9C3xjC9hao8eggjLDI7gEv htvUs7pixRyNgWw1tLB7uCR6OWUUGT/mGp6cNWKHo2q5qCUp2mxMhbhbKqGVxGww W+K1QjPWSjxFvN8tHpe+kkorc5gg43+5MWazawCWgERyX02XJPy42M9wCGCifPi2 rnBxdPG7S1SXxW1zGWETTkRXEPf98e9AtpSwPIoZdodD8WV1Kdbjn7Gi4Jbv4hF8 hxHpkvI+gdu8IhMmokiXO+orn4AiWdwA2tZ1IiV46g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrleeggddvudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfg hrlhcuvffnffculdejtddmnecujfgurhepfffhvfevuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeetleeifedufffhhfdtteelgeeg geffhfekueevteeigfduudevudetgfegiedvjeenucevlhhushhtvghrufhiiigvpedtne curfgrrhgrmhepmhgrihhlfhhrohhmpehmihgthhgrvghlsehprghquhhivghrrdighiii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 11 Jan 2023 06:05:56 -0500 (EST) Date: Wed, 11 Jan 2023 20:05:52 +0900 From: Michael Paquier To: Jelte Fennema Cc: "isaac.morland@gmail.com" , "pgsql-hackers@lists.postgresql.org" Subject: Re: [EXTERNAL] Re: [PATCH] Support using "all" for the db user in pg_ident.conf Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="1EhRRPv7h2Tmgg94" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --1EhRRPv7h2Tmgg94 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 11, 2023 at 09:04:56AM +0000, Jelte Fennema wrote: > It's very different. I think easiest is to explain by example: >=20 > If there exist three users on the postgres server: admin, jelte and micha= el >=20 > Then this rule (your suggested rule): > mapname /^(.*)$ \1 >=20 > Is equivalent to: > mapname admin admin > mapname jelte jelte > mapname michael michael >=20 > While with the "all" keyword you can create a rule like this: > mapname admin all >=20 > which is equivalent to: > mapname admin admin > mapname admin jelte > mapname admin michael Thanks for the explanation, I was missing your point. Hmm. On top of my mind, couldn't we also use a regexp for the pg-role rather than just a hardcoded keyword here then, so as it would be possible to allow a mapping to pass for a group of role names? "all" is just a pattern to allow everything, at the end. -- Michael --1EhRRPv7h2Tmgg94 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmO+mBAACgkQnvQgOdby QH1UMhAAlVx+kWuDtXv5WDbPTz6OnCkT/9vDsqecncnTzcvpZ3O6X79f90XYRm05 oGeEc0ipYnfgW95GEgYxNfnrFytwVSVMfP7TdC9wkfwfLYJaDlVn+zDPKxc6rHCH ABmHbtDuuyYPJTR8DQbbIHgJA+NziNnwJVVXX2FcLV1RJywfjR7SfEscJQ0r+WbY Ka9t1fhZeWufCYPXSZcuaIyW/upH6H/j4n9RfRbFU/unMOANLvYj3ngkFo29hUrk f6WdkiNsLOyRk/38UBmbkTULE112pSCM69FCDaF64/SIz84IuW3wWU/jy1VQ0Drv 0ZLxE8elFQ+MThQmDP4I0cuv8UF12f47BNSz2bJX9ipAj2BKOjOHh3IMCQc7QgSF RwfCh21Qd7Jx8MPYLTfvg4eAziwiuu+e6GCk97RkhhQrS4srSIrt8tKrvN6q90dM OE8asbZOr8kpxRAdnKzocnSv47B8nzc1wa4duxrIQV9qv0ab302MtBjxfbNT5mkw aobARe0vp6apxZVijRwIJJIKRvcVdiuvbL6n+eIb8PKkcwgUTLL99cDja933f6J1 Xctj9VwC1D9Y19UmOgDUPE+hxhDteZXNk0Tpo7AfNk1BYbOe3sdxgVj64nnosx5E K9dCIJyJpsxvv/cYXHevbisJ/Tj32S0sW1Gk5CPexx1hFmMcreE= =nz+k -----END PGP SIGNATURE----- --1EhRRPv7h2Tmgg94--