pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Álvaro Hernández Tortosa <aht@8kdata.com>
To: Michael Paquier <michael.paquier@gmail.com>
Cc: Dave Cramer <davecramer@gmail.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: SCRAM inplementation
Date: Mon, 3 Apr 2017 02:34:30 +0200
Message-ID: <b9311d12-01ea-1386-464d-1fe204ce2bd1@8kdata.com> (raw)
In-Reply-To: <CAB7nPqQZtj=xb2L4EDObWZgh5VKOPrkAj9kqG5BB3Wqu_15rpQ@mail.gmail.com>
References: <CADK3HHJbfZQTe14T3Er-Wc1noQjnKngz3chyiXv82bNyUbF9UA@mail.gmail.com>
	<47f0171d-6d34-fc12-2849-fd157d69925b@8kdata.com>
	<CAB7nPqQZtj=xb2L4EDObWZgh5VKOPrkAj9kqG5BB3Wqu_15rpQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-jdbc>



On 03/04/17 02:28, Michael Paquier wrote:
> On Mon, Apr 3, 2017 at 1:05 AM, Álvaro Hernández Tortosa <aht@8kdata.com> wrote:
>> * Write both a client and server implementation. pgjdbc will only require
>> the former, of course, but having both will be great for testing.
> Doesn't JDBC require already a Postgres instance when testing? You
> could just rely on that.

     Needless to say, it will be tested against Postgres 10. But since I 
plan to develop it as a separate library external to pgjdbc, meant for 
general purpose use, it will have both client and server 
implementations. It has the added benefit of unit tests that do not have 
external and non-Java dependencies (like PostgreSQL).

>
>> * Do so as an independent library, also as an independent repository on
>> Github. This will help its reuse and testing by independent projects. I
>> presume it will have at least three different artifacts, a scram-common,
>> scram-server and scram-client. Only the latter will be directly imported as
>> a direct dependency by pgjdbc.
>> * The implementation will *not* provide support for message sending and/or
>> serialization. Only message generation and parsing (after all, messages are
>> only strings, so it's easy). This is meant to be easily reused, but will of
>> course require some glue code on the pgjdbc side.
>> * Channel biding will not be on the first version. It is not used in
>> PostgreSQL 10 either (as of today).
> Yep, this has been deferred for later versions. The protocol name with
> channel binding uses -PLUS as suffix, so that's no big deal from an
> implementation point of view to get that later on.

     Right.

>
>> * Both SHA-1 and SHA-256 will be implemented (yeah, I know about SHA-1
>> collision, but it's still an RFC and adding it is a one-liner so... I leave
>> the decision to the users). PG 10 will only ship with SHA-256, though,
>> AFAIK.
> We are not going to ship with SCRAM-SHA-1 anyway, so I would advise to
> just have no trace of it.

     Same as above: the idea is to have it as a general-purpose library. 
Maybe others want SHA-1. It is very simple to implement it, it adds no 
extra effort.

>
>> * First version will not implement SaslPrep (neither PG10 does). When it
>> will do.... I will probably do a separate repository for StringPrep/SaslPrep
>> code, as it is again of a very reusable nature outside of the SCRAM (and of
>> cours pgjdbc) projects.
> We'll see about that. I have a patch able to address the problem...

     Please let me know any further info :)

     Thanks,

     Á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



view thread (10+ messages)  latest in thread

Message-ID: <b9311d12-01ea-1386-464d-1fe204ce2bd1@8kdata.com>
Permalink:  ../b9311d12-01ea-1386-464d-1fe204ce2bd1@8kdata.com/
Also on:    postgresql.org/message-id/b9311d12-01ea-1386-464d-1fe204ce2bd1@8kdata.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: aht@8kdata.com, michael.paquier@gmail.com, davecramer@gmail.com
  Subject: Re: SCRAM inplementation
  In-Reply-To: <b9311d12-01ea-1386-464d-1fe204ce2bd1@8kdata.com>
  References: <CADK3HHJbfZQTe14T3Er-Wc1noQjnKngz3chyiXv82bNyUbF9UA@mail.gmail.com> <47f0171d-6d34-fc12-2849-fd157d69925b@8kdata.com> <CAB7nPqQZtj=xb2L4EDObWZgh5VKOPrkAj9kqG5BB3Wqu_15rpQ@mail.gmail.com> <b9311d12-01ea-1386-464d-1fe204ce2bd1@8kdata.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox