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 1fO6B2-0002ct-Ji for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 18:50:28 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO6Ay-0005Gc-Cv for pgsql-general@arkaria.postgresql.org; Wed, 30 May 2018 18:50:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fO6Ay-0005GS-4e for pgsql-general@lists.postgresql.org; Wed, 30 May 2018 18:50:24 +0000 Received: from tamriel.snowman.net ([2001:470:e38f::11]) by magus.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fO6Au-0006DE-1M for pgsql-general@postgresql.org; Wed, 30 May 2018 18:50:23 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 2EC915F79C; Wed, 30 May 2018 14:50:18 -0400 (EDT) Date: Wed, 30 May 2018 14:50:18 -0400 From: Stephen Frost To: C GG Cc: pgsql-general@postgresql.org Subject: Re: LDAP authentication slow Message-ID: <20180530185018.GT27724@tamriel.snowman.net> References: <20180530160451.GS27724@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="xmmkyI/xKMw6vv/Y" 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 --xmmkyI/xKMw6vv/Y Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * C GG (cgg0007@gmail.com) wrote: > On Wed, May 30, 2018 at 12:04 PM, Stephen Frost wrot= e: > > 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. > > By and large, we're using pre-existing tools that would have to be heavily > modified to co-opt GSSAPI as an authentication method. For some > tools/applications, it's just not practical to use a ticket. But the > username/password paradigm is well supported. Most of these tools aren't > being used on Windows machines. That's not to say that Linux and macOS > don't have robust Kerberos tools available for use, but thinking that > Kerberos tickets are just floating out there in login-space waiting to be > used by psql and other tools isn't really the case in our environment. This argument doesn't really hold much weight. Anything using libpq is likely to work well with GSSAPI and most languages base their access to PG on libpq. Ensuring that a ticket is available also isn't hard with k5start or similar. Even proxying tickets with mod_auth_kerb or similar isn't all that difficult to get going to leverage SPNEGO. > The main reason for moving to LDAP(S) is the ability to enforce password > quality and rotation without the risk of disclosure ( > https://www.postgresql.org/docs/10/static/passwordcheck.html) ... Allowing > pre-hashed passwords to be sent to the back-end circumvents any protectio= ns > passwordcheck might give. Plus, passwordcheck isn't available in all > PostgreSQL environments (I'm specifically thinking of AWS RDS). This seems entirely out-of-place and not related to GSSAPI (pre-hashed passwords..?). Further, password quality and rotation would be able to be handled by AD instead of trying to do it in PG, though this also seems to be conflating different things (are you talking about access =66rom an application, whose password should be randomly generated to begin with, or users..?). > Unless I've missed something GSSAPI is still out of consideration if we're > having to supply username/password combinations in connection strings. There continues to be some confusion here as with GSSAPI you specifically wouldn't need to include passwords in connection strings. > I am still wondering what can we do to speed LDAP(S) up? Is there a > speedier authentication delegation paradigm that utilizes username/passwo= rd > from the client? Passing passwords around between different systems for authentication is likely to be expensive and insecure. Using SCRAM on PG would at least avoid the call out from the PG server to the LDAP server but then you would have different passwords on the different systems potentially. The solution to these issues is to move away from passing passwords around, as Active Directory did. Thanks! Stephen --xmmkyI/xKMw6vv/Y Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJbDvJpAAoJEO1sijiDR2RVKYEQAIQVzRDIO30/2Cf1z1wufxQZ 10oQpf1vof0DCx0b+lqFbQMrGzEUZSBHPpcCrsNtuFLZS6gO9gx/HbQ7tJlX7y4j X/Yh5/goheLClKJpVtNXeLt0axvuxmDrPqkdFbKBSwycvXNehoUMnkt/qN36zXIN AxZ1WzWEJZT7AqAh5meSqiaagkNAVtUNPiJH497AdHPSZi7KujFkMOAGSHnEblWq Ye6umLZ/YMDXPlAnfjLeMEsW+xHOlrHd+7YARNyB0sRoU1GN2e+Mzeq/1O6tSrmP wgRipA4xHg9sCyF7LXHVT7xZBroe6JSf4j6dClqK1BxZQWTnt1/uLqXXBjBhI8l7 rbNqAse+MGFvLVt8txQIMkK7mNfLhelaIKIcCkGgqPX57R1nIn3u6zXfB4Xjhj2i Hab9sPfXUbtRqfYDj5lhpZn9weIbtsZGs1KAE4tmt3FRbFpyBjPGF9YDPKGkJV71 AqhjNQ6MKBu1hqJkF0898h+zNVHTku7Ag0nVGu8oiAH8cuXhc95ezd3RFg3KYuCs PgS+oU+gk1o47Kx7HLCRwyVq9RUt75VVQUWcowW12BbjogS1kD1JWNB6oxLmU2IM 6MGXrVGXc0bikT56IZLYi5R/RVkd6dfUlgVLFEIJ5ZEB6AGVdBTPwjvwcW7TyU8+ VGTx1TrEJBGIFLAkGLN6 =IAeH -----END PGP SIGNATURE----- --xmmkyI/xKMw6vv/Y--