Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efDfv-0004f0-O7 for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jan 2018 23:44:51 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1efDfv-00041k-Av for pgsql-bugs@arkaria.postgresql.org; Fri, 26 Jan 2018 23:44:51 +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 1efDfu-00041a-VB for pgsql-bugs@lists.postgresql.org; Fri, 26 Jan 2018 23:44:51 +0000 Received: from mail-pf0-x242.google.com ([2607:f8b0:400e:c00::242]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1efDfo-0005I3-Cg for pgsql-bugs@postgresql.org; Fri, 26 Jan 2018 23:44:49 +0000 Received: by mail-pf0-x242.google.com with SMTP id y26so1275117pfi.10 for ; Fri, 26 Jan 2018 15:44:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=kUkdmcvu9YSJTfhdTO+eIicoYYuOgOhu3pI57d231C4=; b=eH2J3CQ4TX1f7Kfem+J4W066c6hnd4TYAmHm2KaG3g7TTadcmb4E3L46q46dHKN7Pd /bAhyD39yLzvMOZhKUAOXs2NKbhlth/UBbf4vEunL9z+JLqisb3S5nMfWFRZmHMtB+cw aSDS1rqJvMFQRK5IrfeWc2mOiZ3Mq4AeGSR+hVg351wK1TZ/fIXyTLxUfK5uUxi64S9V oXJ/BMBNPGxfVOZc6iSC7GsGgiw6vGPSww7exevcY7yFhypioRRsMlmY3GS4WD2krw9O iEBoC1j7Lo7l74bUH4Y5kZhVhNe44NfR1AW1yYamBcvoBnVVOmcaX4bAWSZZLLfsSCFC NEsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=kUkdmcvu9YSJTfhdTO+eIicoYYuOgOhu3pI57d231C4=; b=L/emgAEvpfzPgCN+OaClHZzj85gNlyPMbhmKESViacmAbumOG6wZOcV8g2Orz6bUxs RpDFd6q3ZazxoFTuvHdS5SGuSHtApqje1uf4K58/Cf5ELu91rE54SI7peolUPKCojJxC iinWpM608bLHYSD55pByfxQgaJhCPhOFgLvWiOFosmxS/7I3EJk5C3qs0/VFYQ4MRP9l HhRjjYn+GeEJGy2w2hSrj37JQD5nsDn/Pnz87HvXetFvzrPUQfl5NCzqFae8p1oEATmV H8rQB84Mjuqb/ix+8WfMD0Rlsc4dxx6PrrVFycWCn5IpcUvRbxR770SiHcvUkR6JrSua CT1Q== X-Gm-Message-State: AKwxyte34Y4F7epoaPT2cqgIdkKouiG1/mHNznXoTXJWAgUC6djWS1Za bumc+SbnW8eWcTri6RWgi8pOIA== X-Google-Smtp-Source: AH8x2259ND13BNUIw0+0Irtu+Luyggdf5UYIzT3bq1cDOBRaRarsDT96ZpMlcw1qMPj//CBErEDAIg== X-Received: by 10.99.155.9 with SMTP id r9mr9970639pgd.333.1517010282935; Fri, 26 Jan 2018 15:44:42 -0800 (PST) Received: from paquier.xyz (c137162.net61215.cablenet.ne.jp. [61.215.137.162]) by smtp.gmail.com with ESMTPSA id 73sm9352620pgg.1.2018.01.26.15.44.40 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 26 Jan 2018 15:44:41 -0800 (PST) Date: Sat, 27 Jan 2018 08:44:28 +0900 From: Michael Paquier To: Christophe Courtois Cc: pgsql-bugs@postgresql.org Subject: Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Message-ID: <20180126234428.GA1039@paquier.xyz> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="7iMSBzlTiPOCCT2k" Content-Disposition: inline In-Reply-To: List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --7iMSBzlTiPOCCT2k Content-Type: multipart/mixed; boundary="FCuugMFkClbJLl1L" Content-Disposition: inline --FCuugMFkClbJLl1L Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 26, 2018 at 05:22:59PM +0100, Christophe Courtois wrote: > But it appears as "scram-sha256" (only one hyphen) in pg_hba_file_rules. > This is a bit confusing. Thanks for the report. That's a bug.. Likely from some incorrect rebase during the feature review.=20 > "scram-sha256" appears in commit c727f120 in src/backend/libpq/hba.c, > while defining the array UserAuthName. > > Is it just a remnant of previous versions of the patch or is there a > reason? Attached is a patch for that. At the same time I have noticed that protocol.sgml is using the same name, so I would suggest to fix that at the same time. That introduces a small user-visible change when using pg_hba_file_rules still that should be backpatched. -- Michael --FCuugMFkClbJLl1L Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="scram-hba-fix.patch" Content-Transfer-Encoding: quoted-printable diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 4c5ed1e6d6..3cec9e0b0c 100644 --- a/doc/src/sgml/protocol.sgml +++ b/doc/src/sgml/protocol.sgml @@ -1540,7 +1540,7 @@ On error, the server can abort the authentication at = any stage, and send an ErrorMessage. =20 - + SCRAM-SHA-256 authentication =20 diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index aa20f266b8..acf625e4ec 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -126,7 +126,7 @@ static const char *const UserAuthName[] =3D "ident", "password", "md5", - "scram-sha256", + "scram-sha-256", "gss", "sspi", "pam", --FCuugMFkClbJLl1L-- --7iMSBzlTiPOCCT2k Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAlprvVwACgkQnvQgOdby QH1PDw/9G6/pV8Z7gubGGR8bxYkhttgib5mQbODkzh/eFizHtInEmVD9AQjoxtxG MNr1v7GYugrVyYcCWVWaMszrLFrsjdLXrqj+J6d8nRqH0C7dPvHEBBJA1siOIAFy Co+jqyEUmzVI0g9fl8IZQi6iX02JIO5qxb0TGu64dpMvf0CMldMwFaR21xFcQdMr 6XjbbEMPHg4TxkCTKvF/sg9/9hvwGSjMYoDk0cXIEnDYR+LT96SPZBuY5mp2wbRK aq3rMHM0ZhKH5msiMAmPboVFHpnaRJ32F+JzLDCGJsACYEAIctJ5aL+GZTLweQNY pwKd6x2gktXdlT5t4mj7nLkxQ926J7OISOIBQLoUBtPg2B/2YljNFdLkHd4n6ltM hvUym/cbd9mbNIPbAVa344yFxTdEvr9KbijU+XZsnDvBEOVV4tl9V+ooYSJI7QEO M4PsJx4nhw4KnySNpvVUei8nVbun2g9F1z6kIFgNyibZF2kCxZAxrda3H82RUnLg /XSNr2iEVtctS1CTu/wiEzhDVwGnY7fRJldNJ1bOt26BJTuGkxHbcYXE38u0fN9b qegLBkjSNMyuoqWfA1hQ3ocmQSh5svShUSJMoTjtfoP37tzLyyxPOJR53MEMNL1j kyF8kKvraj9UbxVuW4j2oXVAXsLgmMyd5lI+yXpt3MoqUdlDE1s= =3+ie -----END PGP SIGNATURE----- --7iMSBzlTiPOCCT2k--