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 1hUB97-0000Tr-33 for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 14:26:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hUB95-00080q-In for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 14:26:07 +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 1hUB95-00080i-9x for pgsql-hackers@lists.postgresql.org; Fri, 24 May 2019 14:26:07 +0000 Received: from mail-lf1-f65.google.com ([209.85.167.65]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUB92-0002sy-HP; Fri, 24 May 2019 14:26:06 +0000 Received: by mail-lf1-f65.google.com with SMTP id y13so7288034lfh.9; Fri, 24 May 2019 07:26:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=7C2xfx7O7kg9qdfR4YFe17jImH2Gq2533OqN9kOLh/o=; b=F3wF9b3vfXJrY/R/jte9h8vgLrF5EU+0TMnpeLgs0VEleKLh78LeXAXYW8pneUAKVX Ps6cNBvCGu95aVkxAkkB+VmJ/Qwr3juByGxBJ9TqitHTOiq65ZV5LP0zBLtmlJMlfu8O CNZ6336JQqFmAHXd7EqpcOMh8+MCpo1ax/bRB0exIZI6/6KT2Y5EO5xBgDRQXIYKXjSk e+I5GEIoqT4qVeQqHu1USmt/0eoDvk12xB1JDytqXe14Xxzy5FdHgFWDcdic+BG9nB/R zLckwWl3R9K9Yyqcvrxory3rFWgi+WOtrdDa3n5Yg2hop24jAg4HSN5jnXadsYb+fko0 9TMA== X-Gm-Message-State: APjAAAUF2qgASfKND6L6Sl1YasopJ2Sai6dsLc8ykUMfXYIWM9YMRw0M bKozJziXtif8noeNxKv40oM= X-Google-Smtp-Source: APXvYqzLrfIPIsrTUPJoSUPJtI330fNdXhYuw/ggi9JOBnJKkfJXfa8gMQ36elJN17ugMGwa76lKNA== X-Received: by 2002:a19:48c3:: with SMTP id v186mr96528lfa.42.1558707963069; Fri, 24 May 2019 07:26:03 -0700 (PDT) Received: from [192.168.1.10] (dsl-hkibng22-54f8d6-97.dhcp.inet.fi. [84.248.214.97]) by smtp.gmail.com with ESMTPSA id e6sm558961ljg.65.2019.05.24.07.26.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 07:26:02 -0700 (PDT) Subject: Re: initdb recommendations To: "Jonathan S. Katz" , Stephen Frost Cc: Magnus Hagander , Joe Conway , Tom Lane , Peter Eisentraut , pgsql-hackers , Noah Misch References: <9f46f065-ca80-f637-8c5d-a9877bcd5eab@postgresql.org> <10093.1558664907@sss.pgh.pa.us> <20190524023009.GL2480@tamriel.snowman.net> <20190524121306.GS2480@tamriel.snowman.net> <17041a05-0e28-f2b1-bf0c-fe375af66b45@joeconway.com> <20190524121904.GU2480@tamriel.snowman.net> <20190524123317.GW2480@tamriel.snowman.net> <20190524130123.GY2480@tamriel.snowman.net> <1f55ea0f-a0fc-73cf-a7da-c6b8d8c752c2@iki.fi> <0a244411-d9c6-0081-8089-9e4b27fce19a@postgresql.org> From: Heikki Linnakangas Message-ID: Date: Fri, 24 May 2019 17:26:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <0a244411-d9c6-0081-8089-9e4b27fce19a@postgresql.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On 24/05/2019 17:02, Jonathan S. Katz wrote: > On 5/24/19 9:49 AM, Heikki Linnakangas wrote: >> It just prevents MD5 authentication in case a user forces a >> new MD5 hash into the system e.g. by changing password_encryption, or by >> setting an MD5 password explicitly with ALTER USER. > > Cool. Thanks for the explanation. > > I do think we should document said upgrade path, my best guess being > around here[1]. > > [1] https://www.postgresql.org/docs/current/auth-password.html You mean, like this? From the bottom of that page :-) > To upgrade an existing installation from md5 to scram-sha-256, after > having ensured that all client libraries in use are new enough to > support SCRAM, set password_encryption = 'scram-sha-256' in > postgresql.conf, make all users set new passwords, and change the > authentication method specifications in pg_hba.conf to scram-sha-256. It would be nice to expand that a little bit, though: * How do you verify if all client libraries support SCRAM? Would be good to mention the minimum libpq version here, at least. Can we give more explicit instructions? It would be nice if there was a way to write an entry to the log, whenever an older client connects. Not sure how you'd do that.. * How does one "make all users to set new passwords"? Related to that, how do you check if all users have reset their password to SCRAM? Give the exact SQL needed to check that. - Heikki