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: 2024-12-12 00:18:28
Message-ID: CAOYmi+k+M+FeMn=MnDV3ku8OMWHc5P=mpeKgbkiq-K9fFSsbWw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Dec 5, 2024 at 10:29 AM Jacob Champion
<jacob(dot)champion(at)enterprisedb(dot)com> wrote:
>
> Next up, the many-many documentation requests, now that the fuzzers
> can run while I write.

v39 adds a great deal of documentation for implementers of custom
client flows and validators, and addresses the following upthread
feedback:
- the trust_validator_authz HBA option has been renamed to
delegate_ident_mapping
- delegate_ident_mapping is now tested as part of the oauth_validator suite
- typedefs for AsyncAuthFunc, OAuthStep, and fe_oauth_state_enum have
been removed (and the last has been renamed `enum fe_oauth_step`)
- pg_oauth_mech has been moved to fe-auth-oauth.h
- PostgreSQL::Test::OAuthServer has been moved into the
oauth_validator folder as OAuth::Server
- pgperlcritic now passes

Of Peter's notes, I think just the Windows testing comments and a
better explanation of the MAX_OAUTH_RESPONSE_SIZE remain.

On Fri, Nov 8, 2024 at 1:21 AM Peter Eisentraut <peter(at)eisentraut(dot)org> wrote:
> * src/interfaces/libpq/libpq-fe.h
>
> The naming scheme of types and functions in this file is clearly
> obscure and has grown randomly over time. But at least my intuition
> is that the preferred way is
>
> types start with PG
> function start with PQ
>
> and the next letter is usually lower case. (PQconnectdb, PQhost,
> PGconn, PQresult)

Okay, I think I've corrected this (`struct PQxxx` are now `struct
PGxxx`, PGAuthData is now PGauthData). To summarize the new API:
- PGauthData is an enum containing PQAUTHDATA_* constants
- PGpromptOAuthDevice and PGoauthBearerRequest are type-specific
callback structures
- the PQauthDataHook and all of its related types and API start with
PQ, to parallel the PQsetSSLKeyPassHook_OpenSSL API

Thanks,
--Jacob

Attachment Content-Type Size
since-v38.diff.txt text/plain 84.1 KB
v39-0001-Add-OAUTHBEARER-SASL-mechanism.patch application/octet-stream 286.1 KB
v39-0002-DO-NOT-MERGE-Add-pytest-suite-for-OAuth.patch application/octet-stream 206.4 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2024-12-12 00:20:15 Re: Fix comments related to pending statistics
Previous Message Jeff Davis 2024-12-11 23:55:55 Re: Pre-proposal: unicode normalized text