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 1oKaue-0006vW-QD for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Aug 2022 07:41:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oKaub-0003cR-Nc for pgsql-hackers@arkaria.postgresql.org; Sun, 07 Aug 2022 07:41:25 +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 1oKaua-0003cH-99 for pgsql-hackers@lists.postgresql.org; Sun, 07 Aug 2022 07:41:25 +0000 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1oKauX-0003qz-Bk for pgsql-hackers@postgresql.org; Sun, 07 Aug 2022 07:41:23 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 9025A320084E; Sun, 7 Aug 2022 03:41:18 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Sun, 07 Aug 2022 03:41:19 -0400 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=fm1; t=1659858078; x=1659944478; bh=1vRJZCwxec Cgu15VbjIYt9Ny1+lMn4psjuTAkUXe5dU=; b=1TvJjWjFhVpWPj30EwXKA4nkJZ uqy7wwYhrr2pMPtkX4MCnPAX8MKWozR47ET8sAYUNLa9bPSwkmk2rcbal7XKYo/u 0TWOK0Th8mqiBpaDG6eo/ZWFddIJt0IVhoptQNvZT1Vdfymu8NBICIkizqowDkEA 9DIczRAXMFH3X1GzizpU0IBEGcZf3CgtG+HxJS99Rd4vAAoMS1nb0jRdzH7weMcc UZpSEVnd3hOkXwP9nbTgVtLJqh9caWvKLT//yr9hrzmT3YZhxuZNBgkwerII5QhM eWaCrhffjQ1rmB/B8wRs6tmhZemWLB7NKLFxoyUnEECBtwBJD/eAOO+IGghQ== 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= fm1; t=1659858078; x=1659944478; bh=1vRJZCwxecCgu15VbjIYt9Ny1+lM n4psjuTAkUXe5dU=; b=zaaukw2HHb/SC8mnRf283QLU/2PuB7HXnJQczsWTt8LW 9ShRyeATTURA7YFltq6yrKNq7VdIzjv7vcXKy8t7a4LMhgD3e6QrLKcfVmZcHXCR 7PD35eEBBWn4Qkk5FpAgetsTk23LJdnMk1VViFL5p9xmF5jO5XWhsbgk9yAiZmAG lF4ItbL2814FVwukaKxYPTgylIJUbwSd5840MaTM26ElPvVJunHG9dRn8HvHJfKt Qz62o5ANLtJwjVypL31GKoCgGpySRre+5JotMJIGGHoRRWUhMjFsVpKt/pgcFH1O gtf41BVoR6ErrEVXrR+bGoQtZX6wsK44G6NFK/fyew== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrvdefhedgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 7 Aug 2022 03:41:14 -0400 (EDT) Date: Sun, 7 Aug 2022 16:41:08 +0900 From: Michael Paquier To: Joe Conway Cc: "Drouvot, Bertrand" , Jacob Champion , Robert Haas , Tom Lane , "sfrost@snowman.net" , "rjuju123@gmail.com" , "pgsql-hackers@postgresql.org" , "andres@anarazel.de" Subject: Re: [PATCH] Expose port->authn_id to extensions and triggers Message-ID: References: <3b678314-054a-6119-b373-4574067f404e@timescale.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="btWopmrdTz9ux/r+" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --btWopmrdTz9ux/r+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Aug 06, 2022 at 10:59:26AM -0400, Joe Conway wrote: > I am not sure how else we should interpret SYSTEM_USER -- if it isn't > port->authn_id what else would you propose it should be? What you say sounds rather right, but I was wondering mainly what Oracle and SQL server report when it comes to other authentication methods like SSPI or a cert, where we don't use a user name but some data dependent on the auth method. And I have no experience with these. Anyway, I was looking at Bertrand's patch, and I can see that it is doing nothing to move away the connection information that we have in Port away to a different structure passed down to the parallel workers, which is what I understand is a cleanup worth on its own based on the discussion of this thread. Hence, I still see a good argument for the introduction of ClientConnectionInfo that gets passed down to the workers. Based on that, I think that we'd better finish v11-0002 (only ClientConnectionInfo, no SQL interface) as a first step to build for the next ones, with authn being the first piece of information given to the workers. With a separate structure, the auth_method can also be a second member in ClientConnectionInfo, completing what would be needed to build SYSTEM_USER as the workers would have access to it. Am I getting that right? -- Michael --btWopmrdTz9ux/r+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmLvbJQACgkQnvQgOdby QH0zRg//fuCTiG+BDTkNVU0t1sgQNAO+KRVvlGaicWyE6dbo2EvbvxvvQ0cbZkXz Ex1loKGYqIYA2khvJieJd7TiLJWxIrxWBgoLPs6iTGye2e+FMf9CTSrf2TIqHE4A OYlJmSsw1d5wVnbkoO7qh1OSQeKMpBhd0Ogf/5TOMfMgdi7olB22Tt/xso8Qm38h BI/UeoylOtK5HsdA3hRWAZ3HzXop9k3pao48OVxjQQt46/T104MRlNjSoXBhDpYB 3ziDThAr83QJSJzscR7yCZPdjbTJH/InZLofnCE+xAe1nqgwe/+jMYIUuEDwvidr AxTZ+FTN/KBaYNjuFMLNXAlkiB/oGdnQ8qJSauiIF0KZsn36wmkHwVqQBEbgkRz2 vcWyTFUWBiHQfe7UdZVWp709S72eWIt1aRoYmC4RTwA3VQlFkmltObP7EJoUDrrL EIWsK6Q4OGaUaMiWYRUyngHQIp103Sn9z6Zj/X9q/hWkr1anQTpkUF4mOPqCzWfT Ywt2/Dm2cfljs0cCRXbnJtZKeCxoO26Y2p7lDVgVGtKqwUKUPaSbsJGwDNHgiR5M teYrZz0HdHcalvpgx8gjnHj/6OaMxTzJb64tE/o0t7eu5OLMgSjxZByWq5FXXW9y ns1ICFr2DkQViS/Y1QWMD8pPYqHnA+mre4oYub/9V8FxFVvcITo= =5bbJ -----END PGP SIGNATURE----- --btWopmrdTz9ux/r+--