Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bS5BT-0000ab-SS for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Jul 2016 16:26:19 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bS5BT-0001ef-AO for pgsql-hackers@arkaria.postgresql.org; Tue, 26 Jul 2016 16:26:19 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bS5A0-0008P1-O9 for pgsql-hackers@postgresql.org; Tue, 26 Jul 2016 16:24:48 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bS59x-0005ed-Je for pgsql-hackers@postgresql.org; Tue, 26 Jul 2016 16:24:47 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 84696883A0; Tue, 26 Jul 2016 16:24:43 +0000 (UTC) Received: from localhost (vpn1-4-144.ams2.redhat.com [10.36.4.144]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u6QGOgOq015830; Tue, 26 Jul 2016 12:24:42 -0400 From: Robbie Harwood To: Tom Lane Cc: Michael Paquier , PostgreSQL mailing lists , Stephen Frost Subject: Re: [PATCH v12] GSSAPI encryption support In-Reply-To: <18337.1469546948@sss.pgh.pa.us> References: <20160406112105.GG10850@tamriel.snowman.net> <1530.1459977031@sss.pgh.pa.us> <5486.1459984857@sss.pgh.pa.us> <18337.1469546948@sss.pgh.pa.us> User-Agent: Notmuch/0.22.1 (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Tue, 26 Jul 2016 12:24:39 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Tue, 26 Jul 2016 16:24:43 +0000 (UTC) X-Pg-Spam-Score: -8.2 (--------) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --=-=-= Content-Type: text/plain Tom Lane writes: > Robbie Harwood writes: >> So there's a connection setting `sslmode` that we'll want something >> similar to here (`gssapimode` or so). `sslmode` has six settings, but I >> think we only need three for GSSAPI: "disable", "allow", and "prefer" >> (which presumably would be the default). > > FWIW, there is quite a bit of unhappiness around sslmode=prefer, see > for example this thread: > https://www.postgresql.org/message-id/flat/2A5EFBDC-41C6-42A8-8B6D-E69DA60E9962%40eggerapps.at > > I do not know if we can come up with a better answer, but I'd caution > you against thinking that that's a problem-free model to emulate. Understood. We have the slight simplification for GSSAPI of having mutual authentication always (i.e., no need to worry about unauthenticated-but-encrypted connections). My personal view is that we want to try for as much security as we can without breaking anything [0]. If a user knows that they want a specific security, they can set "require"; if they don't want it, they can set "disable". Setting "require" as the default breaks one class of users; setting "disable" another. And I don't think we can punt the problem to the user and make it a mandatory parameter, either. I'm absolutely open to suggestions for how we could do better here, especially since we're adding support for something new, but having read the thread you mention I don't immediately see a superior design. 0: For what it's worth, I also don't agree with the assertion that having the ability to fallback to plaintext from tampering makes the attempt at encryption useless; rather, it still foils a passive adversary, even if it doesn't do anything against an active one. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJXl47HAAoJECUy+RdqlaRCRrQP/i2Qy4oe6fLyETfDXysnwGrg JuLELp0bucAL+TvTYeQBJlw9MlKIvcnXmVKRMesWVPMUsb8WiZt/u5OflyCsSuAI hgeoslnpoplT7SExpstOWfFHIH9aJB9pAbhNhW/EVm6WnRDHN553Z+qPWkbnkxUl CR4FPjAB3W9slEpc/aLl8MjtGcfUCq+WT+MYIK+U1HAgFGwpdYOf0O/6CZa92HB4 9SIG0XWZnL803nxPfbwIr+qC5v57jpqG7SDZgTKU2+xL8B5DyNftSCkC7h3cDEIc 4WODuB45kor7f/EGe7WvdalNLsHhGVZTSgq48K+BvSRtEGtjFNsrngOunaM74l1H pHlitTv4xQXZmRR+UxHk0UaMUHqHQ48uY8oEBn0gGoa4jdGGN9FSHziS3PHYfdRA iLIHhB+nXOrZpmk1VdfxPrE0oK30rpr4rYdeDZFf8N90kJsbFtKOPspXcNm1rnZ3 nBreoB7NJD1wz6NBecTnIta5lUwkd7LbqvUPETpoET64UeGWa9eoekskfWIl+7Gg nJdWtR9LE2hrv+kij7NUF3aMwJT9tJsdeEFSRPInzMqHJNLIxpOGqbylUVRsn8aj d5vy2czWATvb5qDJvKWDiJdZPPz4Z5DFRJVs5K6o7kxGrp1I+h8oW+R28tqSC8me UmsGuOK09affEXjNb1P0 =0T1Q -----END PGP SIGNATURE----- --=-=-=--