Skip to content

Commit eedffb3

Browse files
Merge pull request #4912 from open-formulieren/cleanup/3283-enable-new-oidc-endpoint-default
💥 Disable legacy OIDC endpoints by default
2 parents f8095b4 + 64f6152 commit eedffb3

File tree

60 files changed

+1374
-1379
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+1374
-1379
lines changed

docs/configuration/authentication/oidc_digid.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,9 @@ omgeving van de OpenID Connect provider.
4545

4646
**Redirect URI (vanaf Open Formulieren 2.7.0)**
4747

48-
.. warning::
48+
.. versionchanged:: 3.0
4949

50-
Zorg dat Open Formulieren :ref:`geïnstalleerd <installation_index>` is met de
51-
``USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS=false``
52-
:ref:`omgevingsvariabele<installation_environment_config>`, anders worden de legacy
53-
(zie hieronder) endpoints gebruikt.
50+
Open Forms no longer uses the legacy endpoints by default.
5451

5552
Voor de **Redirect URI** vul je ``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` in,
5653
waarbij je ``open-formulieren.gemeente.nl`` vervangt door het relevante domein.

docs/configuration/authentication/oidc_eherkenning.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -60,12 +60,9 @@ maken in de omgeving van de OpenID Connect provider.
6060

6161
**Redirect URI (vanaf Open Formulieren 2.7.0)**
6262

63-
.. warning::
63+
.. versionchanged:: 3.0
6464

65-
Zorg dat Open Formulieren :ref:`geïnstalleerd <installation_index>` is met de
66-
``USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS=false``
67-
:ref:`omgevingsvariabele<installation_environment_config>`, anders worden de legacy
68-
(zie hieronder) endpoints gebruikt.
65+
Open Forms no longer uses the legacy endpoints by default.
6966

7067
Voor de **Redirect URI** vul je ``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` in,
7168
waarbij je ``open-formulieren.gemeente.nl`` vervangt door het relevante domein.

docs/configuration/general/oidc.rst

+2-5
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,9 @@ maken in de omgeving van de OpenID Connect provider.
3838

3939
**Redirect URI (vanaf Open Formulieren 2.7.0)**
4040

41-
.. warning::
41+
.. versionchanged:: 3.0
4242

43-
Zorg dat Open Formulieren :ref:`geïnstalleerd <installation_index>` is met de
44-
``USE_LEGACY_OIDC_ENDPOINTS=false`` en ``USE_LEGACY_ORG_OIDC_ENDPOINTS=false``
45-
:ref:`omgevingsvariabelen<installation_environment_config>`, anders worden de legacy
46-
(zie hieronder) endpoints gebruikt.
43+
Open Forms no longer uses the legacy endpoints by default.
4744

