Re: [PoC] Federated Authn/z with OAUTHBEARER

From: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: Peter Eisentraut <peter(at)eisentraut(dot)org>, Antonin Houska <ah(at)cybertec(dot)at>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [PoC] Federated Authn/z with OAUTHBEARER
Date: 2025-02-17 23:51:23
Message-ID: CAOYmi+nP8AM9xm+xUW5kDz7XDF7MKBjuDnQ4LjMEm07tpwDgrg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Feb 17, 2025 at 10:15 AM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
> It's been a little bit since I've re-run my
> fuzzers, and a new Valgrind run would be a good idea, so I will just
> keep throwing tests at it

Fuzzers are happy so far.

Valgrind did find something! A mistake I made during parameter
discovery: setup_oauth_parameters() ensures that conn->oauth_issuer_id
is always set using the "issuer" connection option, but during the
second connection, I reassigned the pointer for it (and
conn->oauth_discovery_uri) and leaked the previous allocations.

v52-0002 fixes that. I've taken the opportunity to document that those
two parameters are designed to be unchangeable for the connection once
they've been assigned.

--

Reviews for the commit message:

> postgres cannot ship with one built-in.

s/postgres/Postgres/. Maybe a softening to "does not" ship with one?

> Each pg_hba entry can
> specify one, or more, validators or be left blank for the validator
> installed as default.

Each pg_hba entry can specify only one of the DBA-blessed validators, not more.

> This adds a requirement on libucurl

s/libucurl/libcurl/

And as discussed offlist, we should note that the builtin device flow
is not currently supported on Windows.

Thanks!
--Jacob

Attachment Content-Type Size
v52-0001-Add-support-for-OAUTHBEARER-SASL-mechanism.patch application/octet-stream 324.0 KB
v52-0002-fixup-Add-support-for-OAUTHBEARER-SASL-mechanism.patch application/octet-stream 1.4 KB
v52-0003-cirrus-Temporarily-fix-libcurl-link-error.patch application/octet-stream 1.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message David G. Johnston 2025-02-17 23:54:49 Re: Use or not record count on examples
Previous Message Michael Paquier 2025-02-17 23:46:17 Re: Commitfest app release on Feb 17 with many improvements