Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1afsxC-0004Ha-De for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Mar 2016 17:40:22 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1afsxB-0003mS-UV for pgsql-hackers@arkaria.postgresql.org; Tue, 15 Mar 2016 17:40:21 +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 1afsvp-00013V-6N for pgsql-hackers@postgresql.org; Tue, 15 Mar 2016 17:38:57 +0000 Received: from linode.thelabyrinth.net ([198.58.117.137] helo=mail.thelabyrinth.net) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1afsvj-00088a-77 for pgsql-hackers@postgresql.org; Tue, 15 Mar 2016 17:38:56 +0000 Received: from desktop.home.thelabyrinth.net (unknown [98.204.177.190]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: dsteele) by mail.thelabyrinth.net (Postfix) with ESMTPSA id E56FC12D13; Tue, 15 Mar 2016 17:38:49 +0000 (UTC) Subject: Re: Password identifiers, protocol aging and SCRAM protocol To: Michael Paquier References: <56E6D98F.1070701@pgmasters.net> Cc: PostgreSQL mailing lists , v.popov@postgrespro.ru From: David Steele Message-ID: <56E848A9.1070203@pgmasters.net> Date: Tue, 15 Mar 2016 13:38:49 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) 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 Hi Michael, On 3/14/16 7:07 PM, Michael Paquier wrote: > On Mon, Mar 14, 2016 at 5:06 PM, Michael Paquier wrote: > >> On Mon, Mar 14, 2016 at 4:32 PM, David Steele wrote: >> >>> Could you provide an updated set of patches for review? Meanwhile I am >>> marking this as "waiting for author". >> >> Sure. I'll provide them shortly with all the comments addressed. Up to >> now I just had a couple of comments about docs and whitespaces, so I >> didn't really bother sending a new set, but this meritates a rebase. > > And here they are. I have addressed the documentation and the > whitespaces reported up to now at the same time. For this first review I would like to focus on the user visible changes introduced in 0001-0002. First I created two new users with each type of supported verifier: postgres=# create user test with password 'test'; CREATE ROLE postgres=# create user testu with unencrypted password 'testu' valid until '2017-01-01'; CREATE ROLE 1) I see that rolvaliduntil is still in pg_authid: postgres=# select oid, rolname, rolvaliduntil from pg_authid; oid | rolname | rolvaliduntil -------+---------+------------------------ 10 | vagrant | 16387 | test | 16388 | testu | 2017-01-01 00:00:00+00 I think that's OK if we now define it to be "role validity" (it's still password validity in the patched docs). I would also like to see a validuntil column in pg_auth_verifiers so we can track password expiration for each verifier separately. For now I think it's enough to copy the same validity both places since there can only be one verifier. 2) I don't think the column naming in pg_auth_verifiers is consistent with other catalogs: postgres=# select * from pg_auth_verifiers; roleid | verimet | verival --------+---------+------------------------------------- 16387 | m | md505a671c66aefea124cc08b76ea6d30bb 16388 | p | testu System catalogs generally use a 3 character prefix so I would expect the columns to be (if we pick avr as a prefix): avrrole avrmethod avrverifier avrvaliduntil I'm not a big fan in abbreviating too much so you can see I've expanded the names a bit. 3) rolpassword is still in pg_shadow even though it is not useful anymore: postgres=# select usename, passwd, valuntil from pg_shadow; usename | passwd | valuntil ---------+----------+------------------------ vagrant | ******** | test | ******** | testu | ******** | 2017-01-01 00:00:00+00 If anyone is actually using this column in a meaningful way they are in for a nasty surprise when trying use the value in passwd as a verifier. I would prefer to drop the column entirely and produce a clear error. Perhaps a better option would be to drop pg_shadow entirely since it seems to have no further purpose in life. Thanks, -- -David david@pgmasters.net -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers