pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedpg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
5+ messages / 3 participants
[nested] [flat]
* pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
@ 2018-01-26 16:22 Christophe Courtois <christophe.courtois@dalibo.com>
2018-01-26 23:44 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Christophe Courtois @ 2018-01-26 16:22 UTC (permalink / raw)
To: pgsql-bugs
Hi,
In pg_hba.conf, the new authentication method must be set as
"scram-sha-256".
But it appears as "scram-sha256" (only one hyphen) in pg_hba_file_rules.
This is a bit confusing.
"scram-sha256" appears in commit c727f120 in src/backend/libpq/hba.c,
while defining the array UserAuthName.
I've not seen why it should be this way in the associated discussions
(https://www.postgresql.org/message-id/fde71ff1-5858-90c8-99a9-1c2427e7bafb@iki.fi
,
https://www.postgresql.org/message-id/CAB7nPqS99Z31f7jhoYYMoBDbuZSQRpn+HQzByA=EwfMDYwCk1Q@mail.gmail...)
Is it just a remnant of previous versions of the patch or is there a
reason?
--
Christophe Courtois
Consultant Dalibo
http://dalibo.com/ - http://dalibo.org/
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
2018-01-26 16:22 pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Christophe Courtois <christophe.courtois@dalibo.com>
@ 2018-01-26 23:44 ` Michael Paquier <michael.paquier@gmail.com>
2018-01-30 22:07 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2018-01-26 23:44 UTC (permalink / raw)
To: Christophe Courtois <christophe.courtois@dalibo.com>; +Cc: pgsql-bugs
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.
> "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
Attachments:
scram-hba-fix.patch (text/x-diff, 740B) download
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.
</para>
- <sect2 id="sasl-scram-sha256">
+ <sect2 id="sasl-scram-sha-256">
<title>SCRAM-SHA-256 authentication</title>
<para>
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[] =
"ident",
"password",
"md5",
- "scram-sha256",
+ "scram-sha-256",
"gss",
"sspi",
"pam",
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
2018-01-26 16:22 pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Christophe Courtois <christophe.courtois@dalibo.com>
2018-01-26 23:44 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Michael Paquier <michael.paquier@gmail.com>
@ 2018-01-30 22:07 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-01-30 22:56 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Michael Paquier <michael.paquier@gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Eisentraut @ 2018-01-30 22:07 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; Christophe Courtois <christophe.courtois@dalibo.com>; +Cc: pgsql-bugs
On 1/26/18 18:44, Michael Paquier wrote:
>> "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.
Committed and backpatched, and I also fixed the names of the internal
symbols analogously.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
2018-01-26 16:22 pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Christophe Courtois <christophe.courtois@dalibo.com>
2018-01-26 23:44 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Michael Paquier <michael.paquier@gmail.com>
2018-01-30 22:07 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
@ 2018-01-30 22:56 ` Michael Paquier <michael.paquier@gmail.com>
2018-01-30 23:05 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 1 reply; 5+ messages in thread
From: Michael Paquier @ 2018-01-30 22:56 UTC (permalink / raw)
To: Peter Eisentraut <peter.eisentraut@2ndquadrant.com>; +Cc: Christophe Courtois <christophe.courtois@dalibo.com>; pgsql-bugs
On Tue, Jan 30, 2018 at 05:07:20PM -0500, Peter Eisentraut wrote:
> Committed and backpatched, and I also fixed the names of the internal
> symbols analogously.
Thanks, Peter. Please note I did not want to bother about them as it is
never fun to potentially break compilation for any client tools using
them with a minor upgrade, particularly on REL_10_STABLE...
--
Michael
Attachments:
signature.asc (application/pgp-signature, 832B) download
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
2018-01-26 16:22 pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Christophe Courtois <christophe.courtois@dalibo.com>
2018-01-26 23:44 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Michael Paquier <michael.paquier@gmail.com>
2018-01-30 22:07 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-01-30 22:56 ` Re: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Michael Paquier <michael.paquier@gmail.com>
@ 2018-01-30 23:05 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
0 siblings, 0 replies; 5+ messages in thread
From: Peter Eisentraut @ 2018-01-30 23:05 UTC (permalink / raw)
To: Michael Paquier <michael.paquier@gmail.com>; +Cc: Christophe Courtois <christophe.courtois@dalibo.com>; pgsql-bugs
On 1/30/18 17:56, Michael Paquier wrote:
> On Tue, Jan 30, 2018 at 05:07:20PM -0500, Peter Eisentraut wrote:
>> Committed and backpatched, and I also fixed the names of the internal
>> symbols analogously.
>
> Thanks, Peter. Please note I did not want to bother about them as it is
> never fun to potentially break compilation for any client tools using
> them with a minor upgrade, particularly on REL_10_STABLE...
These are just internal macros. Nobody else should be using them.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2018-01-30 23:05 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-01-26 16:22 pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256" Christophe Courtois <christophe.courtois@dalibo.com>
2018-01-26 23:44 ` Michael Paquier <michael.paquier@gmail.com>
2018-01-30 22:07 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
2018-01-30 22:56 ` Michael Paquier <michael.paquier@gmail.com>
2018-01-30 23:05 ` Peter Eisentraut <peter.eisentraut@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox