diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 48a940a..b506f32 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,9 @@ Changelog 0.20.0 (????) ============= +New Features: + +* Add optional support for ``django setup configuration`` 0.19.0 (2024-07-02) diff --git a/docs/index.rst b/docs/index.rst index 132e0f9..4936494 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -33,6 +33,7 @@ Using ``email`` as the unique identifier is not recommended, as mentioned in the quickstart customizing + setup_configuration reference architecture changelog diff --git a/docs/quickstart.rst b/docs/quickstart.rst index f7595f9..e8ee57b 100644 --- a/docs/quickstart.rst +++ b/docs/quickstart.rst @@ -24,6 +24,12 @@ This will also install the following packages: - ``django-solo`` - ``django-jsonform`` +You can optionally install ``django-setup-configuration`` support with: + +.. code-block:: bash + + pip install mozilla-django-oidc-db[setupconfig] + Django settings --------------- diff --git a/docs/setup_configuration.rst b/docs/setup_configuration.rst new file mode 100644 index 0000000..d34fbf7 --- /dev/null +++ b/docs/setup_configuration.rst @@ -0,0 +1,57 @@ +========================== +Django Setup Configuration +========================== + +There is optional support for ``django-setup-configuration`` that must be installed with + +.. code-block:: bash + + pip install mozilla-django-oidc-db[setupconfig] + + +You must define the required django settings mentioned below and and put the ``AdminOIDCConfigurationStep`` +in your django-setup-configuration steps: + +.. code-block:: python + + SETUP_CONFIGURATION_STEPS = [ + ... + "mozilla_django_oidc_db.setupconfig.bootstrap.auth.AdminOIDCConfigurationStep", + ... + ] + +Environment Variables +=============================== + +Required +-------- + +* ``ADMIN_OIDC_OIDC_RP_CLIENT_ID`` +* ``ADMIN_OIDC_OIDC_RP_CLIENT_SECRET`` + + +Optional +-------- + + +* ``ADMIN_OIDC_OIDC_RP_SCOPES_LIST`` +* ``ADMIN_OIDC_OIDC_RP_SIGN_ALGO`` +* ``ADMIN_OIDC_OIDC_RP_IDP_SIGN_KEY`` +* ``ADMIN_OIDC_OIDC_OP_DISCOVERY_ENDPOINT`` +* ``ADMIN_OIDC_OIDC_OP_JWKS_ENDPOINT`` +* ``ADMIN_OIDC_OIDC_OP_AUTHORIZATION_ENDPOINT`` +* ``ADMIN_OIDC_OIDC_OP_TOKEN_ENDPOINT`` +* ``ADMIN_OIDC_OIDC_OP_USER_ENDPOINT`` +* ``ADMIN_OIDC_USERNAME_CLAIM`` +* ``ADMIN_OIDC_GROUPS_CLAIM`` +* ``ADMIN_OIDC_CLAIM_MAPPING`` +* ``ADMIN_OIDC_SYNC_GROUPS`` +* ``ADMIN_OIDC_SYNC_GROUPS_GLOB_PATTERN`` +* ``ADMIN_OIDC_DEFAULT_GROUPS`` +* ``ADMIN_OIDC_MAKE_USERS_STAFF`` +* ``ADMIN_OIDC_SUPERUSER_GROUP_NAMES`` +* ``ADMIN_OIDC_OIDC_USE_NONCE`` +* ``ADMIN_OIDC_OIDC_NONCE_SIZE`` +* ``ADMIN_OIDC_OIDC_STATE_SIZE`` +* ``ADMIN_OIDC_OIDC_EXEMPT_URLS`` +* ``ADMIN_OIDC_USERINFO_CLAIMS_SOURCE`` diff --git a/mozilla_django_oidc_db/setupconfig/bootstrap/auth.py b/mozilla_django_oidc_db/setupconfig/bootstrap/auth.py index 5b14218..e826d80 100644 --- a/mozilla_django_oidc_db/setupconfig/bootstrap/auth.py +++ b/mozilla_django_oidc_db/setupconfig/bootstrap/auth.py @@ -38,7 +38,6 @@ class AdminOIDCConfigurationStep(BaseConfigurationStep): "ADMIN_OIDC_OIDC_USE_NONCE", "ADMIN_OIDC_OIDC_NONCE_SIZE", "ADMIN_OIDC_OIDC_STATE_SIZE", - "ADMIN_OIDC_OIDC_EXEMPT_URLS", "ADMIN_OIDC_USERINFO_CLAIMS_SOURCE", ] enable_setting = "ADMIN_OIDC_CONFIG_ENABLE"