Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dsXTY-0002zb-CB for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Sep 2017 16:58:52 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dsXTX-00079S-QT for pgsql-hackers@arkaria.postgresql.org; Thu, 14 Sep 2017 16:58:51 +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 1dsXTX-00079J-28 for pgsql-hackers@postgresql.org; Thu, 14 Sep 2017 16:58:51 +0000 Received: from out3-smtp.messagingengine.com ([66.111.4.27]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dsXTU-0004Jl-5l for pgsql-hackers@postgresql.org; Thu, 14 Sep 2017 16:58:49 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 8635F20B0C; Thu, 14 Sep 2017 12:58:45 -0400 (EDT) Received: from frontend1 ([10.202.2.160]) by compute7.internal (MEProxy); Thu, 14 Sep 2017 12:58:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=V+lXWs5xsRlH7KHXBEZfqymsKh/fcLWj8L6sozUUWQA=; b=Z7tPxarD RBcmzYIjM96/wxubQTQ4Ld+nm6v9SBYh75503C+Azs8tej7nugOs2VV/otZuesn0 NGuLae9bf96i6r/fsFpELbe8bTTdcnNSROvFyQEVTo3B51ZcAjAkEIDa1LoPZ6MO jSFj+F3GoHVD4z3i4SD29HByg1/x8X5LeVnL8Z2BZF/9ZZS5Wbthx/k6TIre3ty5 YHY0Nv/642KkwjvmGbEohGJM74H3FZ7+fzHh+tvB0S5ykWgSrO8jwL5kelII3FPd chHze4ToUh7WXHxjIZyt2mVmbPZaFtcY4ys/97PcDkLbzv9UYu2mkGeSsDtFDy4j 8yOhXdyPaYrmew== X-ME-Sender: X-Sasl-enc: skEryKwxHeSdlJX7XrsjfE0zT4TBx/LlUwXqvyaKoNtf 1505408325 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 235537F96B; Thu, 14 Sep 2017 12:58:45 -0400 (EDT) Subject: Re: [JDBC] Channel binding support for SCRAM-SHA-256 To: Michael Paquier References: <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> <20170602010826.GP3151@tamriel.snowman.net> <93ad98a7-5f0c-3153-6015-9376326c5cb7@2ndquadrant.com> Cc: Stephen Frost , Robert Haas , Tom Lane , =?UTF-8?Q?=c3=81lvaro_Hern=c3=a1ndez_Tortosa?= , "pgsql-hackers@postgresql.org" From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <11303406-ad5b-96c2-bcbe-3e3781519215@2ndquadrant.com> Date: Thu, 14 Sep 2017 12:58:44 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 9/12/17 19:03, Michael Paquier wrote: > Once channel binding is involved though.. This needs to be extended > and this needs careful thoughts: > * "scram-sha-256" means that the version without channel binding is > accepted. "!scram-sha-256" means that scram without channel binding is > refused. > * "scram-sha-256-plus" means that all channel bindings are accepted. > "!scram-sha-256-plus" means that no channel binding are accepted. > After that there is some filtering per channel binding name. Do we > want a separate parameter or just filter with longer names like > "scram-sha-256-plus-tls-unique" and > "scram-sha-256-plus-tls-server-end-point"? The last one gets > particularly long, this does not help users with typos :) Second thoughts, to make things simpler. All we need for channel binding is a connection flag that says "I require channel binding". It could be modeled after the sslmode parameter, e.g., cbind=disable (maybe for debugging), cbind=prefer (default), cbind=require. If you specify "require", then libpq would refuse to proceed unless scram-sha2-256-plus (or future similar mechanisms) was offered for authentication. We don't even need a parameter that specifies which channel binding type to use. If libpq implements tls-unique, it should always use that. We might need a flag for testing other types, but that should not be an in-the-user's-face option. -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers