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 1oZClh-0007vW-Dy for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Sep 2022 14:56:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1oZClf-00027N-Nk for pgsql-hackers@arkaria.postgresql.org; Fri, 16 Sep 2022 14:56:35 +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 1oZCle-00023Z-Oa for pgsql-hackers@lists.postgresql.org; Fri, 16 Sep 2022 14:56:35 +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 1oZClZ-0002ZB-2I for pgsql-hackers@postgresql.org; Fri, 16 Sep 2022 14:56:34 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id C4F235C02A8; Fri, 16 Sep 2022 10:56:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 16 Sep 2022 10:56:23 -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=1663340183; x= 1663426583; bh=/NckbBTfi6c7LTB5vYJJEhdMFPGo00qu7SCk4O76RhM=; b=q d5f2hL0C9PZCJLr+69JLJxQvsSX+Myg30mBaJ6L+HVl5ve7Kc9WcETXUEHU1FOW7 hoTbpxESUYP2csp91sviJ/uYEm36sds6QsQ9XW5ljJKJoATd9jrEqXUkaexpxZWD kT+KYhvUHPzClJWkIHNbBfJnnL6n0byKu+7clnWpLeP5SJbKbtbQF9HCeF9QPmUc zdYyohXogrQdgV1FaeoGvExmp2jad/bMX9RFoLr2VZU9iQEqSJ4gPFXxdCNKj4ry eWUUK/2F1BZntzrXUVuX1RuMfH4/byaKNQ7hh1Z6Q4qcrsAq4AZnN3W/VKAUH3UK kMGpJQZevgp/8229+Tekw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfedvtddgkeehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepkfffgggfuffvvehfhfgjtgfgsehtjeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeehleffgeegudejteei hfelteduvdeifffhffdvjedvffegjeekudeludehudeifeenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Feedback-ID: i131946ab:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 16 Sep 2022 10:56:22 -0400 (EDT) Message-ID: Date: Fri, 16 Sep 2022 16:56:20 +0200 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 08.09.22 20:18, Jacob Champion wrote: > Sounds fair. "cleartext"? "plaintext"? "plain" (like SASL's PLAIN)? > On the SASL front: In the back of my head I'd been considering adding > a "sasl:" prefix to "scram-sha-256", so that we have a namespace for > new SASL methods. That would also give us a jumping-off point in the > future if we decide to add SASL method negotiation to the protocol. > What do you think about that? After thinking about this a bit more, I think it would be best if the words used here match exactly with what is used in pg_hba.conf. That's the only thing the user cares about: reject "password", reject "trust", require "scram-sha-256", etc. How this maps to the protocol and that some things are SASL or not is not something they have needed to care about and don't really need to know for this. So I would suggest to organize it that way. Another idea: Maybe instead of the "!" syntax, use two settings, require_auth and reject_auth? Might be simpler?