Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO3ar-0008SO-Me for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 16:04:57 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO3aq-0005zS-0z for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 16:04:56 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO3ap-0005xy-L4 for pgsql-general@lists.postgresql.org; Wed, 30 May 2018 16:04:55 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by makus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO3am-0002Z7-HB for pgsql-general@postgresql.org; Wed, 30 May 2018 16:04:53 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id B104C5F79C; Wed, 30 May 2018 12:04:51 -0400 (EDT) Date: Wed, 30 May 2018 12:04:51 -0400 From: Stephen Frost To: C GG Cc: pgsql-general@postgresql.org Subject: Re: LDAP authentication slow Message-ID: <20180530160451.GS27724@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="qvNXqWGPzw7CXWpS" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --qvNXqWGPzw7CXWpS Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Greetings, * C GG (cgg0007@gmail.com) wrote: > This is PostgreSQL 9.5 -- We just enabled LDAP(S) authentication (to an > Active Directory server) for a certain grouping of users You really shouldn't be using LDAP auth to an Active Directory system. Active Directory supports Kerberos, which is a much more secure way to authenticate. > I'm getting complaints from the users authenticating using ldap that > database operations are taking quite a bit longer than they were previously > when they were authenticating with MD5 stored passwords. Clearly, there's > more machinery at work with that kind of operation, but the increase in > time is way more that I would have estimated. Using Kerberos/GSSAPI will be much faster as you only need to get a ticket and then that can be reused to authenticate multiple times to the database without having to contact the LDAP server. > I still want them to be able to type in a password, so GSSAPI is out for an > alternative (right?) ... Is there something I can do to help speed things > up? If there any telemetry that I can generate (logs, stats, etc.) which > might be able to pinpoint a bottleneck? What's the reason for wishing for them to "be able to type in a password"? With GSSAPI/Kerberos, users get true single-sign-on, so they would log into the Windows system with a password and then have a TGT which can be used to authenticate to other services without having to type in their password over and over again. Thanks! Stephen --qvNXqWGPzw7CXWpS Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbDsujAAoJEO1sijiDR2RV1qEP/0pfbYZluOxsXbG1qvCxUmbx B3ceUPdQ0EA11+oH4+NVvr6emdVgsYagY8m/SWdSAnZ4FkQJCt2+YXVHGM7zke7L OmYEyaij9f1f09pkoEg4MIfpmJYhVVbl1DWUJoJ6aS6xjK+CFFurRU5ASr7UrxIH ckHwB2QRalMZpw7tocJGyX9jUb3drC5hVlwtH2ISF624jXh3VZTyMfQJck8K9oyC dFjCExHvHLUrMhYFD3b4QhZp0Wtp868KNy83Et9s6mS7TP8PejbO/ws0jEAhUEeb yBwkwLSqFGcKvxAEQKIhJmZg0pntw1UB3BD4JsqkBr0UprLqD1XXbI8hvvn+Cynz wxzyFZ3Xx0kAZSXLHakWUTx3qYoG0Ws29Nz1IH6YjED2O3n2z+4hmDXa0J+wT5CG p4q+89F2DHkZGUdxaDgJeIGwequRq4p0ys6Yo4+22Zn8JqFIp7ABJa9GV568YkVy U1vted75rZxsbJKAKfLw136UuiQ1JDi2f1YZHTqE2+0VGnxpcj+YT3Ic/KCVZn9L Etv/xiniw1PH6QIr8jNj9UIUpsTwc4doXsgIdgV5rg/DR+gQ7x7Q/yZiI3VLXx2u TTz+8nWvzm7qUJjLCEm5nhVMHbAY/ypVnvcpI0DOks4tJWdfb2UZZmMwIOGlMN5V EdLVBiecd17b7yNfKg7o =iCZf -----END PGP SIGNATURE----- --qvNXqWGPzw7CXWpS--