Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJT0y-0003TG-FM for pgsql-committers@arkaria.postgresql.org; Tue, 09 Mar 2021 03:26:34 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lJT0w-00011D-OD for pgsql-committers@arkaria.postgresql.org; Tue, 09 Mar 2021 03:26:30 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJT0v-00010p-Fg for pgsql-committers@lists.postgresql.org; Tue, 09 Mar 2021 03:26:30 +0000 Received: from out5-smtp.messagingengine.com ([66.111.4.29]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lJT0q-0005zx-Sp for pgsql-committers@lists.postgresql.org; Tue, 09 Mar 2021 03:26:28 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 69AFF5C015B; Mon, 8 Mar 2021 22:26:22 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Mon, 08 Mar 2021 22:26:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=Yw/X/DbFtU3juDhD0z5gsHi+FyI RRLWfQk6+UIYlcaU=; b=cXwXJYlkuHQSfhNQrvkPZgFcQqYqQBe8epK44s4lBMh 37jHJ3UiFC08pEp8j02uv8ry6Cvhyne/FccfvLe3jBlXQLy+jUBeeXm6nqEUpMdk BnprPJrdrEg04DxDyIFxttTA0qIiQSi2kRr+SX5n8euLOICPvPw1WVCwZ34Hvy9K mU+5pRGtdSjMV04TLt+474O2+2/HXKHbjpTsjNVOsI6fZ74YBcVdzFw2IDdzupsC 9s72/16Hnual5pa6s+mxPy4mJDHY9h9BA1cwF/qhI4yayonQ1Au7XWHfbSIetp4Z Tt84YBCJN8Kom+rPc5pOA5l7rp2XaumDznMHJ/MgQCg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=Yw/X/D bFtU3juDhD0z5gsHi+FyIRRLWfQk6+UIYlcaU=; b=XqRxQ7IZsBT+PS8ZNOnK8D TPl+qvYKUOSgkcDFGnE6p0GfqNBnMR4fqRpUqd/1gTQw/CbcCfe6UF85Z8a1sQWj 3GxbQJatzse8w1IZQ6CB57Givs40EWCuuNkZ+DP633nrctpSY5Gt9fn5IuARqoBQ tzcbLmwpPw9ivSri8+5xWLf/Jaqx3B9Tg1cEQDztAtWW6lAzGGd2cts/wuNL4RVx 6M52LlQcAoanQU/xoypgnALEd53rn2iWE7v1/1RKQEU21l7HBCLWWGQUtulqKevF onUcs0LQLN3aHUDSPKYWswIpBQ6rFIsIL2fne0kxTpxJ1hyG0zf/Ydvgsq7EF2Cw == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrudduhedgheegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne gfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddt vdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgvrhcuoehmihgthhgrvghlsehprg hquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpeffudeffeelgffhkedukeekvedv udfgieetkeekudelfeevhffhffdtudffieeutdenucffohhmrghinhepphhoshhtghhrvg hsqhhlrdhorhhgnecukfhppeduuddurddutddvrddukedtrddukeehnecuvehluhhsthgv rhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqh huihgvrhdrgiihii X-ME-Proxy: Received: from paquier.xyz (ee0822lan1.rev.em-net.ne.jp [111.102.180.185]) by mail.messagingengine.com (Postfix) with ESMTPA id 41A3224005C; Mon, 8 Mar 2021 22:26:20 -0500 (EST) Date: Tue, 9 Mar 2021 12:26:15 +0900 From: Michael Paquier To: pgsql-committers@lists.postgresql.org Cc: Daniel Gustafsson Subject: Re: pgsql: Remove support for SSL compression Message-ID: References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="d865N+/1B1MNnbLG" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --d865N+/1B1MNnbLG Content-Type: multipart/mixed; boundary="1+1+Q3HM9YM6I4xo" Content-Disposition: inline --1+1+Q3HM9YM6I4xo Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Mar 09, 2021 at 02:18:52AM +0000, Michael Paquier wrote: > Remove support for SSL compression >=20 > PostgreSQL disabled compression as of e3bdb2d and the documentation > recommends against using it since. Additionally, SSL compression has > been disabled in OpenSSL since version 1.1.0, and was disabled in many > distributions long before that. The most recent TLS version, TLSv1.3, > disallows compression at the protocol level. (Adding Daniel in CC) So, this is breaking a test case in crake where an upgrade from 9.3 is done with a FDW server using this option that gets restored: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=3Dcrake&dt=3D2021-0= 3-09%2002%3A32%3A29 pg_restore: while PROCESSING TOC: pg_restore: from TOC entry 1541; 1417 55431 SERVER testserver1 buildfarm pg_restore: error: could not execute query: ERROR: invalid option "sslcompression" It looks like it is not that much a good idea to define it as a debug option after all. So I guess that the attached would fix the failure, where FDW servers can still pass down the parameter at will for backward-compatibility, and where libpq keeps ignoring its value. Any thoughts? -- Michael --1+1+Q3HM9YM6I4xo Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="sslcompression-fix.patch" Content-Transfer-Encoding: quoted-printable diff --git a/src/interfaces/libpq/fe-connect.c b/src/interfaces/libpq/fe-co= nnect.c index fed06bb038..a294d293eb 100644 --- a/src/interfaces/libpq/fe-connect.c +++ b/src/interfaces/libpq/fe-connect.c @@ -298,7 +298,7 @@ static const internalPQconninfoOption PQconninfoOptions= [] =3D { * compatibility. */ {"sslcompression", NULL, NULL, NULL, - "SSL-Compression", "D", 1, -1}, + "SSL-Compression", "", 1, -1}, =20 {"sslcert", "PGSSLCERT", NULL, NULL, "SSL-Client-Cert", "", 64, diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postg= res_fdw/expected/postgres_fdw.out index c2565dfc70..f17f3b6c29 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -167,6 +167,7 @@ ALTER SERVER testserver1 OPTIONS ( sslcert 'value', sslkey 'value', sslrootcert 'value', + sslcompression 'value', sslcrl 'value', --requirepeer 'value', krbsrvname 'value', @@ -8945,7 +8946,7 @@ DO $d$ END; $d$; ERROR: invalid option "password" -HINT: Valid options in this context are: service, passfile, channel_bindi= ng, connect_timeout, dbname, host, hostaddr, port, options, application_nam= e, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_= user_timeout, sslmode, sslcert, sslkey, sslrootcert, sslcrl, sslcrldir, req= uirepeer, ssl_min_protocol_version, ssl_max_protocol_version, gssencmode, k= rbsrvname, gsslib, target_session_attrs, use_remote_estimate, fdw_startup_c= ost, fdw_tuple_cost, extensions, updatable, fetch_size, batch_size +HINT: Valid options in this context are: service, passfile, channel_bindi= ng, connect_timeout, dbname, host, hostaddr, port, options, application_nam= e, keepalives, keepalives_idle, keepalives_interval, keepalives_count, tcp_= user_timeout, sslmode, sslcompression, sslcert, sslkey, sslrootcert, sslcrl= , sslcrldir, requirepeer, ssl_min_protocol_version, ssl_max_protocol_versio= n, gssencmode, krbsrvname, gsslib, target_session_attrs, use_remote_estimat= e, fdw_startup_cost, fdw_tuple_cost, extensions, updatable, fetch_size, bat= ch_size CONTEXT: SQL statement "ALTER SERVER loopback_nopw OPTIONS (ADD password = 'dummypw')" PL/pgSQL function inline_code_block line 3 at EXECUTE -- If we add a password for our user mapping instead, we should get a diff= erent diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_f= dw/sql/postgres_fdw.sql index a143a70406..be5618f759 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -181,6 +181,7 @@ ALTER SERVER testserver1 OPTIONS ( sslcert 'value', sslkey 'value', sslrootcert 'value', + sslcompression 'value', sslcrl 'value', --requirepeer 'value', krbsrvname 'value', --1+1+Q3HM9YM6I4xo-- --d865N+/1B1MNnbLG Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmBG6tcACgkQnvQgOdby QH1DMg//U4gtNgmMrIAxoKTeKVbRYcdSsojrxOPUguktqgBKPeAZlcV3nmTdQkuJ lFb2slxua12V1j3PAiufyQlaAaqCiE+caq1dbggonjmymomqFx0e1trTeEUEjFnL Vle9XUv9U0WBgfx/vRA8DCBROSC6fDqMp4/sPauNXofGXxYqj9Qr/Arqi+yXZWEh jAAaD3xHHWm2GV3HkcZ8heURvRgGg04e/akwKVp6+GIPRP/4NmjD3zT9BaR+HCmN 2mr0jNweTY0fFIwsn/mUb6wUG6/0xsonA3Pc0X2PUpVe6o2Ia0xyofiVxRLudcmb r+tQd5ynYKLkKpULMK9DFGJmTjEr3gwFMypu/W9Dzyy4N30YDObYNTISmBaEA0PH LGTnTOV5oBMFoWImI0qfM+90Ugt1VAgHU2X+uhxjhaghpnyuBYUBmTZnhdeww6aQ BoNxwXz/DZBtWzD2z94U2Kc0Zur8toa1n1MHzQMJz5iHygB62Rfz0mc9pHKQlNFM 7D+K6Bx5SJLjFcZAHlz6pcmAn8t6F0BFfhml+gS8TDh1hoNIBf2A4D25k8fx9kXv aLdzOdt4RgGyOta/eTQCsSMqZWf7Dekjyzja81PXkDbs/r+P9TmUP2kShnu2sWQd xKGfTUcpCDcuE5T5W1k0soNyYhQMHBzHDvgExYiLg/9AcXnSUbo= =fWSV -----END PGP SIGNATURE----- --d865N+/1B1MNnbLG--