Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYDwo-0015s2-UF for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Aug 2023 23:04:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1qYDwn-00Bl41-QR for pgsql-hackers@arkaria.postgresql.org; Mon, 21 Aug 2023 23:04:33 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYDwn-00Bl39-Ft for pgsql-hackers@lists.postgresql.org; Mon, 21 Aug 2023 23:04:33 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qYDwg-000FrL-DH for pgsql-hackers@postgresql.org; Mon, 21 Aug 2023 23:04:32 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id DA97C3200919; Mon, 21 Aug 2023 19:04:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 21 Aug 2023 19:04:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:cc:content-type: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=1692659063; x=1692745463; bh=nX ZkEBJ70R/NuwOdnLBEWAa7EpKZZEneYqVbWN/ziBc=; b=QG9HWiDfWrzbTlmHSo LSkAtjTg9kk5rNY8hZ9dHcEBySNo5XHFs8S+i7CMf8B5DNgPTBi9JASP1PMUaKR+ f8VmKktraiPGt9qBB+qd489ox5H+r7lq56+9OpzNoOYLaOmV2DlE/Ic/+EPmeFoo +U/W0uMaUflSN1TCEb19WGhmnwcVY1Z6ZKCfHSxSVAVgNZ4Da+CMyUwI3UMRyj4c 0G/5NLl9itpcywenIFB7aC3hYIXECxkcRACy9ImZ8TAUV+1fWkrKncCPwfmoUIPf wPb2194NWONmEIuyFIjwGmAezPOuZjMvNFoo8y/LOpluotAhWAIrLLXzC8Eip/2S BLAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type: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=1692659063; x=1692745463; bh=nXZkEBJ70R/Nu wOdnLBEWAa7EpKZZEneYqVbWN/ziBc=; b=AdCYMzprwWKg52YkU+DWyq6bFQnnv UR5fluB0RxUxHFm/+4RbQ56BoYx1wtJrE18jpI7jRX37gFeREDB2z9wZmYIgwVt7 4ozDR4qSttLxg1FSHcy+zAeMNHgmPgD0NG7CgaETrX9FKq+80nUDwg09kJiEay+x +qaFN3EiAJnKyinQGn3LUT717VxDd06YJvZw3PyCUzFjg7SV8bsZpArIPW/p4LSo 3q0cwXbELdTaskgxDcvjsWK67Fvheq5kMqA/nYARM+JI6AQNxusq/Sm1LJttA0Xn RRXWnchDb7WvtksDPTzvUn6bpga6favjWwYxvTjDQDIwWZguYV6bBjyrw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedviedruddvtddgudekucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdljedtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepteelieefudffhffhtdetleeg geegfffhkeeuveetiefgudduvedutefggeeivdejnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih ii X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 21 Aug 2023 19:04:21 -0400 (EDT) Date: Tue, 22 Aug 2023 08:04:18 +0900 From: Michael Paquier To: Robert Haas Cc: Stephen Frost , Jacob Champion , Shaun Thomas , pgsql-hackers@postgresql.org Subject: Re: Logging of matching pg_hba.conf entry during auth skips trust auth, potential security issue Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="MU4q+lt7VIVUwZ4P" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --MU4q+lt7VIVUwZ4P Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 21, 2023 at 09:27:51AM -0400, Robert Haas wrote: > + * No authentication identity was set; this happens e.g. when the > + * trust method is in use. For audit purposes, log a breadcrumb to > + * explain where in the HBA this happened. >=20 > Proposed rewrite: "Normally, if log_connections is set, the call to > set_authn_id will log the connection. However, if that function is > never called, perhaps because the trust method is in use, then we > handle the logging here instead." WFM. -- Michael --MU4q+lt7VIVUwZ4P Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmTj7XIACgkQnvQgOdby QH0nog//aLl638nXlF6eLSbvdgjc0Dk3APpm5h0EoyuTDK80W9fzzOw1hoMwXkAv MTzqc59v1mAISpSYp3kl3DEX1OZ9UkjV0UuQws7cNAXhdeTGeqQKaLDTclIPyRsw aOKyBIHoCkGihrw3LzQt56uxXdjEE6jTnusCmpwwnhuXDNCwEAFhMGAeXTZ3MZ/Q m+f88UG2tct6ONO5i3M5djy/BmmyNBskNw/UBq2wbk3oEHObNC3FUwsAFwJ7Io7j JKMHqgG0NM/IN5+Nn/Tcl1ZSss8OiyfVdjgBS1MzN+Nhd69085Fe63HKIRWAayHG 2rqxEbfxKrcrO/eiBOS8A85koqQCx9+hbuI6VP8s/jSzuZ63S+XesowMFe3XYL1Z z/vcCj/yIubIQ5+r8SdSwI5/7lYiLKtOL10B4rRCy4ZD9DsyvLqkSPK4HXI4LJK5 qeaRkhf45STOhB9/i0mnDscecR9deyRxkMsy0jQEorFVS8kZ11KZAkfMpFOYmNqK g0sjIFV0RGU0rx84IHKQE2Uj6DQC7Y0gl9KN3nWwE4H94F+fUmfAMicB3wuTimYF Sl5nt4P8ktHR7QEuLZywuEd6mGxFW5ih4y9VXiw3CyS8W1TeAZwTJchPxJeAqtD1 9ulJahv0xhGDuk6YGNAKNLsEt6FuM3lKLemQh15AX77B0L8oIC8= =g5iJ -----END PGP SIGNATURE----- --MU4q+lt7VIVUwZ4P--