Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 00D58632516 for ; Wed, 14 Jul 2010 19:28:10 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 41578-05 for ; Wed, 14 Jul 2010 22:28:01 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from tamriel.snowman.net (tamriel.snowman.net [72.66.115.51]) by mail.postgresql.org (Postfix) with ESMTP id F3A846323FF for ; Wed, 14 Jul 2010 19:28:01 -0300 (ADT) Received: by tamriel.snowman.net (Postfix, from userid 1000) id AADE222186; Wed, 14 Jul 2010 18:28:00 -0400 (EDT) Date: Wed, 14 Jul 2010 18:28:00 -0400 From: Stephen Frost To: Tom Lane Cc: Magnus Hagander , Christopher Head , pgsql-bugs Subject: Re: BUG #5559: Full SSL verification fails when hostaddr provided Message-ID: <20100714222800.GS21875@tamriel.snowman.net> References: <6811.1279123338@sss.pgh.pa.us> <7342.1279124972@sss.pgh.pa.us> <20100714173942.GM21875@tamriel.snowman.net> <9371.1279130114@sss.pgh.pa.us> <20100714183240.GO21875@tamriel.snowman.net> <10950.1279135209@sss.pgh.pa.us> <20100714212805.GP21875@tamriel.snowman.net> <18347.1279143321@sss.pgh.pa.us> <20100714214403.GQ21875@tamriel.snowman.net> <18779.1279144684@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="iVxl/8PVUjdd01cj" Content-Disposition: inline In-Reply-To: <18779.1279144684@sss.pgh.pa.us> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/2.6.26-1-amd64 (x86_64) X-Uptime: 18:08:39 up 321 days, 9:33, 34 users, load average: 0.02, 0.09, 0.08 User-Agent: Mutt/1.5.18 (2008-05-17) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201007/110 X-Sequence-Number: 27454 --iVxl/8PVUjdd01cj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline * Tom Lane (tgl@sss.pgh.pa.us) wrote: > Hm. That might happen to work for Kerberos, but it won't work for > GSSAPI or SSPI --- in both those code paths we just push the host name > literally into a constructed principal string. Not sure if we really > want Kerberos to work differently from the more modern alternatives. I'm not looking at the code right now, but I just don't see how this can be the case, at least for GSSAPI. I routinely use both krb5 and GSSAPI auth types (depending on which server I'm using) with values passed to -h that certainly aren't the FQDN of the host, and it works just fine. I can't imagine we're doing some magic here ourselves and then passing the right FQDN to the Kerberos/GSSAPI libraries. Typical usage, all of them work: vardamir/8.2: psql -h 172.18.148.10 -d gis psql -h vardamir -d gis psql -h vardamir.tsf.noblis.org -d gis beren/8.3: psql -h beren -d gis psql -h 172.18.148.12 beren/8.4: psql --cluster 8.4/main -h beren -d gis psql --cluster 8.4/main -h 172.18.148.12 psql --cluster 8.4/main -h beren.nicc.noblis.org -d gis beren:/home/sfrost> hostname --fqdn beren.tsf.noblis.org I always get a postgres/beren.tsf.noblis.org@TSF.NOBLIS.ORG ticket, for that server, since that's what the rDNS is, and that's what's in the KDC (it hasn't got entries for any of the others). In any case, let's please make sure not to break that. :) Thanks! Stephen --iVxl/8PVUjdd01cj Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkw+OfAACgkQrzgMPqB3kigmTACfUtXQrCRctliddQlh5lBCSDas 0yUAn1+UEsIM3IKHb3rZd725hdVav7AY =nIpY -----END PGP SIGNATURE----- --iVxl/8PVUjdd01cj--