Re: BUG #15495: Ldap authentication not working with multiple server in Postgresql 11
Thomas Munro <thomas.munro@enterprisedb.com>
From: Thomas Munro <thomas.munro@enterprisedb.com>
To: rnavarro@nocibe.fr, PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>
Date: 2018-11-13T04:54:15Z
Lists: pgsql-bugs
On Sat, Nov 10, 2018 at 11:45 AM Thomas Munro <thomas.munro@enterprisedb.com> wrote: > On Sat, Nov 10, 2018 at 8:28 AM Thomas Munro > <thomas.munro@enterprisedb.com> wrote: > > On Sat, Nov 10, 2018 at 4:48 AM PG Bug reporting form > > <noreply@postgresql.org> wrote: > > > After upgrade database from postgresql 10.5 to postgresql 11.1, LDAP > > > authentication no longer work with multiple ldap server specified. > > Thanks for the report. I see the problem. In commit > > 35c0754fadca8010955f6b10cb47af00bdbe1286 we switched from ldap_init() > > to ldap_initialize() because the newer interface supports LDAPS. To > > do that we have to build a URI from the given protocol, server and > > port. I overlooked the case where multiple servers are specified in > > ldapserver. If you say ldapserver="a b c" then we generate a URI > > "ldap://a b c:389", but it looks like we should instead generate a URI > > list "ldap://a:389 ldap://b:389 ldap://c:389". > > Here's a draft patch. I did some testing with various multi-server configurations, added a simple two hostname case to the regression tests and pushed this to master and 11. Thanks again for the report. -- Thomas Munro http://www.enterprisedb.com
Commits
-
Fix handling of HBA ldapserver with multiple hostnames.
- 6b6c64a96dea 11.2 landed
- 257ef3cd4fec 12.0 landed
-
Allow ldaps when using ldap authentication
- 35c0754fadca 11.0 cited