4845
Voor de **Redirect URI** vul je ``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` in,
4946
waarbij je ``open-formulieren.gemeente.nl`` vervangt door het relevante domein. Deze

docs/installation/config.rst

-17
Original file line numberDiff line numberDiff line change
@@ -277,23 +277,6 @@ Other settings
277277
enable :ref:`Organization accounts <configuration_authentication_oidc>`. Defaults
278278
to ``False``.
279279

280-
* ``USE_LEGACY_OIDC_ENDPOINTS``: Defaults to ``True`` for backwards compatibility
281-
reasons. New installations should opt-out. If ``False``, the OIDC callback URL is
282-
``/auth/oidc/callback/``, if ``True``, it is ``/oidc/callback/``.
283-
284-
* ``USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS``: Defaults to ``True`` for backwards compatibility
285-
reasons. New installations should opt-out. If ``False``, the OIDC callback URL is
286-
``/auth/oidc/callback/``, if ``True``, they are:
287-
288-
- ``/digid-oidc/callback/``
289-
- ``/eherkenning-oidc/callback/``
290-
- ``/digid-machtigen-oidc/callback/``
291-
- ``/eherkenning-bewindvoering-oidc/callback/``
292-
293-
* ``USE_LEGACY_ORG_OIDC_ENDPOINTS``: Defaults to ``True`` for backwards compatibility
294-
reasons. New installations should opt-out. If ``False``, the OIDC callback URL is
295-
``/auth/oidc/callback/``, if ``True``, it is ``/org-oidc/callback/``.
296-
297280
* ``SESSION_EXPIRE_AT_BROWSER_CLOSE``: Controls if sessions expire at browser close.
298281
This applies to both the session of end-users filling out forms and staff using the
299282
administrative interface. Enabling this forces users to log in every time they open

docs/installation/upgrade-300.rst

+23
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,29 @@ be aware of, as they may require additional manual actions.
1414
:depth: 1
1515
:local:
1616

17+
Legacy OpenID Connect callback endpoints are now disabled by default
18+
====================================================================
19+
20+
Before Open Forms 3.0, the legacy endpoints were used by default.
21+
22+
The following environment variables now default to ``False`` instead of ``True``:
23+
24+
* ``USE_LEGACY_OIDC_ENDPOINTS``
25+
* ``USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS``
26+
* ``USE_LEGACY_ORG_OIDC_ENDPOINTS``
27+
28+
To keep the old behaviour, make sure you deploy with:
29+
30+
.. code-block:: bash
31+
32+
USE_LEGACY_OIDC_ENDPOINTS=True
33+
USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS=True
34+
USE_LEGACY_ORG_OIDC_ENDPOINTS=True
35+
36+
To use the new behaviour, you must ensure that
37+
``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` is listed in the allowed
38+
**Redirect URI** values of your identity provider.
39+
1740
Removal of price logic
1841
======================
1942

+28-28
Large diffs are not rendered by default.

src/openforms/accounts/tests/data/vcr_cassettes/OIDCFLowTests/OIDCFLowTests.test_happy_flow.yaml src/openforms/accounts/tests/data/vcr_cassettes/OIDCFlowTests/OIDCFlowTests.test_happy_flow.yaml

+28-28
Large diffs are not rendered by default.

src/openforms/accounts/tests/data/vcr_cassettes/OIDCFLowTests/OIDCFLowTests.test_happy_flow_existing_user.yaml src/openforms/accounts/tests/data/vcr_cassettes/OIDCFlowTests/OIDCFlowTests.test_happy_flow_existing_user.yaml

+28-28
Large diffs are not rendered by default.

src/openforms/accounts/tests/test_oidc.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_oidc_button_enabled(self):
6363
)
6464

6565

66-
class OIDCFLowTests(OFVCRMixin, WebTest):
66+
class OIDCFlowTests(OFVCRMixin, WebTest):
6767
VCR_TEST_FILES = TEST_FILES
6868

6969
@mock_admin_oidc_config()

src/openforms/authentication/contrib/digid_eherkenning_oidc/models.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ class Meta:
3131
def oidc_authentication_callback_url(cls) -> str: # type: ignore
3232
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
3333
warnings.warn(
34-
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
34+
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
3535
DeprecationWarning,
3636
)
3737
return "digid_oidc:callback"
@@ -51,7 +51,7 @@ class Meta:
5151
def oidc_authentication_callback_url(cls) -> str: # type: ignore
5252
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
5353
warnings.warn(
54-
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
54+
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
5555
DeprecationWarning,
5656
)
5757
return "digid_machtigen_oidc:callback"
@@ -71,7 +71,7 @@ class Meta:
7171
def oidc_authentication_callback_url(cls) -> str: # type: ignore
7272
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
7373
warnings.warn(
74-
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
74+
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
7575
DeprecationWarning,
7676
)
7777
return "eherkenning_oidc:callback"
@@ -91,7 +91,7 @@ class Meta:
9191
def oidc_authentication_callback_url(cls) -> str: # type: ignore
9292
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
9393
warnings.warn(
94-
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
94+
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
9595
DeprecationWarning,
9696
)
9797
return "eherkenning_bewindvoering_oidc:callback"

0 commit comments

Comments
 (0)