Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCQoc-0000g5-8K for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Apr 2019 15:31:38 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hCQoa-0005dJ-OV for pgsql-hackers@arkaria.postgresql.org; Fri, 05 Apr 2019 15:31:36 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCQoa-0005ar-EK for pgsql-hackers@lists.postgresql.org; Fri, 05 Apr 2019 15:31:36 +0000 Received: from mx1.redhat.com ([209.132.183.28]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hCQoW-0006wX-Um for pgsql-hackers@postgresql.org; Fri, 05 Apr 2019 15:31:36 +0000 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 30F5D2026D; Fri, 5 Apr 2019 15:31:29 +0000 (UTC) Received: from localhost (ovpn-112-54.rdu2.redhat.com [10.10.112.54]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5A7C71A7CA; Fri, 5 Apr 2019 15:31:28 +0000 (UTC) From: Robbie Harwood To: Stephen Frost , Peter Eisentraut Cc: Magnus Hagander , Joe Conway , Alvaro Herrera , David Steele , Michael Paquier , Nico Williams , PostgreSQL-development Subject: Re: [PATCH v20] GSSAPI encryption support In-Reply-To: <20190405124803.GO6197@tamriel.snowman.net> References: <20190405025925.GN6197@tamriel.snowman.net> <7d0584ab-26a8-6731-aeee-9c8e195533e6@2ndquadrant.com> <20190405124803.GO6197@tamriel.snowman.net> Date: Fri, 05 Apr 2019 11:31:25 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Fri, 05 Apr 2019 15:31:29 +0000 (UTC) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Stephen Frost writes: > * Peter Eisentraut (peter.eisentraut@2ndquadrant.com) wrote: >> On 2019-04-05 04:59, Stephen Frost wrote: >> >>> Alright, that over-size error was a bug in the error-handling code, >>> which I've just pushed a fix for. That said... >>=20 >> Yes, that looks better now. > > Great. > >>> This looks like it's a real issue and it's unclear what's going on >>> here. I wonder- are you certain that you're using all the same >>> Kerberos libraries for the KDC, the server, and psql? >>=20 >> Right, it was built against the OS-provided Kerberos installation >> (/usr/bin etc.). If I build against the Homebrew-provided one then >> the tests pass. > > All of it was built against the OS-provided Kerberos install, and you > got the failure..? > >> So maybe that means that this encryption feature is not supported on >> that (presumably older) installation? (krb5-config --version says >> "Kerberos 5 release 1.7-prerelease") Is that plausible? Is a gentler >> failure mode possible? Heimdal never had a 1.7 release - they went from 1.5.2 to 7.1.0. MIT did have a 1.7 release - in 2009. Apple doesn't open source their Kerberos implementation, so I can't exactly point a debugger at it. But if it's in fact somehow related to MIT 1.7-prerelease, I imagine they inherited a bug or two that's been fixed in the ten years since then. As for the code: I'm not doing anything complicated. The interface I'm using is as specified in RFC2743 and RFC2744, which is from 2000 (though I think technically I'm mostly backward compatible to RFC1509, from 1993), and Kerberos V5 itself is specified in RFC4120 (from 2005). > On a failure to set up an encrypted connection, we'll actually fall > back to a non-encrypted one, using GSSAPI *just* for authentication, > which is why I was asking if this worked before the encryption patch > went in. Also, which of the tests are still failing, exactly? The > authentication ones or the encryption ones or both? Good question. > If we determine that this is some issue with the MacOS-provided > Kerberos libraries, then we could try to detect them and disable > GSSAPI encryption in that case explicitly, I suppose, but I've seen > odd things with the MacOS-provided Kerberos libraries before on > released versions of PG (without any encryption support), so I'm not > yet convinced that this is an issue that's specific to adding support > for encryption. If we have to, a version check >1.7 would probably work. That'll remove the ability to work on RHEL/CentOS 5, but that's probably fine, and I'm not aware of any other supported OSs that would be impacted. Thanks, =2D-Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAlyndM0ACgkQJTL5F2qV pEJW9xAAmttIQy3iviXcAdaUjSJf0TUm9K22qxkgWt7IIpa7xS2KThqJrr89AgaW wZHYhfqLz+73wZjzpAI0Op15E4t+tsv6T2ic5nmAv85gEFHeQX4BkXF8XalypT6x G13hAbJOFbu0Kpg51aqI1gDG4abMC8YCaqE+L73Qc5RWb63vH1DkP3zGizDJ79k2 jsYhtIpYVcDY8WECV9pLz7vDtC0inZlJDt68ts+cUcibRSbpqHg3pqsVIL4n3PU1 2cKdEJhx12MUyQiOcSm5cTnQzOoFkwRk2iQAre11dLkv15asBvtySISyptl5IEJS a2mRmHlBWFHCvq0PVvdQBERXkDfjNkd89wfVgQGlvN/JfkpeQwb51Yf8aqJJjzrZ Jzll2J9IUpJr8+TWjFfRGrfhZKxmejn+dxrs1m78GsPEVPykYM069PK/uTU7kxUn fhznYR+aWVP5SRZCEjKvu4fa6hO2USFmunL95HG/2WNV6DD6Z3UAeTRtvIhLLACQ S+GwKO67Dg43RUL0hnv8B7jgEERenj0BkIIOFkQGXtQPIjWW7XgyiBVl6hs/rTJc id8hs8NGEvF4O/hN89IL+M4J4RaK3JMH4y1l5wxivWJcucgGY85mDPbFt8QxdUq8 y/BRLsfcwRaImWftber9p9AunIn4W+MbWzklyQHh/Fb49KCm6x0= =R8Av -----END PGP SIGNATURE----- --=-=-=--