Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 77B6A63274F for ; Wed, 14 Jul 2010 19:16:41 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 98254-09 for ; Wed, 14 Jul 2010 22:16:32 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id DEEF463267E for ; Wed, 14 Jul 2010 19:16:33 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id o6EMGUCx019144; Wed, 14 Jul 2010 18:16:31 -0400 (EDT) To: Stephen Frost cc: Magnus Hagander , Christopher Head , pgsql-bugs Subject: Re: BUG #5559: Full SSL verification fails when hostaddr provided In-reply-to: <20100714215020.GR21875@tamriel.snowman.net> References: <18252.1279058967@sss.pgh.pa.us> <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> <20100714215020.GR21875@tamriel.snowman.net> Comments: In-reply-to Stephen Frost message dated "Wed, 14 Jul 2010 17:50:20 -0400" Date: Wed, 14 Jul 2010 18:16:30 -0400 Message-ID: <19143.1279145790@sss.pgh.pa.us> From: Tom Lane 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/109 X-Sequence-Number: 27453 Stephen Frost writes: > Perhaps I was being a bit overzealous in my last response, sorry about > that. If the point here is that people who are using hostaddr are in an > environment where DNS is non-functional or actively broken, then yes, > just bombing out would probably be fine. Well, if your environment includes broken DNS then you are clearly going to get nowhere anyway with Kerberos auth, no? The point of hostaddr is *not* to try to avoid that problem. Rather, it's to allow the application to shift the time expense of the forward DNS lookup to some other place than its PQconnect() call. If you've got an app where the cost of PQconnect() is that critical, you're likely going to want to avoid Kerberos auth anyway, so I don't think it's all that important exactly how the two features play together. As the code stands in HEAD, I think everything is nicely self-consistent: host is what we believe the server name is for authentication purposes, and hostaddr is an optional pre-looked-up address corresponding to that. There is nothing in this suggesting that we should be expected to try to generate an authentication name from hostaddr alone. In particular, the fact that Kerberos is capable of trying to do that is at odds with the other three code paths where the server name is needed for authentication. I don't feel any need to expose Kerberos' peculiarity here. regards, tom lane