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 1hUAZq-0007HR-PB for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 13:49:42 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hUAZp-0004d9-Br for pgsql-hackers@arkaria.postgresql.org; Fri, 24 May 2019 13:49:41 +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 1hUAZp-0004d2-3E for pgsql-hackers@lists.postgresql.org; Fri, 24 May 2019 13:49:41 +0000 Received: from mail-lj1-f194.google.com ([209.85.208.194]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hUAZg-00021A-Mr; Fri, 24 May 2019 13:49:40 +0000 Received: by mail-lj1-f194.google.com with SMTP id m15so8682558ljg.13; Fri, 24 May 2019 06:49:32 -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=almrdWTx1TMKD5bNCmeH5ddQ0sYOB8P9K7lPdDSF8xQ=; b=i1j6hwafrH0NnwQM/xvszV0CfpPnQW7PzcEaEQNV0O1xKOHQBF3oTfkI4/m4EDmyro 2nkzJboGnpuSya4Mygz8RxIK0pqmOoXbaia6Gp2gm5DfZELi41jQJLGmUNCWwrBC6hVe 3j+cISeflEpIw5HlSX4UWNV8ZEt7mxk70ew5nQf/azHd9N++9ZhqkjWk5eYbqev+AM4u lG9HEa4P5VNGXrXFRL7qJBgbJ9QK3eHuP1RIxLOoz/5PG+/BEd1VRljZHh6CmV2QGHfH iIIFCbCMgA45nRnPJYb9HAQ0V/U9WJW0HwGMCnid1EfJ/1fdjP8fkJUkBUwHO8klBF28 4rRQ== X-Gm-Message-State: APjAAAVJ+D6IiRX167B3RvHsikMEfFGfM//QlK3JleYJHLE5BD3L/HDZ 5CUVXL2i4HwYvff6MSS7f6I= X-Google-Smtp-Source: APXvYqxzXntQlWjb4G+XCehpU738uJwNTYH6xQI2m5H/5S8k2xzMwKhDVQ1hIBOnwRfFQIdJBrqOrA== X-Received: by 2002:a2e:99c3:: with SMTP id l3mr3642506ljj.73.1558705771641; Fri, 24 May 2019 06:49:31 -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 q23sm544533ljg.35.2019.05.24.06.49.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 May 2019 06:49:30 -0700 (PDT) Subject: Re: initdb recommendations To: Stephen Frost , "Jonathan S. Katz" 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> From: Heikki Linnakangas Message-ID: <1f55ea0f-a0fc-73cf-a7da-c6b8d8c752c2@iki.fi> Date: Fri, 24 May 2019 16:49:30 +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: <20190524130123.GY2480@tamriel.snowman.net> 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 16:01, Stephen Frost wrote: > What I was really getting at though was the ability to have multiple > authenticator tokens active concurrently (eg: md5 AND SCRAM), with an > ability to use either one (idk, md5_or_scram auth method?), and then > automatically set both on password change until everything is using > SCRAM and then remove all MD5 stuff. Umm, that's what "md5" already does. Per documentation (https://www.postgresql.org/docs/current/auth-password.html): > To ease transition from the md5 method to the newer SCRAM method, if > md5 is specified as a method in pg_hba.conf but the user's password on > the server is encrypted for SCRAM (see below), then SCRAM-based > authentication will automatically be chosen instead. The migration path is: 1. Use "md5" in pg_hba.conf, and put password_encryption='scram-sha-256' in postgresql.conf. 2. Wait until all users have reset their passwords, so that all users have a SCRAM-SHA-256 verifier. 3. Replace "md5" with "scram-sha-256" in pg_hba.conf. Step 3 is kind of optional; once all users have a SCRAM verifier instead of an MD5 hash, they will all use SCRAM even without changing pg_hba.conf. 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. - Heikki