Re: [JDBC] Channel binding support for SCRAM-SHA-256

From: Álvaro Hernández Tortosa <aht(at)8kdata(dot)com>
To: Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Stephen Frost <sfrost(at)snowman(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, PostgreSQL JDBC List <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: [JDBC] Channel binding support for SCRAM-SHA-256
Date: 2017-05-31 01:50:26
Message-ID: 49413008-40a0-3223-e957-c10d882e5119@8kdata.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-jdbc

On 31/05/17 03:39, Michael Paquier wrote:
> On Tue, May 30, 2017 at 5:59 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
>> That sounds like undue optimism to me. Unless somebody's tested that
>> Michael's proposed implementation, which uses undocumented OpenSSL
>> APIs, actually interoperates properly with a SCRAM + channel binding
>> implementation based on some other underlying SSL implementation, we
>> can't really know that it's going to work. It's not like we're
>> calling SSL_do_the_right_thing_for_channel_binding_thing_per_rfc5929().
>> We're calling SSL_do_something_undocumented() and hoping that
>> something_undocumented ==
>> the_right_thing_for_channel_binding_thing_per_rfc5929. Could be true,
>> but without actual interoperability testing it sounds pretty
>> speculative to me.
> Hm? Python is using that stuff for a certain amount of years now, for
> the same goal of providing channel binding for SSL authentication. You
> can look at this thread:
> https://bugs.python.org/issue12551
> So qualifying that as a speculative method sounds a quite hard word to me.

Actually this Python patch seems to ultimately rely on the same
OpenSSL functions as your implementation.

I don't have anything against implementing tls-unique, specially as
per the RFC it is mandatory (if channel binding support is provided).
However, given the use of undocumented API, given that at least the Java
driver would have a very difficult time implementing it (basically
replacing Java's standard SSL stack with a completely external one,
BouncyCastle, which adds load, size and complexity), I would rather
focus the efforts on tls-server-end-point which only needs to access the
certificate data, something that most APIs/frameworks/languages seem to
cover much more naturally than tls-unique.

Both are equally safe and effective and so having support for both
seems sensible to me.

Álvaro

--

Álvaro Hernández Tortosa

-----------
<8K>data

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Craig Ringer 2017-05-31 02:27:11 Re: pg_config --version-num
Previous Message Michael Paquier 2017-05-31 01:45:39 Re: TAP backpatching policy

Browse pgsql-jdbc by date

  From Date Subject
Next Message Stephen Frost 2017-05-31 03:49:41 Re: [HACKERS] Channel binding support for SCRAM-SHA-256
Previous Message Michael Paquier 2017-05-31 01:39:52 Re: [JDBC] Channel binding support for SCRAM-SHA-256