Re: [PoC] Federated Authn/z with OAUTHBEARER - Mailing list pgsql-hackers

From Jacob Champion
Subject Re: [PoC] Federated Authn/z with OAUTHBEARER
Date
Msg-id CAOYmi+=0aPuHK_PpstJ9Wg7091Js2W9v6ZcW2k+DjA91U=EvZw@mail.gmail.com
Whole thread Raw
In response to Re: [PoC] Federated Authn/z with OAUTHBEARER  (Antonin Houska <ah@cybertec.at>)
List pgsql-hackers
On Tue, Oct 8, 2024 at 3:46 AM Antonin Houska <ah@cybertec.at> wrote:
> Perhaps I understand now. I use getmail [2] to retrieve email messages from my
> Google account. What made me confused is that the getmail application,
> although installed on my workstation (and thus the bearer token it eventually
> gets contains my email address), it's "someone else" (in particular the
> "Relying Party") from the perspective of the OpenID protocol. And the same
> applies to "psql" in the context of your patch.
>
> Thus, in addition to the email, we'd need special claims which authorize the
> RPs to access the database and only the database. Does this sound correct?

Yes. (One nitpick: the "special claims" in this case are not OpenID
claims at all, but OAuth scopes. The HBA will be configured with the
list of scopes that the server requires, and it requests those from
the client during the SASL handshake.)

> I'd like to play with the code a bit and provide some review before or during
> the next CF. That will probably generate some more questions.

Thanks very much for the review!

--Jacob



pgsql-hackers by date:

Previous
From: Alena Rybakina
Date:
Subject: Re: On disable_cost
Next
From: Alena Rybakina
Date:
Subject: Re: Add parallel columns for seq scan and index scan on pg_stat_all_tables and _indexes