Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iF3NC-0000wl-AQ for pgsql-committers@arkaria.postgresql.org; Mon, 30 Sep 2019 21:38:26 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1iF3N9-0005xi-JI for pgsql-committers@arkaria.postgresql.org; Mon, 30 Sep 2019 21:38:23 +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_SHA1:256) (Exim 4.89) (envelope-from ) id 1iF3N9-0005xU-7W for pgsql-committers@lists.postgresql.org; Mon, 30 Sep 2019 21:38:23 +0000 Received: from mail-pg1-x542.google.com ([2607:f8b0:4864:20::542]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1iF3N6-0004ke-Ga for pgsql-committers@lists.postgresql.org; Mon, 30 Sep 2019 21:38:22 +0000 Received: by mail-pg1-x542.google.com with SMTP id a3so8052975pgm.13 for ; Mon, 30 Sep 2019 14:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=j-davis-com.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :mime-version:content-transfer-encoding; bh=DAseS6daRJc9K+fTQjxJg+oWOvjoMTO3szx6flLYOco=; b=TU2SDNoH9zb/3yXkpgiS7G7xYxf33Ph81j4pLA2lFdydoL9avFZsT3Wna2xzzVrtOv MMWYzOARotpwIwEzySPcYxE4xBqcmQZ5Y+csaSvYfv8rA/rbuNFcxPFZt0fXILGM8CvA K6Fp1N5/pU7gRPQShz0bzLNi2Yy3dcuWczfzfhNl0de+d6twUqH4CgZBDxH67oi3lk21 xT58tbef5/rBBINOEj2TjehlPBFbsNsxiQ9T5tIxknf9o8Qvm27lZtLOPtSOqWhSimqG 8LrLGRGK4t0xltVov72tokEefD18y3uigym3eu3t+iuThl4a66qdty4M1QGB+diDaNda XPSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:mime-version:content-transfer-encoding; bh=DAseS6daRJc9K+fTQjxJg+oWOvjoMTO3szx6flLYOco=; b=EA4j6xXzmcEjG+ERHvumQ28Z3T6U2tWiwICZq1oIwICZaU0zxFdxwfmHY3cVViqqMf tP2YwtIZ08NW+btv+Mc1gBGtDAZeVDf3D6mvqwU7J+1as2I8AOq9tHWtZuMXfvRvxwYK miZiCu10R9sUIVKdDgh6P/xM0SKVefY1cdfKiFftTJZ8pUKeigofiIewMxEiRBiiBYZf wUbO645FdbaF7PfHypJBaPTP4qiDMCNjjPeQWgHR508XN6J2XjgkfmW6rUH9iMXqnun5 X0GTjFeSTNas0pD9+wWY6WaNc9pcjmWMeO0WY34+y6gmhBWnqnkZvUcU+Wd1IsbSNSLv bI3Q== X-Gm-Message-State: APjAAAX1UfXXEq3VlwsHtf1mWk3A9fzz1Y88hBTL/AFpeAF2AmpcwJlp 46ePii3Vxs7WQBeuDvp+x8Mmdw== X-Google-Smtp-Source: APXvYqygD9YlRYnG7yIxQIEpfPcEM5TUhfafv4ISBhT5V7iPKQb0Y7msK3M7GwqHzTjFRH14hGJ/DQ== X-Received: by 2002:a63:2aca:: with SMTP id q193mr26202392pgq.156.1569879498299; Mon, 30 Sep 2019 14:38:18 -0700 (PDT) Received: from jdavis ([2600:1010:b02d:cd92:25e1:7cf5:b073:d9f8]) by smtp.gmail.com with ESMTPSA id g24sm21406687pgn.90.2019.09.30.14.38.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Sep 2019 14:38:17 -0700 (PDT) Message-ID: <55c81610cba6bcc5289268ae46c686cabc439a0f.camel@j-davis.com> Subject: Re: pgsql: Add libpq parameter 'channel_binding'. From: Jeff Davis To: Michael Paquier , Tom Lane Cc: Jeff Davis , pgsql-committers@lists.postgresql.org Date: Mon, 30 Sep 2019 14:38:14 -0700 In-Reply-To: <20190930070826.GM2888@paquier.xyz> References: <24857.1569775891@sss.pgh.pa.us> <20190929234733.GA2888@paquier.xyz> <20190930064539.GK2888@paquier.xyz> <20190930070826.GM2888@paquier.xyz> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Mon, 2019-09-30 at 16:08 +0900, Michael Paquier wrote: > So, something like the attached looks better to me. Using a server > which publishes SCRAM-SHA-256-PLUS, I get the following over SSL: > 1) client supports channel binding: > 1-1) channel_binding = disable => OK, with SCRAM-SHA-256 > 1-2) channel_binding = prefer => OK, with SCRAM-SHA-256-PLUS > 1-3) channel_binding = require => OK, with SCRAM-SHA-256-PLUS > 2) client does not support channel binding > 2-1) channel_binding = disable => OK, with SCRAM-SHA-256 > 2-2) channel_binding = prefer => OK, with SCRAM-SHA-256 > 2-3) channel_binding = require => failure with new error message, > instead of the confusing one. > > The bug is with 2-3, and Tom's suggestion would have switched 2-2 to > a > failure (2-2 works on HEAD). Looks good to me, though I think you need to update the expected error message in the test you just added. Regards, Jeff Davis