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 1jawKN-00076L-Qz for pgsql-bugs@arkaria.postgresql.org; Tue, 19 May 2020 07:06:15 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1jawKM-0001Hl-Pd for pgsql-bugs@arkaria.postgresql.org; Tue, 19 May 2020 07:06:14 +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 1jawHK-00076d-0r for pgsql-bugs@lists.postgresql.org; Tue, 19 May 2020 07:03:06 +0000 Received: from out2-smtp.messagingengine.com ([66.111.4.26]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jawHH-000441-Tz for pgsql-bugs@lists.postgresql.org; Tue, 19 May 2020 07:03:04 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.nyi.internal (Postfix) with ESMTP id 393C95C0046; Tue, 19 May 2020 03:03:03 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute3.internal (MEProxy); Tue, 19 May 2020 03:03:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=mGgEMidhTqw0B0QkkqQpkK59jvq KgQlspN3UDnDjhOs=; b=gnMTtHAeqierK5S1aOmfcT7y5129z0uNUORkh2n5PZo 22iFMNbrjOfqyeRRScbPhIIQ2AsxgC78Qa5PaKVZWqVyu9ApyOieiYWf6CoY2S5d U8rdyeVU+Fzjote0hrIAQzJhllVBtyGYXuN+kYS+oUUgeHVzxqucSTk04n2yPZGP /45d6R8egyjE4/k3uxyKe488i8br/rLf1Ff9XUI6eaurKq1LMlmOsiJgTMM/s7nK E1qXTVj/sZ/6rcDq34AJL7RaVJsH0b8GOXuviNv9Z2QCoU5I3HCDVixLT+Zul/Pc +SM/JkAL7xXtw+0Dd9S9RzPbxHQy2dO7t0gDMG+ugOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=mGgEMi dhTqw0B0QkkqQpkK59jvqKgQlspN3UDnDjhOs=; b=bXwol4WS50ll8T/TTeo9yF koziXY1mv1flHMkNcxZuC9M3NhDVl19psLDOGoeG9MG80GqWn2zSHYR0whfMSXnP ayOcCColF/c9dFZrFgk/Pl9LFGxmZAbmUmMHK6fwWmKmm3uBO8eTXgaibk8FS/yh 5K42AT9IDk3Lx3+wqEapmvfpDyerWF7NjfVUZ1/ZgvYaEel2ZSE8zSHtUXPn771V wLleyka+PqBV9VjNYreGpLpfWeoA271cuCERP1e9xBMGCx4vVMrtzyA6tuH4Hu2s yovjR48hkDmiaYOKynqadvLI+0ER+4icqlD1yFZARCVPP2cl0JJwTyMV/Jg2rVVg == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedruddtiedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enfghrlhcuvffnffculdejtddmnecujfgurhepfffhvffukfhfgggtuggjsehgtderredt tddvnecuhfhrohhmpefoihgthhgrvghlucfrrghquhhivghruceomhhitghhrggvlhesph grqhhuihgvrhdrgiihiieqnecuggftrfgrthhtvghrnhepvdegudeuhfdtueeltedtveej heehieevueeigeelteegleejleeiueeiheegvefhnecukfhppeduuddurddutddvrdduke dtrddukeehnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 161FB306641F; Tue, 19 May 2020 03:03:00 -0400 (EDT) Date: Tue, 19 May 2020 16:02:57 +0900 From: Michael Paquier To: Oleksandr Shulgin Cc: Magnus Hagander , abcxiaod@126.com, PostgreSQL mailing lists Subject: Re: BUG #16449: Log file and the query field of the pg_stat_statements table display clear text password. Message-ID: <20200519070257.GF11835@paquier.xyz> References: <16449-4d45c7092ac52797@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="NGIwU0kFl1Z1A3An" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --NGIwU0kFl1Z1A3An Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, May 19, 2020 at 08:22:09AM +0200, Oleksandr Shulgin wrote: > I think it's worth noting that using psql's \password command still resul= ts > in an ALTER USER being sent to the server, and thus ending up in the logs. > The difference is that the logged password is already encrypted: >=20 > postgres=3D# \set ECHO_HIDDEN > postgres=3D# \password t > Enter new password: > Enter it again: > ********* QUERY ********** > ALTER USER t PASSWORD 'md5cf853b7f00ed64ef120b3f6af0d073c2' > ************************** Even with that, please also remember that for a md5-hashed password, having the MD5 hash is enough to be able to log into the server. That's not the case with SCRAM... -- Michael --NGIwU0kFl1Z1A3An Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAl7DhKEACgkQnvQgOdby QH38uw//W6J8kX58HoeOog4UaIILW8pWELqndLlPl1D68u5GYDWJyPrnVwOwnI6o 8WQBJ2hFyE+XCtoL57Pdi3V2XEApOlgGt/9wPo5MR4XA/RTbXSQdMqVEDWVB8Fv6 r2MCxclDY3JI/Y9P8uayvev06LtuPiUx708kBKqn8FUr+to1flFihhQ3FNZGkGn6 nZio2QwZxs3/C7WHVw7dkWduEYLifOOVCdNkCqh1sJ8YAD9Udbcj7DECOnHFr92J ZZ+KMnmvbp/1PcN6i66gHn/BNM41Pviu2CHQk55IB59xCkgCD9wP37DWSz1nD+1E tBXAPUeqoYeRF+EDbmL7WJ5R662UzFKaqxkZH00KkdIL5tMfoc0+e/9KiHXDqbgY WU5ANzW/ff5KUQckMIXVpV8MB6sRNHrmXoGjYcsIyQkAB/S04nCK6LQr/SBGzsaQ qbl+J1FGjqf40eXHdDign7+V3x4I5zlKxCzubrahWVGT6ZZUGij1XC5AbEB9GoY+ lmYan6GOJ4E8zEDemIdqnvr/SxtU7yJIPZoNEAD201f37ql2D5Jwg1KEqEZPm9+z p/Y6hXYFE51ReUOWT9nMh8KltkfFw17rwTF7u5slDruMMwrxX6sKhIVLLjtdHLHh g6rS/1AekOdHldQ0oZ/yjZpfUeemWpWH18boRmNB5LNeUzFdZMw= =QmbT -----END PGP SIGNATURE----- --NGIwU0kFl1Z1A3An--