pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_stat_statements: password in command is not obfuscated
3+ messages / 3 participants
[nested] [flat]
* pg_stat_statements: password in command is not obfuscated
@ 2018-03-23 21:30 legrand legrand <legrand_legrand@hotmail.com>
2018-03-23 23:17 ` Re: pg_stat_statements: password in command is not obfuscated David Rowley <david.rowley@2ndquadrant.com>
0 siblings, 1 reply; 3+ messages in thread
From: legrand legrand @ 2018-03-23 21:30 UTC (permalink / raw)
To: pgsql-general
Hello,
It seems that passwords used in commands are not removed when caught by
pg_stat_statements
(they are not "normalized" being utility statements)
exemple:
alter role tt with password '123';
select query from public.pg_stat_statements
where query like '%password%';
query
----------------------------------------
alter role tt with password '123';
Do you think its a bug ?
Regards
PAscal
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-general-f1843780.html
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_stat_statements: password in command is not obfuscated
2018-03-23 21:30 pg_stat_statements: password in command is not obfuscated legrand legrand <legrand_legrand@hotmail.com>
@ 2018-03-23 23:17 ` David Rowley <david.rowley@2ndquadrant.com>
2018-03-25 09:15 ` Re: pg_stat_statements: password in command is not obfuscated Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 3+ messages in thread
From: David Rowley @ 2018-03-23 23:17 UTC (permalink / raw)
To: legrand legrand <legrand_legrand@hotmail.com>; +Cc: pgsql-general
On 24 March 2018 at 10:30, legrand legrand <legrand_legrand@hotmail.com> wrote:
> It seems that passwords used in commands are not removed when caught by
> pg_stat_statements
> (they are not "normalized" being utility statements)
>
> exemple:
> alter role tt with password '123';
>
> select query from public.pg_stat_statements
> where query like '%password%';
>
> query
> ----------------------------------------
> alter role tt with password '123';
>
> Do you think its a bug ?
If it is, then it's not a bug in pg_stat_statements. log_statement =
'ddl' would have kept a record of the same thing.
Perhaps the best fix would be a documentation improvement to mention
the fact and that it's best not to use plain text passwords in
CREATE/ALTER ROLE. Passwords can be md5 encrypted.
--
David Rowley http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
^ permalink raw reply [nested|flat] 3+ messages in thread
* Re: pg_stat_statements: password in command is not obfuscated
2018-03-23 21:30 pg_stat_statements: password in command is not obfuscated legrand legrand <legrand_legrand@hotmail.com>
2018-03-23 23:17 ` Re: pg_stat_statements: password in command is not obfuscated David Rowley <david.rowley@2ndquadrant.com>
@ 2018-03-25 09:15 ` Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 3+ messages in thread
From: Michael Paquier @ 2018-03-25 09:15 UTC (permalink / raw)
To: David Rowley <david.rowley@2ndquadrant.com>; +Cc: legrand legrand <legrand_legrand@hotmail.com>; pgsql-general
On Sat, Mar 24, 2018 at 12:17:30PM +1300, David Rowley wrote:
> If it is, then it's not a bug in pg_stat_statements. log_statement =
> 'ddl' would have kept a record of the same thing.
>
> Perhaps the best fix would be a documentation improvement to mention
> the fact and that it's best not to use plain text passwords in
> CREATE/ALTER ROLE. Passwords can be md5 encrypted.
Yeah, this is bad practice. That's one of the reasons why storage of
plain text passwords has been removed in Postgres 10 still they can be
passed via command, and also why PQencryptPasswordConn and
PQencryptPassword are useful. Using psql's \password is a good habit to
have.
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-03-25 09:15 UTC | newest]
Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-03-23 21:30 pg_stat_statements: password in command is not obfuscated legrand legrand <legrand_legrand@hotmail.com>
2018-03-23 23:17 ` David Rowley <david.rowley@2ndquadrant.com>
2018-03-25 09:15 ` Michael Paquier <michael@paquier.xyz>
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