Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cupx7-0000bl-QT for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 00:34:38 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cupx7-000658-6y for pgsql-jdbc@arkaria.postgresql.org; Mon, 03 Apr 2017 00:34:37 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cupx6-00064g-GV for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 00:34:36 +0000 Received: from mail-wr0-x229.google.com ([2a00:1450:400c:c0c::229]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cupx3-0001oO-Ha for pgsql-jdbc@postgresql.org; Mon, 03 Apr 2017 00:34:35 +0000 Received: by mail-wr0-x229.google.com with SMTP id l43so148679410wre.1 for ; Sun, 02 Apr 2017 17:34:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=8kdata-com.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=NiNTpW3yMDwABGsPLulrEQ8WqKbzwyUKRjfxWH6ykmg=; b=YLuJLqiYbDpt8KANGQgpYXkaYGvWz71NmcCAsf1sJzngkSLA8ER75qSWn1mlVI+YS+ PMUI1ggU+3dgoo6TZqlkY42f9rYEvATLKf1zTyzJ9VmQ3hY88VwfZ/ZGrAeESMunrr5m fLSTrCcGNBKW5hBpONVebg6fRZ161fbuQn8svnV+YAj23uZCubB05SAwdVdblhBGOtWH P84AI1f8vaFfzrf2rVP6qHUDtd6x67cTU9iAKWu5YMiCdnwGcPo0VBzG0J2r/9FPAWAA 3BdG2bD+rs5Hp4I6DYurB67rYIek98smaNaYfoeplI6Ib3GxuCoccf8kaxQEhJtqbk18 47fQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=NiNTpW3yMDwABGsPLulrEQ8WqKbzwyUKRjfxWH6ykmg=; b=Xbg0fN91/dzfBS9z1aVgILx62psdK/QvQS3U1TluQ/2ibV3UKRxqN8zwp5nWjTtKoD F6q7UTMPmXn/Q6EOep1ettlUMEMoqqyo0bjxg4689yii1bQ6IExiDCi3L4z8dknsukqv BJ/iCcuwpdQjZKDpO3mkJBll6CndzIqXz5noot6X32EXcHrnCp8htIK0ZwdYPOoIqbBh CKdC6IRcJVyKI46nrAMon732b5RJICfIpgYC6cvS60+HwB3M9Z7ji8XqdkllyvaP3z1N Cbnu2pOt1PYOlZH4yHDKx0X7n2/jZMeOR+b1B1vTEcMH+4l3tRTZEF2K0zMexeceOWfq 97lA== X-Gm-Message-State: AFeK/H0iVyO4ZR8W7dsXujrEi1sXOC1jGWwU6apKVASbPTWck69a/Plt12uvhBhUytzB9w== X-Received: by 10.28.61.198 with SMTP id k189mr7477100wma.71.1491179672209; Sun, 02 Apr 2017 17:34:32 -0700 (PDT) Received: from [192.168.1.130] (148.126.218.87.dynamic.jazztel.es. [87.218.126.148]) by smtp.gmail.com with ESMTPSA id e129sm12105775wma.13.2017.04.02.17.34.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Apr 2017 17:34:31 -0700 (PDT) Subject: Re: SCRAM inplementation To: Michael Paquier References: <47f0171d-6d34-fc12-2849-fd157d69925b@8kdata.com> Cc: Dave Cramer , List From: =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= Message-ID: Date: Mon, 3 Apr 2017 02:34:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -1.1 (-) 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 03/04/17 02:28, Michael Paquier wrote: > On Mon, Apr 3, 2017 at 1:05 AM, Álvaro Hernández Tortosa 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