Commit Graph

7 Commits

Author SHA1 Message Date
Pascal Bleser
c400949718 groupware: add OIDC authentication support between Groupware backend and Stalwart
* re-implement the auth-api service to authenticate Reva tokens
   following the OIDC Userinfo endpoint specification

 * pass the context where necessary and add an authenticator interface
   to the JMAP HTTP driver, in order to select between master
   authentication (which is used when GROUPWARE_JMAP_MASTER_USERNAME and
   GROUPWARE_JMAP_MASTER_PASSWORD are both set) and OIDC token
   forwarding through bearer auth

 * add Stalwart directory configuration "idmoidc" which uses the
   OpenCloud auth-api service API (/auth/) to validate the token it
   received as bearer auth from the Groupware backend's JMAP client,
   using it as an OIDC Userinfo endpoint

 * implement optional additional shared secret to secure the Userinfo
   service, as an additional path parameter
2026-04-30 10:51:44 +02:00
Pascal Bleser
3e377694b2 auth-api: deal with errors properly in NewService 2026-04-30 10:51:44 +02:00
Pascal Bleser
8dd74c201a groupware: migrate to cobra instead of urfave 2026-04-30 10:51:44 +02:00
Pascal Bleser
c8c9eac1ce groupware, auth-api: remove tracing and tracing configuration 2026-04-30 10:51:43 +02:00
Pascal Bleser
f6603cf4f5 auth-api: fix: was missing newly introduced metrics 2026-04-30 10:51:40 +02:00
Pascal Bleser
aff1fc87a0 Introduce a the auth-api service
* primitive implementation to demonstrate how it could work, still to
   be considered WIP at best

 * add new dependency: MicahParks/jwkset and MicahParks/keyfunc to
   retrieve the JWK set from KeyCloak to verify the signature of the
   JWTs sent as part of Bearer authentication in the /auth API

 * (minor) opencloud/.../service.go: clean up a logging statement that
   was introduced earlier to hunt down why the auth-api service was not
   being started
2026-04-30 10:51:40 +02:00
Pascal Bleser
de6708faf8 add an auth-api service to make an exemplary implementation of an external authentication API for third party services such as Stalwart 2026-04-30 10:51:40 +02:00