Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cFGH9-0006ch-5c for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Dec 2016 08:11:27 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cFGH8-0000WM-He for pgsql-hackers@arkaria.postgresql.org; Fri, 09 Dec 2016 08:11:26 +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 1cFGH7-0000W5-PE for pgsql-hackers@postgresql.org; Fri, 09 Dec 2016 08:11:25 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cFGH2-00016w-0r for pgsql-hackers@postgresql.org; Fri, 09 Dec 2016 08:11:25 +0000 Received: by mail-wm0-x244.google.com with SMTP id u144so2321636wmu.0 for ; Fri, 09 Dec 2016 00:11:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding; bh=qVqVp4h5SCnKYLQ47BW5jKMUx2yBrMfS6titF/Skx8w=; b=GrHBRPCuKgBEFtoXL9oKPGmNWeBYrtF5hJoim/UJy857eKTuqcnlB+xOg0fGcNcb/u qFRJRpUrdTOfW4fwX/q3rtoPRHgM5Pg8d6sO7k9fGJZuppHeUlSaRtQn3lcnaaAN9czd yv/eX8H9dSrWkcPL0ED3PBsNmEtFs/mkFtmAdo+u75OJFmlxXGQoSJG/22j/m8FBzIDa wC+40HRSBTNwtcyURCWBJpnZvLUjRP8g9Oh3Jp0Wej8zPLlevJE5RBPi21U1QIGbHpni mE6kyhBgORtpuAXcTpgjvHmN0uRN8AiLVxPURlcyIV9C/slhSQSZqx6NBdDybUc1SFUr bxzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:to:references:cc:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=qVqVp4h5SCnKYLQ47BW5jKMUx2yBrMfS6titF/Skx8w=; b=Vsj5NKxChX8oKWS85zOJq/HrOn/BdluwwmUCEAVyTf+rAUtZzS4tmc4KeriICroKZb 2p35lbQBq3EYl0ZI+JRk2rNp5cooPqsPILGN+20BTeloodfx3fLq6ogR9Kjgze29DA7j KHRI1/xajV+G+EKGhaVy9IFCNwoOa+o+ycrtPjhMGVtV04Sq52TsmtX0CdreSPYKvyNf rqvuuC4AsTjDG2s1KlBMOIf6q5PFBNfkXZ2uAkt9vg6evgbNYSQwUbvqFS4FzsfFxJHR bB49UqQOvmQofDk8r7Uw7pyyh9+oaBT5pxtKY6WdSKfjCv7LFscCNYTWmxWIF7H/Rkbp KAgA== X-Gm-Message-State: AKaTC0325iBHVunmA9yCdUxYf6MnFDKyaSMnx458i7rGhutRsoDGJkpxTpRt3F2PrHacwA== X-Received: by 10.46.0.218 with SMTP id e87mr31588882lji.54.1481271079217; Fri, 09 Dec 2016 00:11:19 -0800 (PST) Received: from [192.168.1.111] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id y131sm6364865lfd.36.2016.12.09.00.11.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 09 Dec 2016 00:11:18 -0800 (PST) Subject: Re: Password identifiers, protocol aging and SCRAM protocol To: Michael Paquier References: <947b9aff-8fdb-dbf5-a99c-0ffd4523a73f@2ndquadrant.com> <20161117003628.xonaz4p3lavrif6u@alap3.anarazel.de> <21eecdb8-365b-8347-1ae2-5278d1fe798c@iki.fi> Cc: Robert Haas , Andres Freund , Peter Eisentraut , David Steele , Tom Lane , David Fetter , Alvaro Herrera , Magnus Hagander , Julian Markwort , Stephen Frost , PostgreSQL mailing lists , Valery Popov From: Heikki Linnakangas Message-ID: <762f4875-a87e-cf0b-c06b-b357294d8be1@iki.fi> Date: Fri, 9 Dec 2016 10:11:17 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 Couple of things I should write down before I forget: 1. It's a bit cumbersome that the scram verifiers stored in pg_authid.rolpassword don't have any clear indication that they're scram verifiers. MD5 hashes are readily identifiable by the "md5" prefix. I think we should use a "scram-sha-256:" for scram verifiers. Actually, I think it'd be awfully nice to also prefix plaintext passwords with "plain:", but I'm not sure it's worth breaking the compatibility, if there are tools out there that peek into rolpassword. Thoughts? 2. It's currently not possible to use the plaintext "password" authentication method, for a user that has a SCRAM verifier in rolpassword. That seems like an oversight. We can't do MD5 authentication with a SCRAM verifier, but "password" we could. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers