Re: BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication
Date
Msg-id 1722734.1694107053@sss.pgh.pa.us
Whole thread Raw
In response to BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication  (PG Bug reporting form <noreply@postgresql.org>)
List pgsql-bugs
PG Bug reporting form <noreply@postgresql.org> writes:
> When connecting to a PostgreSQL server (version 14) configured to only
> accept SSL connections, if a user provides an incorrect password, the psql
> client (version 14) returns two error messages in succession. The first
> message correctly indicates a password authentication failure, but the
> second suggests an unexpected non-SSL connection attempt.

This is libpq's (not psql's) default behavior.  If you don't like it,
you need to set the sslmode parameter in the connection string to prevent
non-SSL connection attempts.  See

https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

            regards, tom lane



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication
Next
From: Laurenz Albe
Date:
Subject: Re: BUG #18095: Unintended non-SSL connection attempt by psql cli command after a failed password authentication