Skip to content

add: Oidc Connect Discovery#4628

Draft
mkleczek wants to merge 1 commit intoPostgREST:mainfrom
mkleczek:work/oidc-connect
Draft

add: Oidc Connect Discovery#4628
mkleczek wants to merge 1 commit intoPostgREST:mainfrom
mkleczek:work/oidc-connect

Conversation

@mkleczek
Copy link
Copy Markdown
Collaborator

@mkleczek mkleczek commented Feb 3, 2026

DISCLAIMER:
This commit was authored entirely by a human without the assistance of LLMs.

Fixes #1130
Fixes #4137

Currently configuring JWT keys is cumbersome and in practice requires implementing Oidc Connect Discovery in a shell script that writes retrieved keys to a file and reloads PostgREST configuration.
Having this implemented in PostgREST would simplify deployment.

OIDC Connect discovery is widely adopted and implemented by practically all OAuth providers (Supabase as well: https://supabase.com/docs/guides/auth/oauth-server#supported-standards)

Next step is to periodically reload keys to facilitate key rotation.

@steve-chavez
Copy link
Copy Markdown
Member

👀 What's the motivation for this?

@mkleczek
Copy link
Copy Markdown
Collaborator Author

mkleczek commented Feb 3, 2026

👀 What's the motivation for this?

Updated description.

Comment thread postgrest.cabal
Comment on lines +161 to +162
, oidc-client >= 0.8.0.0 && < 0.9
, http-client-tls >= 0.3.6.4 && < 0.4
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

http-client-tls is fine, but oidc-client depends on TemplateHaskell, so would block us for #3281 (comment). We should have very good reasons to introduce that without any sane alternatives, because it would effectively prevent us from ever doing cross compilation to platforms without emulator support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Possibility to retrieve JWKS using OpenID Connect Discovery JWKS: load public keys from a well known endpoint

3 participants