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 1gtdoX-0001Qk-Cf for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Feb 2019 19:33:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gtdoU-00047u-IV for pgsql-hackers@arkaria.postgresql.org; Tue, 12 Feb 2019 19:33:50 +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 1gtdoU-00047n-B3 for pgsql-hackers@lists.postgresql.org; Tue, 12 Feb 2019 19:33:50 +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 1gtdoO-0003rs-3L for pgsql-hackers@postgresql.org; Tue, 12 Feb 2019 19:33:49 +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 64D3412E4F0; Tue, 12 Feb 2019 19:33:41 +0000 (UTC) Received: from localhost (ovpn-112-77.rdu2.redhat.com [10.10.112.77]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2334619489; Tue, 12 Feb 2019 19:33:41 +0000 (UTC) From: Robbie Harwood To: Stephen Frost Cc: pgsql-hackers@postgresql.org, Nico Williams , Michael Paquier , Alvaro Herrera , David Steele Subject: Re: [PATCH v20] GSSAPI encryption support In-Reply-To: <20190212191731.GS6197@tamriel.snowman.net> References: <20190211125335.GN6197@tamriel.snowman.net> <20190212014105.GO6197@tamriel.snowman.net> <20190212191731.GS6197@tamriel.snowman.net> Date: Tue, 12 Feb 2019 14:33:34 -0500 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.38]); Tue, 12 Feb 2019 19:33:41 +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: > * Robbie Harwood (rharwood@redhat.com) wrote: >> Stephen Frost writes: >>> * Robbie Harwood (rharwood@redhat.com) wrote: >>>> Stephen Frost writes: >>>>> * Robbie Harwood (rharwood@redhat.com) wrote: >>>>> >>>>>> Attached please find version 20 of the GSSAPI encryption support. >>>>>> This has been rebased onto master (thanks Stephen for calling out >>>>>> ab69ea9). >>>>> >>>>> I've looked over this again and have been playing with it >>>>> off-and-on for a while now. One thing I was actually looking at >>>>> implementing before we push to commit this was to have similar >>>>> information to what SSL provides on connection, specifically what >>>>> printSSLInfo() prints by way of cipher, bits, etc for the >>>>> client-side and then something like pg_stat_ssl for the server >>>>> side. >>>>> >>>>> I went ahead and added a printGSSENCInfo(), and then >>>>> PQgetgssSASLSSF(), which calls down into >>>>> gss_inquire_sec_context_by_oid() for GSS_C_SEC_CONTEXT_SASL_SSF to >>>>> get the bits (which also required including gssapi_ext.h), and now >>>>> have psql producing: >>>>=20 >>>> While I (a krb5 developer) am fine with a hard MIT dependency, the >>>> project doesn't currently have this. (And if we went that road, >>>> I'd like to use gss_acquire_cred_from() instead of the setenv() in >>>> be-secure-gssapi.c.) >>> >>> We certainly don't want a hard MIT dependency, but if it's following >>> an RFC and we can gracefully fall-back if it isn't available then I >>> think it's acceptable. If there's a better approach which would >>> work with both MIT and Heimdal and ideally is defined through an >>> RFC, that'd be better, but I'm guessing there isn't... >>=20 >> While I think the concept of SASL SSF is standardized, I don't think >> the semantics of this OID are - the OID itself is in the MIT gssapi >> extension space. > > We can adjust for that pretty easily, presumably, if another OID ends > up being assigned (though if one already exists, isn't it something > that Heimdal, for example, could potentially decide to just > support..?). Yes, exactly - Heimdal would probably just use the MIT OID with the existing semantics. Thanks, =2D-Robbie --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEA5qc6hnelQjDaHWqJTL5F2qVpEIFAlxjH44ACgkQJTL5F2qV pEKRRhAArDXrr6JcS9OOA7zgAFWHu7LsYFkOCQEZC815h/e49wvR8LghC6vO1ByV MhuhaBR3NY8rGbrqeg94YzP4Z3Dd08j/ELcePGJ/apWcntcnr/2fpUhbr+Mv+dF5 WosVTmmSpZYqetVQ6e9aDSwcx4naQIOrlQLQTReNMj0PAipIsWsFDIArnlutUXnL setF9p11MyXO3vbLM+99Ft+6jLvtI1Geh8d6wE60sTVfgfvryrd6cti09akcEOhT zAJf1+A0IReyEw14g5qtGpmizp/SB+HKTxY/LcYLyqQ8u2NIJ/ZxWIiCABsywgB/ eqSroiaUXgFgLEam7IOcZHZeZl6fHksy1jfvGGPD1PDqzHYj4+ML6m163H/V7VFb o4woBYaMar596mBTZr11Gj9kxD3DEpe0oHlm9Y5kJ5ldHZ3/L5WdhxXoHBZas5yt v92pO45apnF/8zSQQakTOM+BZDKikzhUYhQfb0zlC//RbKn4ZGrqqHA50auZrS6k U+DA8BBwuo9xzM7mHkE7BeVyhGL5bm+rJktfUuji2pwQpAFwu8Xw3yGAuhVurp/J 1py6VIgYtRT/LOC3auGSyyYbegJ4cN5nZ0M6mLJFObfVLQGjNw+UXQc2/e/uk5w6 UbOx+F+yv2rQZHy+qTf4GxkkdFBwAdA008UI1Ad/jfUDpec/TpM= =Z91z -----END PGP SIGNATURE----- --=-=-=--