pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephen Frost <sfrost@snowman.net>
To: chlor <hans.schou@gmail.com>
Cc: pgsql-general <pgsql-general@postgresql.org>
Subject: Re: LDAP, single sign on from Windows client
Date: Tue, 6 Apr 2021 11:59:19 -0400
Message-ID: <20210406155919.GD20766@tamriel.snowman.net> (raw)
In-Reply-To: <CAApBw35bJPAmKkPXNHyGtCgE6D6AAXiJmpYPe=d8A2_LJQ=3bg@mail.gmail.com>
References: <CAApBw35bJPAmKkPXNHyGtCgE6D6AAXiJmpYPe=d8A2_LJQ=3bg@mail.gmail.com>

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=example.org ldapprefix="" ldapsuffix="@example.org"
> 
> 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 the
> AD.
> 
> 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-gssapi-kerberos-authentication

Thanks,

Stephen

Attachments:

  signature.asc (application/pgp-signature, 818B) download

view thread (2+ messages)

Message-ID: <20210406155919.GD20766@tamriel.snowman.net>
Permalink:  ../20210406155919.GD20766@tamriel.snowman.net/
Also on:    postgresql.org/message-id/20210406155919.GD20766@tamriel.snowman.net

 · 

reply

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: sfrost@snowman.net, hans.schou@gmail.com
  Subject: Re: LDAP, single sign on from Windows client
  In-Reply-To: <20210406155919.GD20766@tamriel.snowman.net>
  References: <CAApBw35bJPAmKkPXNHyGtCgE6D6AAXiJmpYPe=d8A2_LJQ=3bg@mail.gmail.com> <20210406155919.GD20766@tamriel.snowman.net>

* 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