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 1ob8Kz-0003BM-Qx for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Sep 2022 22:37:01 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ob8Ky-0001sA-Is for pgsql-hackers@arkaria.postgresql.org; Wed, 21 Sep 2022 22:37:00 +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 1ob8Ky-0001s1-8H for pgsql-hackers@lists.postgresql.org; Wed, 21 Sep 2022 22:37:00 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1ob8Kt-0001wU-Mu for pgsql-hackers@postgresql.org; Wed, 21 Sep 2022 22:36:59 +0000 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 44A3632007E8; Wed, 21 Sep 2022 18:36:50 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 21 Sep 2022 18:36:50 -0400 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=fm2; t=1663799809; x= 1663886209; bh=lpeYovLxeqrh5YHeeCDQD/YBRRumg06eqZbWEhx2Qlk=; b=Q 49aVYf3xM/ERx5SIdVlhznarW/lvIZtQzec/oHaypHhHRWwuMb23+WhIzylxP/Y4 YZAG5rfucMLRm7QjZJKXsHTrIeci/aoxgHqmIvD4Y1kSXd4Yb7yAlrek0vEk5ATH eZb/tKLICrLbrih0dv1jt4DD0Jvq/nCcnwq+s+iU7u7Ukr8j5OOZ0AoPwdi9UViF LwTfixHCKTFc3jxHpKWbuHwlp0rZrLXVvv7hbtyAeoFJ+KHAHlffeKBy/YwNMG8q Wms72S9c7nOEI64PcSj/3cDWleOBjh1C0V5M1UfLkK8e1sIop/5SKCDr5d0CcBEq zMKuj2KLU6kL45Zgsj8pQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeefvddgudduucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 21 Sep 2022 18:36:45 -0400 (EDT) Message-ID: <914a0125-3dfb-920f-51b6-8d44a8edbdd2@enterprisedb.com> Date: Wed, 21 Sep 2022 18:36:41 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.2.2 Subject: Re: [PoC] Let libpq reject unexpected authentication requests Content-Language: en-US To: Jacob Champion Cc: "pgsql-hackers@postgresql.org" , Michael Paquier , "David G. Johnston" References: <9e5a8ccddb8355ea9fa4b75a1e3a9edc88a70cd3.camel@vmware.com> <77358b4c-6497-e5d3-c13c-57522654af25@enterprisedb.com> From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 21.09.22 17:33, Jacob Champion wrote: > On Fri, Sep 16, 2022 at 1:29 PM Jacob Champion wrote: >> I'm happy to implement proofs of concept for that, or any other ideas, >> given the importance of getting this "right enough" the first time. >> Just let me know. > > v8 rebases over the postgres_fdw HINT changes; there are no functional > differences. So let's look at the two TODO comments you have: * TODO: how should !auth_required interact with an incomplete * SCRAM exchange? What specific combination of events are you thinking of here? /* * If implicit GSS auth has already been performed via GSS * encryption, we don't need to have performed an * AUTH_REQ_GSS exchange. * * TODO: check this assumption. What mutual auth guarantees * are made in this case? */ I don't understand the details involved here, but I would be surprised if this assumption is true. For example, does GSS encryption deal with user names and a user name map? I don't see how these can be equivalent. In any case, it seems to me that it would be safer to *not* make this assumption at first and then have someone more knowledgeable make the argument that it would be safe.