Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dGTRb-0007ty-OJ for pgsql-jdbc@arkaria.postgresql.org; Thu, 01 Jun 2017 16:59:31 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dGTRb-0001ia-BD for pgsql-jdbc@arkaria.postgresql.org; Thu, 01 Jun 2017 16:59:31 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dGTR4-0007Py-Le for pgsql-jdbc@postgresql.org; Thu, 01 Jun 2017 16:58:58 +0000 Received: from mail-wm0-x229.google.com ([2a00:1450:400c:c09::229]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dGTQx-00059Q-Gf for pgsql-jdbc@postgresql.org; Thu, 01 Jun 2017 16:58:57 +0000 Received: by mail-wm0-x229.google.com with SMTP id d127so68135162wmf.0 for ; Thu, 01 Jun 2017 09:58:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=8kdata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=Kww1r0ili0iQfwQ8MnfoZkCjsrUAdAiRvSPkA7qNfls=; b=kM82NlWYEpyR8D/IYFakm3Ar+asdQb5H/yNB79jDdLhaYj0UpgIRmFyrUgc+P9XbqB EPO2csadclrW5OwUCjlfjNHOIrXJXeu3Acbysnx6v309Awu3vsI1cfvbkrr0O3CtiMlp Mj2dByTdxwYvaPLzoMkXhi/ftTKf0ZcldbKG62EuV6c1/IPTgdbI/oGW+vvkFgmuYq9l uxDCYHEa1qPWLmuVJ60lFpvUTgnqxiLezuPspWX42u4YuaIVz3qkRXc934ml7Do7163K x4Gobbtsym02bv1ncQ3FM6aj0fF2XweNnWAiZA5UQ9HULa8B2fWgmvF+X1V1quL/DDUE 0FMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Kww1r0ili0iQfwQ8MnfoZkCjsrUAdAiRvSPkA7qNfls=; b=PIvmr99HDVveybHIOxd1+xVS8c2kHtSFwc8uGqnxOht7o/ur+Xzk8InD4+mZHsBY2t XnnHp3Z7s2mfBZNnAlRkj02RMuwaA7kjma/2YOPdlxk+SGwPk+zendFXu5RYnxY8vOW1 Iqtpv1qkiBpLMIZEDMjGaiG+Xr/pjNJhqUxJf2dgxUDaWDP28ihjoLDM2PhTFsJn+Y2R F6i22gpFpCm1ux+JPG+nKWpxQBONfaudSqzR3MlifdzsjnaLZmw+Mqy27EmdWUH3DaQC lC1DMpEPW/kRJ272uEWq8sgOWUJ2IlUozcM/Ql9/dZa9qTWhD3iP79jOW101nR/aOYBP IW6w== X-Gm-Message-State: AODbwcB7nU4dy836aN2sOne/OzPO3KAVFO8RCMbOdIf+AF1AVN+Q7DcS 9WFltIiJcKUkjS0RgbQmmw== X-Received: by 10.28.92.130 with SMTP id q124mr114036wmb.21.1496336329789; Thu, 01 Jun 2017 09:58:49 -0700 (PDT) Received: from [10.0.10.100] (254.red-79-155-7.dynamicip.rima-tde.net. [79.155.7.254]) by smtp.gmail.com with ESMTPSA id o49sm18309939wrb.47.2017.06.01.09.58.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2017 09:58:49 -0700 (PDT) Subject: Re: [HACKERS] Channel binding support for SCRAM-SHA-256 To: Stephen Frost , Robert Haas Cc: Michael Paquier , Tom Lane , "pgsql-hackers@postgresql.org" , PostgreSQL JDBC List References: <13406.1496155822@sss.pgh.pa.us> <20170530151432.GW3151@tamriel.snowman.net> <20170530170036.GZ3151@tamriel.snowman.net> <20170531034941.GH3151@tamriel.snowman.net> <20170531235922.GR3151@tamriel.snowman.net> <20170601155042.GG3151@tamriel.snowman.net> From: =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= Message-ID: <39682d9b-312b-170b-e39f-99be7cf7c897@8kdata.com> Date: Thu, 1 Jun 2017 18:58:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: <20170601155042.GG3151@tamriel.snowman.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US X-Pg-Spam-Score: -1.8 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org On 01/06/17 17:50, Stephen Frost wrote: > Robert, > > * Robert Haas (robertmhaas@gmail.com) wrote: >> On Wed, May 31, 2017 at 7:59 PM, Stephen Frost wrote: >>> If your comments regarding the requirement that we have interoperability >>> testing of this feature before accepting it were intended to mean that >>> we need to make sure that the JDBC driver is able to work with the >>> chosen solution (or, perhaps, that we support multuple options, one of >>> which works with the JDBC changes), and that we review the other TLS >>> libraries with the goal of making sure that what we agree on in core >>> should work with those also, then that's great and exactly what I'd like >>> to see also. >> OK, great. That's what I mean (mostly - see below). > Glad to hear it. > >>> If your comments regarding the requirement that we have interoperability >>> testing of this feature before accepting it were intended to mean that >>> we must have a complete alternative TLS solution, while that would >>> actually play a great deal to a goal I've had for a while to have PG >>> support multiple TLS implementations (LibNSS being top-of-mind, at least >>> for me, as I've mentioned a couple times), I can't agree that we should >>> require that before accepting channel binding as a feature. To do so >>> would be akin to requiring that we support multiple TLS implementations >>> before we agreed to support client-side certificates, in my opinion. >> I don't think that we need to have a committed patch allowing multiple >> SSL implementations before we accept a patch for channel binding, but >> I think it might be a good idea for someone to hack either libpq or >> the server enough to make it work with some other SSL implementation >> (Windows SSL would probably be the best candidate) and test that what >> we think will work for channel binding actually does work. It >> wouldn't need to be a committable patch, but it should be enough to >> make a successful connection in the laboratory. Now, there might also >> be other ways besides that of testing that interoperability is >> possible, so don't take me as being of the view that someone has to >> necessarily do exactly that thing that I just said. But I do think >> that we probably should do more than say "hey, we've got this >> undocumented SSL API, and this other Windows API, and it looks like >> they do about the same thing, so we're good". There's sometimes a big >> difference between what sounds like it should work on paper and what >> actually does work. > I certainly wouldn't object to someone working on this, but I feel like > it's a good deal more work than perhaps you're realizing (and I tend to > think trying to use the Windows SSL implementation would increase the > level of effort, not minimize it). Perhaps it wouldn't be too bad to > write a one-off piece of code which just connects and then returns the > channel binding information on each side and then one could hand-check > that what's returned matches what it's supposed to based on the RFC, but > if it doesn't, then what? In the specific case we're talking about, > there's two approaches in the RFC and it seems like we should support > both because at least our current JDBC implementation only works with > one, and ideally we can allow for that to be extended to other methods, > but I wouldn't want to implement a method that only works on Windows SSL > because that implementation, for whatever reason, doesn't follow either > of the methods available in the RFC. To make things even more complicated, I think the RFC is not helping very much, as the definition is not very clear itself: " Description: The first TLS Finished message sent (note: the Finished struct, not the TLS record layer message containing it) in the most recent TLS handshake of the TLS connection being bound to (note: TLS connection, not session, so that the channel binding is specific to each connection regardless of whether session resumption is used). If TLS renegotiation takes place before the channel binding operation, then the first TLS Finished message sent of the latest/ inner-most TLS connection is used. Note that for full TLS handshakes, the first Finished message is sent by the client, while for abbreviated TLS handshakes (session resumption), the first Finished message is sent by the server. " https://tools.ietf.org/html/rfc5929#section-3.1 If you read further, it becomes even less clear what it is and that if there are re-negotiations, it gets more complicated. Server-end-point is kind of better specified: " The hash of the TLS server's certificate [RFC5280] as it appears, octet for octet, in the server's Certificate message. " Álvaro -- Álvaro Hernández Tortosa ----------- <8K>data -- Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-jdbc