Re: Login with LDAP authentication takes 5 seconds

From: Jeff Janes <jeff(dot)janes(at)gmail(dot)com>
To: Andreas Schmid <user462411(at)gmail(dot)com>
Cc: Postgres General <pgsql-general(at)postgresql(dot)org>
Subject: Re: Login with LDAP authentication takes 5 seconds
Date: 2018-05-30 17:23:51
Message-ID: CAMkU=1x+Epx+L_qU27MJ3-iMRCUkNnQaPEOjGggRxSzLry6gQQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, May 28, 2018 at 10:26 AM, Andreas Schmid <user462411(at)gmail(dot)com>
wrote:

> Hi,
>
> I configured my PostgreSQL 10 DB on Debian 9.2 with LDAP authentication
> (simple bind mode). While this basically works, it has the strange effect
> that the first login with psql takes around 5 seconds. When I reconnect
> within 60 seconds, the login completes immediately.
>
> The LDAP server is behind a firewall. So for a test, in pg_hba.conf I put
> the LDAP servers IP address instead of its DNS name (for parameter
> ldapserver). Like that, all logins complete immediately. But in general I
> prefer specifying the DNS name rather than the IP.
>
> When I checked on the DB machine with the following commands
> host my.ldap.server.org
> dig my.ldap.server.org
> both always returned the host name and IP address of the LDAP server
> immediately.
>

Out of curiosity, what if you use "ping" rather than "dig" or "host"?

Cheers,

Jeff

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2018-05-30 17:53:41 Re: Pgagent is not reading pgpass file either in Windows or Linux.
Previous Message C GG 2018-05-30 17:08:08 Re: LDAP authentication slow