Problem with ssl and psql in Postgresql 13
Mikael Gustavsson <mikael.gustavsson@smhi.se>
From: Gustavsson Mikael <mikael.gustavsson@smhi.se>
To: "pgsql-general@postgresql.org" <pgsql-general@postgresql.org>
Cc: Svensson Peter <peter.svensson@smhi.se>
Date: 2020-12-17T07:21:08Z
Lists: pgsql-general
Hi,
We are starting our journey to migrate from Postgresql 11 to Postgresql 13 and have run into a problem.
The postgresql 13 version of psql don´t seem to work with ssl.
We use the community built rpms on redhat 8.3:
$ rpm -q postgresql11
postgresql11-11.10-1PGDG.rhel8.x86_64
$ rpm -q postgresql13
postgresql13-13.1-1PGDG.rhel8.x86_64
Is there some configuration we have missed that have changed between Postgresql 11 and 13?
Here is an example, sorry for the obfuscations.
It works as expected from psql 11:
$ psql -d postgres -Ukalle -hserver -W
Password:
psql (11.10, server 13.1)
WARNING: psql major version 11, server major version 13.
Some psql features might not work.
SSL connection (protocol: TLSv1.3, cipher: TLS_AES_256_GCM_SHA384, bits: 256, compression: off)
Type "help" for help.
postgres=>
But not from psql 13:
$ /usr/pgsql-13/bin/psql -d postgres -Ukalle -hserver -W
Password:
psql: error: FATAL: no pg_hba.conf entry for host "nnn.nn.n.nnn", user "kalle", database "postgres", SSL off
FATAL: no pg_hba.conf entry for host "nnn.nn.n.nnn", user "kalle", database "postgres", SSL off
Our mean all-ssl test pg_hba.conf file:
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all reject
# IPv4 local connections:
hostssl all all 0.0.0.0/0 pam
# IPv6 local connections:
#host all all ::1/128 reject
# Allow replication connections from localhost, by a user with the
# replication privilege.
#host replication postgres reject
Kind Regards
Mikael Gustavsson, SMHI - Swedish Meteorological and Hydrological Institute
Commits
-
Fix up usage of krb_server_keyfile GUC parameter.
- 861e967176e9 13.2 landed
- 860fe27ee1e2 14.0 landed
- 3ca19490b4f8 12.6 landed
-
Improve log messages related to pg_hba.conf not matching a connection.
- d05e14d786ac 13.2 landed
- 7ed616f818f0 12.6 landed
- 3995c424984e 14.0 landed
-
Fix assorted issues in backend's GSSAPI encryption support.
- c1c88bf03e1e 13.2 landed
- 622ae4621ece 14.0 landed
- 4cfdd8a47a9e 12.6 landed
-
Fix bugs in libpq's GSSAPI encryption support.
- ff6ce9a3a691 14.0 landed
- b3a5bf719cf7 12.6 landed
- 06b844c2b8d3 13.2 landed