From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Kumar, Virendra <Virendra.Kumar@guycarp.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: Re: Multiple LDAP Servers for ldap Authentication
Date: Thu, 20 Dec 2018 15:47:26 -0300
Message-ID: <20181220184726.o2famnw2hucj734a@alvherre.pgsql> (raw)
In-Reply-To: <a60437babc7444599ef46211720e3585@USFKL11XG20CN01.mercer.com>
Hello Virendra
On 2018-Dec-20, Kumar, Virendra wrote:
> I am going through ldap authentication documents in PostgreSQL and found that we can specify multiple ldap servers but sure how. I have put two entries in double quotes like below:
> --
> host all all 0.0.0.0/0 ldap ldapserver="server1.com server2.com" ldapprefix=PROD01\
>
> There is no complain when reloading the pg_hba.conf file however when server1.com is down the connection just times out instead of trying server2. Does anybody have idea how to configure it or how to make this work.
Reading the server code, I find this rather surprising. The ldapserver
string is passed directly to ldap_init(), which per its manual should
use the multiple servers:
"The host parameter may contain a blank-separated list of hosts to try
to connect to, and each host may optionally by of the form
host:port."
( quoted from https://linux.die.net/man/3/ldap_init )
Maybe the library you have does not behave in the same way? It would be
good to confirm that the LDAP library you have is OpenLDAP and not
something else. Can you run an `ldd` on the postgres binary and see
what the output says about ldap?
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: alvherre@2ndquadrant.com, Virendra.Kumar@guycarp.com
Subject: Re: Multiple LDAP Servers for ldap Authentication
In-Reply-To: <20181220184726.o2famnw2hucj734a@alvherre.pgsql>
References: <a60437babc7444599ef46211720e3585@USFKL11XG20CN01.mercer.com> <20181220184726.o2famnw2hucj734a@alvherre.pgsql>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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