Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bw97n-0003eX-Tt for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Oct 2016 14:42:48 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bw97n-0005I0-2c for pgsql-hackers@arkaria.postgresql.org; Mon, 17 Oct 2016 14:42:47 +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 1bw96O-0003jX-58 for pgsql-hackers@postgresql.org; Mon, 17 Oct 2016 14:41:20 +0000 Received: from mail-lf0-x22a.google.com ([2a00:1450:4010:c07::22a]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1bw96L-0007MX-Fb for pgsql-hackers@postgresql.org; Mon, 17 Oct 2016 14:41:18 +0000 Received: by mail-lf0-x22a.google.com with SMTP id l131so245407641lfl.2 for ; Mon, 17 Oct 2016 07:41:17 -0700 (PDT) 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=Cj/5XvmCb2bCpSA2Gz2s5JWo5sv4ziK2Sn3ZOyucRmM=; b=XP3SqstnsVE8fGZu5LFaA3AExM3JxVXr6FxjWFRP2nkAsTYLoxHlmR5OgXIYa75xYN vjCM8CH2MnODhm8AN9IyEXXc/JAXHlqXntcrBjAovROMe9S+amjZDaJHxmbmgkbvgdSl mQw0MMedX/Inqs7u3QOXRjEC3vHJJwwvRDhoCt2WNzRynVYgqRERc5w57SDajrsHlPBR lZ5CrT0ELMbIMe+J02Q1I7sKUGeh9GpZIjxZ8QCF+xSSbtsH8Cr0c9W9HbqLlFYNrLjh jhIXzy16wDDc++kwFWMTnUUpuBdUiast/7T3mHGlKd1XhLwUqwJdfUHHJ4o64g4Y0Fc5 dE0A== 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=Cj/5XvmCb2bCpSA2Gz2s5JWo5sv4ziK2Sn3ZOyucRmM=; b=JN0txWzTKwXEVI8Wyt9+wW6gx9ksWmB0T2BM01FmzDusir/6KfHvrhhJ/lMbMkECJ4 jjYaUQFJUMN323q7Vnbewxds5gTOmVvkfPBL1uH3/3xpgAvkKGHBAGQG+CDoS4qOHpSp hAryUuPGGo6hD3J4Kv3hZVOujMLFMnPYtZUV2TwpiqiEn6HkcYOQUVla3ohvvfBkOxQj zQTXuYFQ4tMcBeGIIIQirtwi6fwcIs+Hv4jWrljdn1t1OcGhT0qOisuKgakv8akHmQkA htqOoffuE37Va9TxxL0ij8Q3vj6b0Q9iAwll3rYpeFJK4P/9Rs3c1yaTzGukk2HfV4M3 Qi9A== X-Gm-Message-State: AA6/9Rl6Vc7PONPCYN91XQMjlTk+iZ9Wri7uJ08B8R3tSHn1p6f8h2KjswDBPI/F8E8KAg== X-Received: by 10.25.39.15 with SMTP id n15mr15230383lfn.91.1476715273082; Mon, 17 Oct 2016 07:41:13 -0700 (PDT) Received: from [192.168.1.111] (dsl-hkibrasgw1-58c38f-82.dhcp.inet.fi. [88.195.143.82]) by smtp.gmail.com with ESMTPSA id u3sm4792270lja.8.2016.10.17.07.41.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Oct 2016 07:41:12 -0700 (PDT) Subject: Re: Password identifiers, protocol aging and SCRAM protocol To: Michael Paquier , Tom Lane References: <47be24f5-12a5-7af8-efc0-9486a7dbd413@iki.fi> <79774ac1-df34-6b20-1659-c020c3842ce1@iki.fi> <4f3a9e71-cb1b-ca44-a780-36d503671e45@iki.fi> <4e0ae28b-b61a-248c-d96c-207c9befc125@iki.fi> Cc: David Steele , Robert Haas , David Fetter , Alvaro Herrera , Magnus Hagander , Peter Eisentraut , Julian Markwort , Stephen Frost , PostgreSQL mailing lists , Valery Popov From: Heikki Linnakangas Message-ID: <2eae485f-febd-72df-089a-ca95fc9fc89f@iki.fi> Date: Mon, 17 Oct 2016 17:41:09 +0300 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: <4e0ae28b-b61a-248c-d96c-207c9befc125@iki.fi> 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 On 10/17/2016 12:27 PM, Heikki Linnakangas wrote: > On 10/17/2016 12:18 PM, Michael Paquier wrote: >> You removed the part of pgcrypto in charge of randomness, nice move. I >> was wondering about how to do with the perfc and the unix_std at some >> point, and ripping them off as you did is fine for me. > > Yeah. I didn't understand the need for the perfc stuff. Are there > Windows systems that don't have the Crypto APIs? I doubt it, but the > buildfarm will tell us in a moment if there are. > > And if we don't have a good source of randomness like /dev/random, I > think it's better to fail, than try to collect entropy ourselves (which > is what unix_std did). If there's a platform where that doesn't work, > someone will hopefully send us a patch, rather than silently fall back > to an iffy implementation. Looks like Tom's old HP-UX box, pademelon, is not happy about this. Does (that version of) HP-UX not have /dev/urandom? I think we're going to need a bit more logging if no randomness source is available. What we have now is just "could not generate random query cancel key", which isn't very informative. Perhaps we should also call pg_strong_random() once at postmaster startup, to check that it works, instead of starting up but not accepting any connections. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers