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 1plCvl-0001l1-LW for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Apr 2023 18:04:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1plCvk-0004MA-GG for pgsql-hackers@arkaria.postgresql.org; Sat, 08 Apr 2023 18:04:52 +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 1plCvj-0004M1-SD for pgsql-hackers@lists.postgresql.org; Sat, 08 Apr 2023 18:04:52 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1plCvg-001g6b-3z for pgsql-hackers@lists.postgresql.org; Sat, 08 Apr 2023 18:04:51 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id BC6B45F7B6; Sat, 8 Apr 2023 14:04:41 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=snowman.net; s=dkim; t=1680977081; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mXUissSdvf7c+fstIdHO4NDzA9YibQBgteB03GFuUWg=; b=FAa9sY2hxVa2BjzjmKTxY6fxJMa3d/wCUoUXnP8Z6LQVAPjMyIZJcgXTS0aeQJgAeytb9t jm1NKhcEzvPWgvwbU+18oP89z5YIp2iaWuBPP+lYY0/Cc0ex5MWEj+SlurrqMjSXuo5Sau OmjKVJ0y4xnCNH1saUpHoYEWuZZbcdU= Date: Sat, 8 Apr 2023 14:04:41 -0400 From: Stephen Frost To: Tom Lane Cc: pgsql-hackers@lists.postgresql.org Subject: Re: longfin missing gssapi_ext.h Message-ID: References: <3282942.1680920692@sss.pgh.pa.us> <3284314.1680921096@sss.pgh.pa.us> <3286097.1680922218@sss.pgh.pa.us> <3311389.1680927614@sss.pgh.pa.us> <3598083.1680976022@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="THBpSBoye4FuL1LY" Content-Disposition: inline In-Reply-To: <3598083.1680976022@sss.pgh.pa.us> User-Agent: Mutt/2.1.4 (2021-12-11) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --THBpSBoye4FuL1LY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > I suspected there would be an issue with OSX but hadn't expected an > > issue with NetBSD. I had tested this across a few Linux platforms and > > cfbot showed it wasn't causing issues on Windows or the platforms that > > are run there. Would be really great to have a way to test these things > > out on these other platforms other than just committing them and seeing > > what happens on the buildfarm. >=20 > I poked around a bit more and found that: >=20 > * NetBSD's package collection[1] includes both Heimdal and MIT Kerberos > (mit-krb5). Apparently what's installed on at least some of the buildfarm > animals is the former. >=20 > * FreeBSD seems to offer *only* Heimdal [2]; OpenBSD ditto [3]. >=20 > * I cannot find any sign of either gss_store_cred_into or gssapi_ext.h > in FreeBSD's Heimdal (7.8.0_6). >=20 > So it does not look like supporting Heimdal is going to be optional, > and that means the credential delegation feature is going to have > to be optional, or else we need to find some equivalent Heimdal APIs. Thanks for doing that digging! I've been looking too and while Heimdal added gss_store_cred_into in their development branch 5 years ago[1] (!), it's not made it into an actual release. Good that they seem to at least be maintaining it enough to deal with CVEs, but unfortunately I'm fairly confident that there won't be a way to support constrained delegation (which is the next goal, once unconstrained delegation is in and working) on the Heimdal platforms. I suspected that would have to be optional anyway, but I hadn't expected it to hit all the BSD platforms. In any case, for this I'm working switching over to gss_store_cred() which does seem to be available in the Heimdal Debian packages that I was able to install locally (looks to be 7.7.0) and should work just fine for these purposes, though it requires a bit more work on the libpq side as we need to tell libpq explicitly the name which was on the delegated credential when we call gss_acquire_cred(). Once that's done, should be able to drop the gssapi_ext.h include entirely and still have the test suite able to run with MIT Kerberos. One thing I'm on the fence about is trying to make the test suite actually work with Heimdal.. I'm planning to install the Heimdal KDC, et al, and see what happens but if it ends up looking like it's a lot of work then I might forgo that effort. I'm not sure it's really necessary but I could be argued out of that position without too much effort. The stated Heimdal goal is to be a re-implementation of MIT Kerberos and these are all documented APIs with RFCs, after all. > I share your feeling that we could probably blow off Apple's built-in > GSSAPI. MacPorts offers both Heimdal and kerberos5, and I imagine > Homebrew has at least one of them, so Mac people could easily get > hold of newer implementations. But the BSDen are going to be a > problem. Yeah. Unfortunate that Heimdal doesn't seem to really be moving forward in terms of new development. Thanks, Stephen [1] https://github.com/heimdal/heimdal/commit/e0bb9c10cad0fd98245caecf8af8f= ca855b2df49 --THBpSBoye4FuL1LY Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEwf6gbxKhD863zrx/7WyKOINHZFUFAmQxrLYACgkQ7WyKOINH ZFX+2hAAwS6miXTvNumUWqFALHKGTylwgVYkIf/6nY22xeDV7FHHzqGWcMWJU0T1 VetqTrguR5GYvXgrzzxvj9bz/Q4QDswjFV+UbYqBeP1UAZYvhZYoB7cgmsVmk+tn x2umqu2TsQYqOl0dyt8pNdSh8DrUvQKlas35V075xgqra6niN2W5SkNkcXL+Farw 5swQn7/d0ortqaeeOt45FwhdSCTkgV3x0drbg9BmjhUCr/bKjujixHZtIHDvhpp/ syvXrhd486fJwwdv/EjpVER4tT7njWhY9Gf+RE7xXbfNgq8rihDbTrMFMFfE6jHJ oFVci3N0OiG5K3C54xzJkkwa7foOgwKdKDtm4RQCos2OFsOrkz5JL1VAADE3lG6g rZKGWDRF1F4vCBQ5wpA0h23rIXPe2EVP+Y03nPqkJDydt36VfIoMnf21FZ+ZLKU7 U3zrmqOAkPcMzSpRNSfMYqp+Y/2LfTNGOOF3uVo4MC4ImVsdClGRMFW3NcmNnC2E 191/SmYVORtE2ro4dR4HaZ7NIR5EXU9v7rfGs9Pa5KG9X2uc6En+91mJZtG5G5+H 7IKPThGd5oL8GtunWTbE374H/xWBU3o6iw+mO49oSOiVbRJi6j4TmOYzUvcHI4UH vzNv0SxjvRy51J6UBUk2lMia4kbGReVzUvL2e8Z1310BM4Rod5A= =FVDl -----END PGP SIGNATURE----- --THBpSBoye4FuL1LY--