Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTo6v-0005gR-GL for pgsql-general@arkaria.postgresql.org; Tue, 06 Apr 2021 15:59:25 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lTo6u-0008JD-4Q for pgsql-general@arkaria.postgresql.org; Tue, 06 Apr 2021 15:59:24 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lTo6t-0008HX-Rz for pgsql-general@lists.postgresql.org; Tue, 06 Apr 2021 15:59:23 +0000 Received: from tamriel.snowman.net ([70.109.60.50]) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lTo6q-0000Fe-OD for pgsql-general@postgresql.org; Tue, 06 Apr 2021 15:59:22 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 6F5385F799; Tue, 6 Apr 2021 11:59:19 -0400 (EDT) Date: Tue, 6 Apr 2021 11:59:19 -0400 From: Stephen Frost To: chlor Cc: pgsql-general Subject: Re: LDAP, single sign on from Windows client Message-ID: <20210406155919.GD20766@tamriel.snowman.net> References: MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="66VHjgiuAosXCw6X" 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: Archived-At: Precedence: bulk --66VHjgiuAosXCw6X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Greetings, * chlor (hans.schou@gmail.com) wrote: > I have a Linux server which is setup with authentication via LDAP against= a > Windows A/D. In pg_hba I have > host ... ldap ldapserver=3Dexample.org ldapprefix=3D"" ldapsuffix=3D"@exa= mple.org" >=20 > The user is also created in PostgreSQL but without a password. > I can then login with psql from a Windows client with a user defined in t= he > AD. >=20 > But the problem is that psql asks for a password. > Is it possible to make a single sign-on without the password prompt? Yes, use GSSAPI based authentication instead of LDAP. Using GSSAPI is also more secure and avoids sending the user's password to the PG server. PG Docs: https://www.postgresql.org/docs/current/gssapi-auth.html Blog I wrote about setting it up: https://blog.crunchydata.com/blog/windows-active-directory-postgresql-gssap= i-kerberos-authentication Thanks, Stephen --66VHjgiuAosXCw6X Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJgbIVXAAoJEO1sijiDR2RV9gAP/AsoLtBLdw/RSaYStHZUbpqO nDpbWqm581+NB5hQ8x5x8Pnn/mItZa8v7fwsd73Eh+68771xSEB7w9EjwuJVDdWX HSseXbWCwP3PWIQgdgbRmLn6CvYsNHxaKWKfX+H1eUZLvuEznuTIC2ROoThKDonC h0VOaS0uywYhGGWTwchRYgXk9utOtaCEMt9gEs8GwA2TshI+SkCK/XsizqX5mkVN maA+u7LOG13T6ZQ1oZmHkArbOaXpAg6HQp5E80tPPWVmzD/n855v4zvztJF3/pA3 E6vu7oGQ1ITV1v0Nmeg7Yo1BnaVDINHjWZ5E+MFzUDDOtLj0XdYcLftTNqdwkf7Q GS+puSNfcmYLyIknSEWY/2rayEQeedhQ92ugSv/mkHL2DlJxYT019uN0BmO59hVc Wc5NsE1pR1ETlP73HCwNtN+XC/zqL+KwPsEquuQaNnk9No2Vc13HNS1t6/kfNXpq BQ8wR6GR5YuhJa3plET/34I/37x+NzGnNQ4c0WHntD9w2QBZrYSNGfs6NebIJiod S73q9AoPwiWo6SnlO3BwF67oL/CstmRDzXdpkW7pus4Zf9tlurFLg7IxFzIKf6fJ FkZsNfV7oZWDqK9+byjuSI4550/mTbtX5H1rc9ZyZwgMXIckBnwU+WDHvkdHdkHO V6Z61bnG+IkmTtQ8ggj5 =UJvW -----END PGP SIGNATURE----- --66VHjgiuAosXCw6X--