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 1kydTF-0004xR-Lm for pgsql-docs@arkaria.postgresql.org; Sun, 10 Jan 2021 16:21:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kydTC-0000H3-SR for pgsql-docs@arkaria.postgresql.org; Sun, 10 Jan 2021 16:21:34 +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 1kydPR-00084U-Jd for pgsql-docs@lists.postgresql.org; Sun, 10 Jan 2021 16:17:41 +0000 Received: from mail-ej1-x632.google.com ([2a00:1450:4864:20::632]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1kydPN-0004aR-Ee for pgsql-docs@lists.postgresql.org; Sun, 10 Jan 2021 16:17:40 +0000 Received: by mail-ej1-x632.google.com with SMTP id qw4so21192124ejb.12 for ; Sun, 10 Jan 2021 08:17:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=NvqI1j0fKUpI/dZTb6nYnjW2Q6G9PFKmpmVQUjQ5ZCg=; b=FRIlc1r/B6oyh/uRlflRe9rMeUQ/rhF2UnqPQNnLAvbEUjRd7Y3DGJ2GYZUny3KPzd r1guY+VxFoT6lC+jUxceEccTdlGlNKoeoIuRNY4APOAbLOWfHW6IfEosufW1IWlbjTWd N854ZOFEqR0Bh5GRL7D7DEqw9ckCIs3qaJDT3NfqoPXnaokcb7HFdwnMouyJcnNPOG1W aIAH9++HJnE2gwyJYL6ZURUKXSlv2YqcvfzV6u7ikjsP8nZVe2k+MqU9vigJAPZ7FqB3 lIVx4YHqXCUuwlPrzVPmeQBaUfzLEB79YSEHBDy9waH7S+NkOuXPuRKo6ftYdEiQYz7y JTTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=NvqI1j0fKUpI/dZTb6nYnjW2Q6G9PFKmpmVQUjQ5ZCg=; b=PuXY09JPNpx5fYM1AczZeFaxBknJYrQRS9NAita9xDyfUvmN5etVLdSjMjlMneOmh8 VoLpB5M8zzrHSAg/8DCX1V6U1Z4q4T1pCzX0t9F6t0vF5suUPbpG+fia5K1bOZ/UuLc6 XZcjmQ9a9kRWNplJ0zoDgKNYi55KVu6O09nl6Z+9s7OBaQB6dvOSvjjy+a4OBfqgFhQt v8v725aD2M0IjlJybJ/Ojm3vhloK49UV8jE5kbNLse+UyntLbTa+EVDufrWtz0mFukck MLNJWl+ZBpOiZ/TRrArOee3CIEM9YCIvbcgCaYuUWM0+Z/UYspDjPKg1ZljSLKuVcUyL SQrQ== X-Gm-Message-State: AOAM532WkUMFzgeGabpahRkvMs/duANjB3eZrt8bTNmk3kdzK1uLU8kv LYrc8DE7rkZ0m3Rs1CV7WsplxhkkWLP98g== X-Google-Smtp-Source: ABdhPJy8oW9Q8PuxeHljmmKcZOAKmstmxwkbQTiWns/6fMEcWcBM5i8SjER6U7bEc3W4HAQa/lMKQw== X-Received: by 2002:a17:906:af5a:: with SMTP id ly26mr8332986ejb.416.1610295454619; Sun, 10 Jan 2021 08:17:34 -0800 (PST) Received: from [192.168.1.46] ([109.128.128.90]) by smtp.gmail.com with ESMTPSA id b9sm5929756eju.8.2021.01.10.08.17.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Jan 2021 08:17:34 -0800 (PST) From: =?utf-8?Q?S=C3=A9bastien_Hoorens?= Message-Id: <336BF3D6-9B19-49F9-B687-927A47264BD4@gmail.com> Content-Type: multipart/alternative; boundary="Apple-Mail=_6E88D1A5-3C08-4885-B399-E7F11ACDFAB0" Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.40.0.2.32\)) Subject: Re: scram-sha-256 authentication Date: Sun, 10 Jan 2021 17:17:32 +0100 In-Reply-To: Cc: pgsql-docs@lists.postgresql.org To: Michael Paquier , jkatz@postgresql.org References: <160977988728.3264.12890569380100648489@wrigleys.postgresql.org> <0707a341-0c2e-3fe4-fe65-607bea83aced@postgresql.org> X-Mailer: Apple Mail (2.3654.40.0.2.32) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --Apple-Mail=_6E88D1A5-3C08-4885-B399-E7F11ACDFAB0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hi Jonathan and Michael, Thank you for the quick reply, I will ask my questions in community = support areas from now on, my apologies. Your answers were very helpful. I will use psql=E2=80=99s \password = command to set the users=E2=80=99 passwords for me instead of trying to = generate and set the encoded password myself. I tried out this solution = with success. Best regards, S=C3=A9bastien > On 6 Jan 2021, at 02:57, Michael Paquier wrote: >=20 > On Tue, Jan 05, 2021 at 09:12:58AM -0500, Jonathan S. Katz wrote: >> I am not sure what your end goal is, but there are a few ways to = create >> the hashed SCRAM verifier: >>=20 >> - Using the \password flag in "psql" >> - Using one of the connection drivers that interfaces with libpq's >> PQencryptPasswordConn function[2] >> - Some driver's handle the password hashing independently >=20 > Another thing to be careful about is the value of password_encryption > in postgresql.conf. The default has been changed to scram-sha-256 in > c7eab0e, meaning that this change will be available in Postgres 14~. > But if your environment is using the default configuration of 11, that > may be set to "md5". > -- > Michael --Apple-Mail=_6E88D1A5-3C08-4885-B399-E7F11ACDFAB0 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8
Hi Jonathan and Michael,

Thank you for the quick reply, I will = ask my questions in community support areas from now on, my = apologies.

Your = answers were very helpful. I will use psql=E2=80=99s \password command to set the users=E2=80=99 passwords = for me instead of trying to generate and set the encoded password = myself. I tried out this solution with success.


Best= regards,
S=C3=A9bastien



On 6 Jan 2021, at 02:57, = Michael Paquier <michael@paquier.xyz> wrote:

On = Tue, Jan 05, 2021 at 09:12:58AM -0500, Jonathan S. Katz wrote:
I am not sure what your = end goal is, but there are a few ways to create
the hashed = SCRAM verifier:

- Using the \password flag = in "psql"
- Using one of the connection drivers that = interfaces with libpq's
PQencryptPasswordConn = function[2]
 - Some driver's handle the password = hashing independently

Another = thing to be careful about is the value of password_encryption
in postgresql.conf.  The default has been changed to = scram-sha-256 in
c7eab0e, meaning that this change will be = available in Postgres 14~.
But if your environment is = using the default configuration of 11, that
may be set to = "md5".
--
Michael

= --Apple-Mail=_6E88D1A5-3C08-4885-B399-E7F11ACDFAB0--