Re: pg16 && GSSAPI && Heimdal/Macos

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: "Todd M(dot) Kover" <kovert(at)omniscient(dot)com>, Nico Williams <nico(at)cryptonector(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: pg16 && GSSAPI && Heimdal/Macos
Date: 2025-05-28 21:45:49
Message-ID: CAOYmi+=bsb1u+CrkVSMU3DTvQn_XDDBO4zKuzyeC+bBFaPVZNQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, May 28, 2025 at 9:25 AM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> Personally, I'd be more happy to "maintain GSS on Mac using
> non-deprecated interfaces" than "maintain GSS via Heimdal,
> best-effort, some of the time". I think the former puts less of a
> burden on our testing matrix.

I was curious enough to put in some time to get GSS.framework
compiling via Autoconf, and I might as well share the ugly code I've
got. There are some similarities to Todd's earlier patch, but
decisions are made at different places; it detects either MIT Kerberos
or GSS.framework. And I haven't looked at the Meson side yet.

- I am not well-versed in frameworks. There's a bunch of namespace
pollution in Apple's GSS headers, and I'm hoping I'm missing some
magic #define to make that all go away.

- My handling of pg_store_delegated_credential() here isn't something
I'm seriously proposing. I think we should find a way to get it
working on Mac, using Nico's notes upthread. I can't commit to working
on that myself, but I'm definitely willing to put some review cycles
in, since I reviewed a bit of the original delegation feature.

- I also want to draw attention to the fact that libpq can't claim
that a credential is delegated if it's not; that breaks the security
of our FDWs. So pg_store_delegated_credential() cannot be a no-op.

--Jacob

Attachment Content-Type Size
0001-WIP-move-GSSAPI-checks-into-their-own-macro.patch application/x-patch 2.1 KB
0002-WIP-fall-back-to-GSS.framework-on-macOS.patch application/x-patch 11.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-05-28 21:59:35 Re: pg16 && GSSAPI && Heimdal/Macos
Previous Message Sami Imseih 2025-05-28 21:05:03 Re: queryId constant squashing does not support prepared statements