psql and jdbc default sslmode - Mailing list pgsql-general

From Shankar Bhaskaran
Subject psql and jdbc default sslmode
Date
Msg-id CA+DMY5THKPeAQmVXX2Zyhu_uEO4-9Kyso5DfyHVQgGatCZR7Pg@mail.gmail.com
Whole thread Raw
List 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

pgsql-general by date:

Previous
From: PegoraroF10
Date:
Subject: Re: Server goes to Recovery Mode when run a SQL
Next
From: Tom Lane
Date:
Subject: Re: Server goes to Recovery Mode when run a SQL