pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael van der Kolff <mvanderkolff@gmail.com>
To: Niels Jespersen <NJN@dst.dk>
Cc: pgsql-general list <pgsql-general@lists.postgresql.org>
Subject: Re: GSSAPI authentication
Date: Mon, 6 Jun 2022 23:42:06 +1000
Message-ID: <CAFBbO2QSpXg8xEhQu8mLCAznYWmpPzQGnePHn0LfpJJ9ORy-Lw@mail.gmail.com> (raw)
In-Reply-To: <CAFBbO2Qm679OAjDuZOj7FHWOv-mSbbvCNOJfdKWfHbfriEEMUw@mail.gmail.com>
References: <9f1254f4ffc24460a3c0ba34f062f33e@dst.dk>
	<CAFBbO2Qn4V=V-ZBjBnh-4FVQKJDSkBk+YgVNf0_8B-fSj_tKQA@mail.gmail.com>
	<02f8b9de128f49078c4eb2af1e5438c2@dst.dk>
	<CAFBbO2Qm679OAjDuZOj7FHWOv-mSbbvCNOJfdKWfHbfriEEMUw@mail.gmail.com>

Oh wait, I see.

On Mon, Jun 6, 2022 at 11:41 PM Michael van der Kolff <
mvanderkolff@gmail.com> wrote:

> The part that you're missing, I think, is that Kerberized services require
> a service account.
>
> The SPN (service principal name) is the name that is used in Kerberos
> contexts for that service account. PostgreSQL uses postgres/${hostname}@${realm}
> by default - see https://www.postgresql.org/docs/14/gssapi-auth.html.
>
> The important part to note here is that $hostname must match what is
> registered in the SPN for the user that you're using as the service account
> in AD. It might (I don't know) have to match what AD believes about the
> host from its PTR records for that domain as well.
>
> --Michael
>
> On Mon, Jun 6, 2022 at 11:33 PM Niels Jespersen <NJN@dst.dk> wrote:
>
>> *Fra:* Michael van der Kolff <mvanderkolff@gmail.com>
>> *Sendt:* 6. juni 2022 14:26
>> *Til:* Niels Jespersen <NJN@dst.dk>
>> *Cc:* pgsql-general list <pgsql-general@lists.postgresql.org>
>> *Emne:* Re: GSSAPI authentication
>>
>>
>>
>> >This sounds like your PG service was unable to authenticate itself to AD.
>>
>> >
>>
>> >There's probably a trick to that somewhere - AD doesn't really want to
>> be a Kerberos server, it just happens to use it 😉
>>
>>
>>
>> But it works fine when the same AD-user connects from Windows to the same
>> postgres (Linux) server. Auth fails when the user initiates login from a
>> Linux box (that otherwise uses Kerberized ressources just fine).
>>
>>
>>
>> Niels
>>
>

view thread (6+ messages)  latest in thread

Message-ID: <CAFBbO2QSpXg8xEhQu8mLCAznYWmpPzQGnePHn0LfpJJ9ORy-Lw@mail.gmail.com>
Permalink:  ../CAFBbO2QSpXg8xEhQu8mLCAznYWmpPzQGnePHn0LfpJJ9ORy-Lw@mail.gmail.com/
Also on:    postgresql.org/message-id/CAFBbO2QSpXg8xEhQu8mLCAznYWmpPzQGnePHn0LfpJJ9ORy-Lw@mail.gmail.com

 · 

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: mvanderkolff@gmail.com, NJN@dst.dk
  Subject: Re: GSSAPI authentication
  In-Reply-To: <CAFBbO2QSpXg8xEhQu8mLCAznYWmpPzQGnePHn0LfpJJ9ORy-Lw@mail.gmail.com>
  References: <9f1254f4ffc24460a3c0ba34f062f33e@dst.dk> <CAFBbO2Qn4V=V-ZBjBnh-4FVQKJDSkBk+YgVNf0_8B-fSj_tKQA@mail.gmail.com> <02f8b9de128f49078c4eb2af1e5438c2@dst.dk> <CAFBbO2Qm679OAjDuZOj7FHWOv-mSbbvCNOJfdKWfHbfriEEMUw@mail.gmail.com> <CAFBbO2QSpXg8xEhQu8mLCAznYWmpPzQGnePHn0LfpJJ9ORy-Lw@mail.gmail.com>

* 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