Kim Alvefur <zash@zash.se> [Sat, 04 Mar 2023 17:06:47 +0100] rev 5206
mod_http_oauth2: Calculate client secret expiry in registration response
Not actually the client_secret that expires, but the client_id JWT.
Returning '0' indicating no expiry was incorrect unless JWT expiry is
turned off, which we check for now.
Matthew Wild <mwild1@gmail.com> [Sat, 04 Mar 2023 13:23:26 +0000] rev 5205
mod_http_oauth2: Strip trailing '/' from issuer URL
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 22:54:46 +0100] rev 5204
mod_http_oauth2: Advertise endpoints that are enabled
If you don't set the registration secret, some of these are not actually
available, so don't advertise them.
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 22:48:59 +0100] rev 5203
mod_http_oauth2: Separate client_secret verification key from JWT key
Allows configuring a real JWT key directly in the config, but
the client_secret will be different per host.
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 22:48:38 +0100] rev 5202
mod_http_oauth2: Fix response type config
Wrong variable names
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 22:48:14 +0100] rev 5201
mod_http_oauth2/README: Document config options
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 22:03:50 +0100] rev 5200
mod_http_oauth2: Remove error message
For a while I considered making this a required option but changed my
mind and forgot to edit this.
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 21:45:24 +0100] rev 5199
mod_http_oauth2: Mention name of client when giving out OOB authorization code
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 21:45:05 +0100] rev 5198
mod_http_oauth2: Comment on mutation by other module
Kim Alvefur <zash@zash.se> [Fri, 03 Mar 2023 21:14:19 +0100] rev 5197
mod_http_oauth2: Implement stateless dynamic client registration
Replaces previous explicit registration that required either the
additional module mod_adhoc_oauth2_client or manually editing the
database. That method was enough to have something to test with, but
would not probably not scale easily.
Dynamic client registration allows creating clients on the fly, which
may be even easier in theory.
In order to not allow basically unauthenticated writes to the database,
we implement a stateless model here.
per_host_key := HMAC(config -> oauth2_registration_key, hostname)
client_id := JWT { client metadata } signed with per_host_key
client_secret := HMAC(per_host_key, client_id)
This should ensure everything we need to know is part of the client_id,
allowing redirects etc to be validated, and the client_secret can be
validated with only the client_id and the per_host_key.
A nonce injected into the client_id JWT should ensure nobody can submit
the same client metadata and retrieve the same client_secret