Re: [PoC] Federated Authn/z with OAUTHBEARER

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Christoph Berg <myon(at)debian(dot)org>, Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Daniel Gustafsson <daniel(at)yesql(dot)se>, Thomas Munro <thomas(dot)munro(at)gmail(dot)com>, Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>, Peter Eisentraut <peter(at)eisentraut(dot)org>, Antonin Houska <ah(at)cybertec(dot)at>
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER
Date: 2025-04-05 00:27:46
Message-ID: CAOYmi+moTsgohh5Tf1gn7dBynARV9EFfWaBVPcJD9O=h6RkSCw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Apr 3, 2025 at 12:50 PM Daniel Gustafsson <daniel(at)yesql(dot)se> wrote:
> Thanks, both LGTM so pushed.

Thank you!

On Tue, Apr 1, 2025 at 3:40 PM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> Maybe a better idea would be to ship an SONAME of
> `libpq-oauth.so.0.<major>`, without any symlinks, so that there's
> never any ambiguity about which module belongs with which libpq.

While I was looking into this I found that Debian's going to use the
existence of an SONAME to check other things, which I assume will make
Christoph's life harder. I have switched over to
'libpq-oauth-<major>.so', without any SONAME or symlinks.

v2 simplifies quite a few things and breaks out the new duplicated
code into its own file. I pared down the exports from libpq, by having
it push the pg_g_threadlock pointer directly into the module when
needed. I think a future improvement would be to combine the dlopen
with the libcurl initialization, so that everything is done exactly
once and the module doesn't need to know about threadlocks at all.

i18n is still not working correctly on my machine. I've gotten `make
init-po` to put the files into the right places now, but if I fake a
.po file and install the generated .mo, the translations still don't
seem to be found at runtime. Is anyone able to take a quick look to
see if I'm missing something obvious?

I still need to disable the module entirely on Windows (and other
platforms without support), and potentially rename the --with-libcurl
option.

Thanks,
--Jacob

Attachment Content-Type Size
v2-0001-WIP-split-Device-Authorization-flow-into-dlopen-d.patch application/octet-stream 21.0 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2025-04-05 02:06:38 Re: Statistics Import and Export
Previous Message Corey Huinker 2025-04-04 23:32:48 Re: Statistics Import and Export