Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1d0Ly3-0005sr-QJ for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Apr 2017 05:46:24 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1d0Ly3-0003Ea-DI for pgsql-hackers@arkaria.postgresql.org; Tue, 18 Apr 2017 05:46:23 +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 1d0LwW-0007kc-0Y for pgsql-hackers@postgresql.org; Tue, 18 Apr 2017 05:44:48 +0000 Received: from mail-pg0-x22c.google.com ([2607:f8b0:400e:c05::22c]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1d0LwQ-0000w7-SE for pgsql-hackers@postgresql.org; Tue, 18 Apr 2017 05:44:46 +0000 Received: by mail-pg0-x22c.google.com with SMTP id z127so18704369pgb.1 for ; Mon, 17 Apr 2017 22:44:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=leadboat.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=WJZZb6r7FyllHVv5HlbsO8XwQr9NN+2C9PDIv8qjksU=; b=V3HKgJ9qqvguVg3IDD3Tidv1K/2jZBZiMKVJ/xdr6PSisQAoS2Cr4PfpLQP344iRmI p0uWBlfcAjeSfXzamcztYsfGpMHm2BN0NgYJk4SzzQwgGX3Dx5FDBzx6v0TkvB+rKWDG 0A05Xikm0pzvFZKOKYl96fiUF9ZRb4T6d0aSE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=WJZZb6r7FyllHVv5HlbsO8XwQr9NN+2C9PDIv8qjksU=; b=f2qJ553DBDp9DuJJu6JyisP3UvHOjgFnb2Cl3NtvTYxuNHdw/9NewMCxX9Y1vC3hrl z+niMBGsrU+sVebD7cj3HX49QhF0Hp6PYHlPIXw/p+zbI4iDHtIadb1IM3YhXk9RS5Id be9fTRbJsiI0hYd2aRjUNOQfvWHiyBfuzH3kRuiC3ZuDfFX/0GUhbmuvdCH+oph6pofl oSJ3LMIcDMEJcENRxJA7+rjzDOWFmdeR3N2uZpLW31PBGE7MSXsf6XtfLzUFXKMAoamK QtInHW9AlBDS7xDMGNIeHyAcljFJh/uhP+KEgDCjydwcnkVE2g3QfSFT081CbLQTOEh3 GJ/g== X-Gm-Message-State: AN3rC/6+FrWAY3i5G3vqyW0oXe+gApgyCdMRVOTxVVtMp+YO3aUhe8r3 bIYQcV6/z+xrvg== X-Received: by 10.84.179.193 with SMTP id b59mr21076007plc.56.1492494280858; Mon, 17 Apr 2017 22:44:40 -0700 (PDT) Received: from rfd.leadboat.com (c-98-248-47-228.hsd1.ca.comcast.net. [98.248.47.228]) by smtp.gmail.com with ESMTPSA id q5sm21286310pgn.59.2017.04.17.22.44.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Apr 2017 22:44:39 -0700 (PDT) Date: Tue, 18 Apr 2017 05:44:36 +0000 From: Noah Misch To: Heikki Linnakangas Cc: Michael Paquier , Robert Haas , Tom Lane , Jeff Janes , Joe Conway , pgsql-hackers Subject: Re: scram and \password Message-ID: <20170418054436.GA123669@rfd.leadboat.com> References: <5478ab75-404f-9490-9355-dc1365ce3d7f@iki.fi> <20170410035323.GA2846583@tornado.leadboat.com> <56f6c214-f433-3758-7753-3081963b45a9@iki.fi> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <56f6c214-f433-3758-7753-3081963b45a9@iki.fi> User-Agent: Mutt/1.5.24 (2015-08-30) X-Pg-Spam-Score: -2.0 (--) 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 Tue, Apr 11, 2017 at 10:07:12PM +0300, Heikki Linnakangas wrote: > On 04/10/2017 08:42 AM, Michael Paquier wrote: > >As there have been some conflicts because of the commit of SASLprep, > >here is a rebased set of patches. A couple of things worth noting: > >- SASLprep does an allocation of the prepared password string. It is > >definitely better to do all the ground work in pg_saslprep but this > >costs a free() call with a #ifdef FRONTEND at the end of > >scram_build_verifier(). > >- Patch 0005 does that: > >+ /* > >+ * Hash password using SCRAM-SHA-256 when connecting to servers > >+ * newer than Postgres 10, and hash with MD5 otherwise. > >+ */ > >+ if (pset.sversion < 100000) > >+ encrypted_password = PQencryptPassword(pw1, user, "md5"); > >+ else > >+ encrypted_password = PQencryptPassword(pw1, user, "scram"); > >Actually I am thinking that guessing the hashing function according to > >the value of password_encryption would make the most sense. Thoughts? > > Thanks! I've been busy on the other thread on future-proofing the protocol > with negotiating the SASL mechanism, I'll come back to this once we get that > settled. By the end of the week, I presume. This PostgreSQL 10 open item is past due for your status update. Kindly send a status update within 24 hours, and include a date for your subsequent status update. Refer to the policy on open item ownership: https://www.postgresql.org/message-id/20170404140717.GA2675809%40tornado.leadboat.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers