Re: [PoC] Federated Authn/z with OAUTHBEARER

From: Christoph Berg <myon(at)debian(dot)org>
To: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Peter Eisentraut <peter(at)eisentraut(dot)org>, 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>, Antonin Houska <ah(at)cybertec(dot)at>
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER
Date: 2025-04-07 21:58:23
Message-ID: Z_RKf5IPsxD6YHCn@msg.df7cb.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Re: Jacob Champion
> > Putting the minor version into the filename would make looking at
> > package diffs harder when upgrading. Do we really need this as opposed
> > to some hardcoded number like libpq.so.5.18 ?
> >
> > Perhaps reusing the number from libpq.so.5.18 also for this lib would
> > be the way to go?
>
> That doesn't address Andres' concern, though; if multiple
> installations all use libpq.so.5.18, they still can't necessarily mix
> and match.

Well the whole world is linking against libpq5.so and not breaking
either. Why is this module worse? (I guess the answer is internal data
structures... but does it have to be worse?)

> > Though for Debian, I'd actually prefer
> > /usr/lib/$DEB_HOST_MULTIARCH/libpq/libpq-oauth...
> > since the libpq packaging is independent from the major version
> > packaging.
>
> Not sure I understand this. Do you mean you'd patch our lookup for
> Debian, to find it there instead of pkglibdir? I don't think we can
> adopt that ourselves, for the same reasons as above; the two sides
> have to be in lockstep.

Because pkglibdir would be something like /usr/lib/postgresql/17/lib,
even when there is only one libpq5 package for all major server
versions on Debian. So if you have postgresql-16 installed, you'd end
up with

/usr/lib/postgresql/16/{bin,lib} everything from PG 16
/usr/lib/x86_64-linux-gnu/libpq* libpq5
/usr/lib/postgresql/17/lib/libpq-oauth.so

... which is weird.

> [1] Future work ideas in this area include allowing other people to
> compile their own loadable flow plugin, so that the utilities can use
> it. (Only Device Authorization can be used by psql et al, for 18.) At
> that point, developers will need a limited API to twiddle the
> connection handle, and our builtin flow(s?) could use the same API.
> But that's not work we can tackle for 18.

Perhaps keep things simple for PG18 and choose a simple filename and
location. If future extensions need something more elaborate, we can
still switch later.

Christoph

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tomas Vondra 2025-04-07 21:58:58 Re: Draft for basic NUMA observability
Previous Message Jakub Wartak 2025-04-07 21:50:07 Re: Draft for basic NUMA observability