Re: Redact user password on pg_stat_statements - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Redact user password on pg_stat_statements
Date
Msg-id 3134386.1740154091@sss.pgh.pa.us
Whole thread Raw
In response to Redact user password on pg_stat_statements  (Matheus Alcantara <matheusssilv97@gmail.com>)
Responses Re: Redact user password on pg_stat_statements
Re: Redact user password on pg_stat_statements
List pgsql-hackers
Matheus Alcantara <matheusssilv97@gmail.com> writes:
> Attached a patch to redact the password value from pg_stat_statements_view when
> executing:
> { CREATE|ALTER} {USER|ROLE|GROUP } identifier { [WITH] [ENCRYPTED]
> PASSWORD 'value' }

Please see previous threads about hiding this sort of information,
most recently [1].  It's a slippery slope for which there are no
real fixes, and even partial fixes like this one are horrid kluges.
One obvious objection to the direction you propose here is that it
does nothing for pg_stat_activity, nor for the server log if
log_statement is enabled.

The right answer is to never send cleartext passwords to the server
in the first place.

            regards, tom lane

[1] https://www.postgresql.org/message-id/flat/18817-771682052a364bfe%40postgresql.org



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: TAP test started using meson, can get a tcp port already used by another test.
Next
From: Andres Freund
Date:
Subject: Re: GetRelationPath() vs critical sections