Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3TtW-0007tG-7b for pgsql-general@arkaria.postgresql.org; Fri, 21 Sep 2018 22:27:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1g3TtT-0002r1-4g for pgsql-general@arkaria.postgresql.org; Fri, 21 Sep 2018 22:27:23 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3TtS-0002qq-So for pgsql-general@lists.postgresql.org; Fri, 21 Sep 2018 22:27:22 +0000 Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1g3TtL-0003Xk-PW for pgsql-general@lists.postgresql.org; Fri, 21 Sep 2018 22:27:22 +0000 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 6FBFB328; Fri, 21 Sep 2018 18:27:11 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Fri, 21 Sep 2018 18:27:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aklaver.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=aXVy7l2/JnawjzSo9liC5FQxbXtx9 qV8KbvNaxlwsPQ=; b=7szUWBP4VKX+IwSvoGZQVkNdiRobpMi+C4OV9bE9P2cMd mEGJVrN62Ev+Wz1Nwbgz4ALqnzVyESrwalfuIvimnQNZaUGPpSee4O8VR4Rtka7e 20lgHppUCN7fNpWbS1FX5G08PWNDMoS1wY7btTA6RXmhnfZVUb2uTgJQ61fnjPw7 CWE/ZEtRAqsW1d4YHl9rvpefKDviteevu511KWZXqiIuxZcbfKlLcOxKhK/AIRXR E4P2/Uw28gVTpEPccE382qJf1jF5KsvnLvCZzFJbj7x+llXUpEtQ2oj816B0MLRP EuicHITrPKa2x70RIzX23ZszRrkPXQ4vGkW8Ddcsg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=aXVy7l 2/JnawjzSo9liC5FQxbXtx9qV8KbvNaxlwsPQ=; b=nfPd0j7SvqSU6hGavBhLCu FzGM6VTp9aYlXWnwSPWVzpdxTj6a98TASwJJ3gr8CiHnQ///E5QztZwusZ09/S9Y OTHF2ZwihaB3S1KQCUNagWvVsv2sInYlAIQkY68ixzy6SGdfYSc6+qTBSGh7FtwF pHwMDIlCWoG5wiSayN54lHOzQLCpFkhtNrzLl//93h0OQHbYpjjcmfBVPS83uQ2t SemRjNorQM7B6OP8L2y6Bo2/il70B9IqoFcPa5xYczWG7lYj1U08DsYrUVlBnfO4 Aws5DGvaUiokIgcYMubt+rBhe9nQLlq98HEVDDFkftpIk/MfuzXxRCzPTqeYZqKw == X-ME-Proxy: X-ME-Sender: Received: from ranger.suse (50-197-80-2-static.hfc.comcastbusiness.net [50.197.80.2]) by mail.messagingengine.com (Postfix) with ESMTPA id 4E674E47C7; Fri, 21 Sep 2018 18:27:10 -0400 (EDT) Subject: Re: New behavior with JDBC 42.2.5 To: Ravi Krishna Cc: pgsql-general@lists.postgresql.org References: From: Adrian Klaver Message-ID: <36f554cb-d8c2-5ebc-7f6d-0080effbae4e@aklaver.com> Date: Fri, 21 Sep 2018 15:27:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 9/21/18 10:12 AM, Ravi Krishna wrote: > We recently upgraded our JDBC driver to 42.2.5 after seeing this > https://www.postgresql.org/about/news/1883/ > > All of our PG databases mandates SSL connections. So the first line in pg_hba.conf is > > hostnossl all all all reject > > We use dbeaver and while setting up connection we check box SSL (require). > Attempt to connect without that checked would result in the following error > "pg_hba.conf rejected the connection: SSL off" > > With the JDBC version listed in the subject, we are finding that we can connect > to the database even without checking SSL. Is that expected with this version of > JDBC. Does it automatically make the connection an SSL one? Otherwise it is hard > to see PG allowing that connection to pass. First are doing a socket connection or a host connection? Socket connections ignore sslmode. Second what happens if you do some version of this?: psql postgresql://localhost:5432/test?sslmode=require psql postgresql://localhost:5432/test?sslmode=disable > > thanks > -- Adrian Klaver adrian.klaver@aklaver.com