Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmu32-0004Iw-6I for pgsql-admin@arkaria.postgresql.org; Sat, 29 May 2021 08:10:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lmu2y-0002vA-TN for pgsql-admin@arkaria.postgresql.org; Sat, 29 May 2021 08:10:16 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmu2y-0002v1-KQ for pgsql-admin@lists.postgresql.org; Sat, 29 May 2021 08:10:16 +0000 Received: from jakobs.com ([85.214.83.89] helo=rs.plausibolo.de) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lmu2s-0005J0-3K for pgsql-admin@lists.postgresql.org; Sat, 29 May 2021 08:10:15 +0000 Received: from localhost (localhost [127.0.0.1]) by rs.plausibolo.de (Postfix) with ESMTP id 3D47F3802F0; Sat, 29 May 2021 10:10:07 +0200 (CEST) Received: from rs.plausibolo.de ([127.0.0.1]) by localhost (h2367442.stratoserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vF68kGVG2IIB; Sat, 29 May 2021 10:10:07 +0200 (CEST) Received: from tuxedo.local.de (p5b248469.dip0.t-ipconnect.de [91.36.132.105]) by rs.plausibolo.de (Postfix) with ESMTPSA id EC7E738017E; Sat, 29 May 2021 10:10:06 +0200 (CEST) Subject: Re: Upgrading password encryption from md5 to scram-sh-256 To: pgsql-admin@lists.postgresql.org References: From: Holger Jakobs Message-ID: <8eb90d2f-2a3f-8da8-a03e-124105156678@jakobs.com> Date: Sat, 29 May 2021 10:10:05 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.2 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="k8uCeR23EuwcuYuNsr4OUNZtMjgJKi4lu" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --k8uCeR23EuwcuYuNsr4OUNZtMjgJKi4lu Content-Type: multipart/mixed; boundary="WrSbhqmM3ymFfbZG62da47qKNtId5qjN9"; protected-headers="v1" From: Holger Jakobs To: pgsql-admin@lists.postgresql.org Message-ID: <8eb90d2f-2a3f-8da8-a03e-124105156678@jakobs.com> Subject: Re: Upgrading password encryption from md5 to scram-sh-256 References: In-Reply-To: --WrSbhqmM3ymFfbZG62da47qKNtId5qjN9 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Content-Language: de-DE Am 28.05.21 um 18:31 schrieb Nikhil Shetty: > Hi, > > Thank you for your feedback Jonathan, Laurenz and Holger. I am=20 > thinking of using the below approach which will give users more=20 > control of when to change "application-user" password. > > Is there any drawback if the user uses below steps to change their=20 > password? > > 1. alter user set password_encryption to 'scram-sha-256' =C2=A02. In a = new=20 > session, users can change their=C2=A0passwords > > Finally, once all users have changed password, set password_encryption = > at instance level, make changes in pg_hba and reload. > > To use the same password as before, we can do "alter user =20 > password ", so this will change to scram-sha-256 but no=20 > changes in application code. > > Thanks and Regards, > Nikhil > Yes, that's exactly the way to go. --=20 Holger Jakobs, Bergisch Gladbach, Tel. +49-178-9759012 --WrSbhqmM3ymFfbZG62da47qKNtId5qjN9-- --k8uCeR23EuwcuYuNsr4OUNZtMjgJKi4lu Content-Type: application/pgp-signature; name="OpenPGP_signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="OpenPGP_signature" -----BEGIN PGP SIGNATURE----- wmMEABEIACMWIQScuJCxWJK1p5BOebGKV5yTsxlhugUCYLH23gUDAAAAAAAKCRCKV5yTsxlhujWW AJwLyxAAN2EyvTtKh9FFcm7V65XEoACfbJitBPJXJkoe1lEb/sH9jbuzA20= =fpmP -----END PGP SIGNATURE----- --k8uCeR23EuwcuYuNsr4OUNZtMjgJKi4lu--