Re: How to check is connection encrypted

From: "Andrus" <kobruleht2(at)hot(dot)ee>
To: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to check is connection encrypted
Date: 2019-03-22 14:56:58
Message-ID: 60A09E32534D41AE9A3E370973FE5B30@dell2
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi!

>Or, if you want to check/enforce this from the server side,
>you could enable log_connections and see what's logged;
>or simply change pg_hba.conf to disallow non-SSL connections.

I set log_connections =on

pg_hba.conf contains :

local all postgres trust
local all all md5
hostssl yle all 0.0.0.0/0 md5
hostssl yle all ::1/0 md5
host yle testuser 0.0.0.0/0 reject
host yle testuser ::1/0 reject
...

log file does not show ssl connection info:

2019-03-22 16:49:03 EET [unknown] [unknown] LOG:
connection received: host=xx.xx.xx.xx port=54590
2019-03-22 16:49:04 EET testuser yle LOG: connection
authorized: user=testuser database=yle

Why Postgres 9.1.5 version does not show ssl connection info here ?
Does this mean that there is no SSL connection or is ssl info logging added
in newer versions ?

Andrus.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2019-03-22 15:29:23 Re: How to check is connection encrypted
Previous Message Adrian Klaver 2019-03-22 14:48:36 Re: Script which shows performance of ByteA: ascii vs binary