pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Paquier <michael@paquier.xyz>
To: Oleksandr Shulgin <oleksandr.shulgin@zalando.de>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: abcxiaod@126.com, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16449: Log file and the query field of the pg_stat_statements table display clear text password.
Date: Tue, 19 May 2020 16:02:57 +0900
Message-ID: <20200519070257.GF11835@paquier.xyz> (raw)
In-Reply-To: <CACACo5QLeQ+Z0BECp05hHYbqy8Fe1X_ziPmHxr3tyLzVeL9jCw@mail.gmail.com>
References: <16449-4d45c7092ac52797@postgresql.org>
	<CABUevEx6UKWkTftLbKROdwfc9iL-Z8gqcRQomwv_Uq4h9jEQ_Q@mail.gmail.com>
	<CACACo5QLeQ+Z0BECp05hHYbqy8Fe1X_ziPmHxr3tyLzVeL9jCw@mail.gmail.com>

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 results
> 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:
> 
> postgres=# \set ECHO_HIDDEN
> postgres=# \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

Attachments:

  signature.asc (application/pgp-signature, 832B) download

view thread (4+ messages)

Message-ID: <20200519070257.GF11835@paquier.xyz>
Permalink:  ../20200519070257.GF11835@paquier.xyz/
Also on:    postgresql.org/message-id/20200519070257.GF11835@paquier.xyz

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-bugs@postgresql.org
  Cc: michael@paquier.xyz, oleksandr.shulgin@zalando.de, magnus@hagander.net, pgsql-bugs@lists.postgresql.org
  Subject: Re: BUG #16449: Log file and the query field of the pg_stat_statements table display clear text password.
  In-Reply-To: <20200519070257.GF11835@paquier.xyz>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox