Re: Password identifiers, protocol aging and SCRAM protocol
Michael Paquier <michael.paquier@gmail.com>
From: Michael Paquier <michael.paquier@gmail.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Andres Freund <andres@anarazel.de>,
Peter Eisentraut <peter.eisentraut@2ndquadrant.com>, Heikki Linnakangas <hlinnaka@iki.fi>, David Steele <david@pgmasters.net>,
Tom Lane <tgl@sss.pgh.pa.us>, David Fetter <david@fetter.org>, Alvaro Herrera <alvherre@2ndquadrant.com>, Magnus Hagander <magnus@hagander.net>,
Julian Markwort <julian.markwort@uni-muenster.de>, Stephen Frost <sfrost@snowman.net>, PostgreSQL mailing lists <pgsql-hackers@postgresql.org>,
Valery Popov <v.popov@postgrespro.ru>
Date: 2016-11-29T04:36:21Z
Lists: pgsql-hackers
On Fri, Nov 18, 2016 at 2:51 AM, Michael Paquier <michael.paquier@gmail.com> wrote: > On Thu, Nov 17, 2016 at 8:12 AM, Robert Haas <robertmhaas@gmail.com> wrote: >> So, the problem isn't Darwin-specific. I experimented with this on >> Linux and found Linux does the same thing with libpgcommon_srv.a that >> macOS does: a file in the archive that is totally unused is omitted >> from the postgres binary. In Linux, however, that doesn't prevent >> pgcrypto from compiling anyway. It does, however, prevent it from >> working. Instead of failing at compile time with a complaint about >> missing symbols, it fails at load time. I think that's because macOS >> has -bundle-loader and we use it; without that, I think we'd get the >> same behavior on macOS that we get on Windows. > > Yes, right. I recall seeing the regression tests failing with pgcrypto > when doing that. Though I did not recall if this was specific to macos > or Linux when I looked again at this patch yesterday. When testing > again yesterday I was able to make the tests of pgcrypto to pass, but > perhaps my build was not in a clean state... > >> 1. Rejigger things so that we don't build libpgcommon_srv.a in the >> first place, and instead add $(top_builddir)/src/common to >> src/backend/Makefile's value of SUBDIRS. With appropriate adjustments >> to src/common/Makefile, this should allow us to include all of the >> object files on the linker command line individually instead of >> building an archive library that is then used only for the postgres >> binary itself anyway. Then, things wouldn't get dropped. >> >> 2. Just postpone committing this patch until we're ready to use the >> new code in the backend someplace (or add a dummy reference to it >> someplace). > > At the end this refactoring makes sense because it will be used in the > backend with the SCRAM engine, so we could just wait for 2 instead of > having some workarounds. This is dropping the ball for later and there > will be already a lot of work for the SCRAM core part, though I don't > think that the SHA2 refactoring will change much going forward. > > Option 3 would be to do things the patch does it, aka just compiling > pgcrypto using the source files directly and put a comment to revert > that once the APIs are used in the backend. I can guess that you don't > like that. Nothing more will likely happen in this CF, so I have moved it to 2017-01 with the same status of "Needs Review". -- Michael
Commits
-
Support SCRAM-SHA-256 authentication (RFC 5802 and 7677).
- 818fd4a67d61 10.0 landed
-
Refactor SHA2 functions and move them to src/common/.
- 273c458a2b3a 10.0 landed
-
Replace isMD5() with a more future-proof way to check if pw is encrypted.
- dbd69118c05d 10.0 landed
-
Remove bogus notice that older clients might not work with MD5 passwords.
- 7e3ae5455948 9.2.20 landed
- 470af1f41c8b 9.3.16 landed
- ada2cdb61015 9.4.11 landed
- 65a7f190b253 9.5.6 landed
- 7546c135dc30 9.6.2 landed
- 31c54096a18f 10.0 landed
-
Refactor the code for verifying user's password.
- e7f051b8f9a6 10.0 landed
-
Replace PostmasterRandom() with a stronger source, second attempt.
- fe0a0b5993df 10.0 landed
-
Remove support for (insecure) crypt authentication.
- 53a5026b5cb3 8.4.0 cited