From 203b3edcaeaccf76312e7844b289f7f232381d61 Mon Sep 17 00:00:00 2001 From: Manuel Raynaud Date: Mon, 20 Apr 2026 17:14:09 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B(backend)=20load=20jwks=20url=20whe?= =?UTF-8?q?n=20OIDC=5FRS=5FPRIVATE=5FKEY=5FSTR=20is=20set?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the resource server is enabled and the backend used is JWTResourceServerBackend, then the API should expose a JWKS endpoint to share the RSA public key to the OIDC provider. Everything is made in the Django LaSuite library, but the URL is not included in the Docs URLs. This commit adds it when the setting OIDC_RS_PRIVATE_KEY_STR is set. --- CHANGELOG.md | 1 + src/backend/core/urls.py | 9 +++++++++ 2 files changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcfcf513..b9f3f0f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ and this project adheres to - 🐛(frontend) abort check media status unmount #2194 - ✨(backend) order pinned documents by last updated at #2028 - 🛂(frontend) fix cannot manage member on small screen #2226 +- 🐛(backend) load jwks url when OIDC_RS_PRIVATE_KEY_STR is set ## [v4.8.6] - 2026-04-08 diff --git a/src/backend/core/urls.py b/src/backend/core/urls.py index cf4de465..e8961865 100644 --- a/src/backend/core/urls.py +++ b/src/backend/core/urls.py @@ -4,6 +4,7 @@ from django.conf import settings from django.urls import include, path, re_path from lasuite.oidc_login.urls import urlpatterns as oidc_urls +from lasuite.oidc_resource_server.urls import urlpatterns as oidc_resource_server_urls from rest_framework.routers import DefaultRouter from core.api import viewsets @@ -117,3 +118,11 @@ if settings.OIDC_RESOURCE_SERVER_ENABLED: ), ) ) + + if settings.OIDC_RS_PRIVATE_KEY_STR: + urlpatterns.append( + path( + f"api/{settings.API_VERSION}/", + include([*oidc_resource_server_urls]), + ) + )