Thread: pg_hba_file_rules: "scram-sha256" instead of "scram-sha-256"
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.com) 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/
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
Attachment
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
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
Attachment
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