Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💥 Disable legacy OIDC endpoints by default #4912

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions docs/configuration/authentication/oidc_digid.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,9 @@ omgeving van de OpenID Connect provider.

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

.. warning::
.. versionchanged:: 3.0

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

Voor de **Redirect URI** vul je ``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` in,
waarbij je ``open-formulieren.gemeente.nl`` vervangt door het relevante domein.
Expand Down
7 changes: 2 additions & 5 deletions docs/configuration/authentication/oidc_eherkenning.rst
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,9 @@ maken in de omgeving van de OpenID Connect provider.

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

.. warning::
.. versionchanged:: 3.0

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

Voor de **Redirect URI** vul je ``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` in,
waarbij je ``open-formulieren.gemeente.nl`` vervangt door het relevante domein.
Expand Down
7 changes: 2 additions & 5 deletions docs/configuration/general/oidc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,9 @@ maken in de omgeving van de OpenID Connect provider.

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

.. warning::
.. versionchanged:: 3.0

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

Voor de **Redirect URI** vul je ``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` in,
waarbij je ``open-formulieren.gemeente.nl`` vervangt door het relevante domein. Deze
Expand Down
17 changes: 0 additions & 17 deletions docs/installation/config.rst
Original file line number Diff line number Diff line change
Expand Up @@ -277,23 +277,6 @@ Other settings
enable :ref:`Organization accounts <configuration_authentication_oidc>`. Defaults
to ``False``.

* ``USE_LEGACY_OIDC_ENDPOINTS``: Defaults to ``True`` for backwards compatibility
reasons. New installations should opt-out. If ``False``, the OIDC callback URL is
``/auth/oidc/callback/``, if ``True``, it is ``/oidc/callback/``.

* ``USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS``: Defaults to ``True`` for backwards compatibility
reasons. New installations should opt-out. If ``False``, the OIDC callback URL is
``/auth/oidc/callback/``, if ``True``, they are:

- ``/digid-oidc/callback/``
- ``/eherkenning-oidc/callback/``
- ``/digid-machtigen-oidc/callback/``
- ``/eherkenning-bewindvoering-oidc/callback/``

* ``USE_LEGACY_ORG_OIDC_ENDPOINTS``: Defaults to ``True`` for backwards compatibility
reasons. New installations should opt-out. If ``False``, the OIDC callback URL is
``/auth/oidc/callback/``, if ``True``, it is ``/org-oidc/callback/``.

* ``SESSION_EXPIRE_AT_BROWSER_CLOSE``: Controls if sessions expire at browser close.
This applies to both the session of end-users filling out forms and staff using the
administrative interface. Enabling this forces users to log in every time they open
Expand Down
23 changes: 23 additions & 0 deletions docs/installation/upgrade-300.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,29 @@ be aware of, as they may require additional manual actions.
:depth: 1
:local:

Legacy OpenID Connect callback endpoints are now disabled by default
====================================================================

Before Open Forms 3.0, the legacy endpoints were used by default.

The following environment variables now default to ``False`` instead of ``True``:

* ``USE_LEGACY_OIDC_ENDPOINTS``
* ``USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS``
* ``USE_LEGACY_ORG_OIDC_ENDPOINTS``

sergei-maertens marked this conversation as resolved.
Show resolved Hide resolved
To keep the old behaviour, make sure you deploy with:

.. code-block:: bash

USE_LEGACY_OIDC_ENDPOINTS=True
USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS=True
USE_LEGACY_ORG_OIDC_ENDPOINTS=True

To use the new behaviour, you must ensure that
``https://open-formulieren.gemeente.nl/auth/oidc/callback/`` is listed in the allowed
**Redirect URI** values of your identity provider.

Removal of price logic
======================

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/openforms/accounts/tests/test_oidc.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def test_oidc_button_enabled(self):
)


class OIDCFLowTests(OFVCRMixin, WebTest):
class OIDCFlowTests(OFVCRMixin, WebTest):
VCR_TEST_FILES = TEST_FILES

@mock_admin_oidc_config()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class Meta:
def oidc_authentication_callback_url(cls) -> str: # type: ignore
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
warnings.warn(
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
DeprecationWarning,
)
return "digid_oidc:callback"
Expand All @@ -51,7 +51,7 @@ class Meta:
def oidc_authentication_callback_url(cls) -> str: # type: ignore
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
warnings.warn(
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
DeprecationWarning,
)
return "digid_machtigen_oidc:callback"
Expand All @@ -71,7 +71,7 @@ class Meta:
def oidc_authentication_callback_url(cls) -> str: # type: ignore
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
warnings.warn(
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
DeprecationWarning,
)
return "eherkenning_oidc:callback"
Expand All @@ -91,7 +91,7 @@ class Meta:
def oidc_authentication_callback_url(cls) -> str: # type: ignore
if settings.USE_LEGACY_DIGID_EH_OIDC_ENDPOINTS:
warnings.warn(
"Legacy DigiD-eHerkenning callback endpoints will be removed in 3.0",
"Legacy DigiD-eHerkenning callback endpoints will be removed in 4.0",
DeprecationWarning,
)
return "eherkenning_bewindvoering_oidc:callback"
Expand Down
Loading
Loading