Skip to content

Commit 7258a5e

Browse files
committed
🔥 Remove oidc_exempt_urls from config model
this field was never actually used, and it does not make sense to make settings that refer to Django stuff (URL patterns in this case) manually configurable instead of programmatically. It caused issues in Open Forms (#4435) where it required manual action from admins if it was kept as a model field.
1 parent bcd89a2 commit 7258a5e

File tree

4 files changed

+20
-13
lines changed

4 files changed

+20
-13
lines changed

docs/quickstart.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ and the following settings from ``mozilla-django-oidc`` for OpenID Connect can b
147147
- ``OIDC_RP_IDP_SIGN_KEY``
148148
- ``OIDC_USE_NONCE``
149149
- ``OIDC_STATE_SIZE``
150-
- ``OIDC_EXEMPT_URLS``
151150

152151
In case no value is provided for one of these variables, the default from ``mozilla-django-oidc``
153152
will be used (if there is one). A detailed description of all settings can be found in the `mozilla-django-oidc settings documentation`_.

mozilla_django_oidc_db/admin.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ class OpenIDConnectConfigAdmin(SingletonModelAdmin):
7070
"oidc_use_nonce",
7171
"oidc_nonce_size",
7272
"oidc_state_size",
73-
"oidc_exempt_urls",
7473
"userinfo_claims_source",
7574
),
7675
"classes": [
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Generated by Django 4.2.11 on 2024-07-01 15:15
2+
3+
from django.db import migrations
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
(
10+
"mozilla_django_oidc_db",
11+
"0003_openidconnectconfig_oidc_keycloak_idp_hint_and_more",
12+
),
13+
]
14+
15+
operations = [
16+
migrations.RemoveField(
17+
model_name="openidconnectconfig",
18+
name="oidc_exempt_urls",
19+
),
20+
]

mozilla_django_oidc_db/models.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -160,17 +160,6 @@ class OpenIDConnectConfigBase(SingletonModel):
160160
),
161161
default=32,
162162
)
163-
oidc_exempt_urls = ArrayField(
164-
verbose_name=_("URLs exempt from session renewal"),
165-
base_field=models.CharField(_("Exempt URL"), max_length=1000),
166-
default=list,
167-
blank=True,
168-
help_text=_(
169-
"This is a list of absolute url paths, regular expressions for url paths, "
170-
"or Django view names. This plus the mozilla-django-oidc urls are exempted "
171-
"from the session renewal by the SessionRefresh middleware."
172-
),
173-
)
174163

175164
# Keycloak specific config
176165
oidc_keycloak_idp_hint = models.CharField(

0 commit comments

Comments
 (0)