psql and jdbc default sslmode

From: Shankar Bhaskaran <mailshankarb(at)gmail(dot)com>
To: "pgsql-generallists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: psql and jdbc default sslmode
Date: 2020-08-12 20:54:10
Message-ID: CA+DMY5THKPeAQmVXX2Zyhu_uEO4-9Kyso5DfyHVQgGatCZR7Pg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi ,

We are making connections to the postgres server through jdbc and psql
(libpq) . I have set the ssl as on the postgres server . It can take ssl as
well as non ssl connections.
I made a connection through a psql client to postgres server and could
confirm that the default sslmode (when no sslmode parameter is supplied
while making connection) is "prefer". Please note i have not supplied the
sslmode parameter in the connection string from psql. Still connection is
secured

psql "postgresql://$POSTGRES_HOST:$PG_PORT/postgres" -U postgres
psql (9.6.18, server 9.6.12)
SSL connection (protocol: TLSv1.2, cipher: ECDHE-RSA-AES256-GCM-SHA384,
bits: 256, compression: off)
Type "help" for help.

I have read in the AWS documentation for jdbc connections to server the
default mode is "verify-full". I created a jdbc connection to the postgres
server by supplying no sslmode to the connection string . The connection
was successful . I just want to confirm what is the default sslmode for
jdbc connections to the postgres server when ssl is turned on the server.

Regards,
Shankar

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2020-08-12 22:09:02 Re: Server goes to Recovery Mode when run a SQL
Previous Message PegoraroF10 2020-08-12 20:47:38 Re: Server goes to Recovery Mode when run a SQL