Skip to content

Commit

Permalink
[#483] add suport for the mozilla-django-oidc-db configuration step
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonny Bakker committed Dec 12, 2024
1 parent bec6031 commit f2ecb04
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 7 deletions.
9 changes: 8 additions & 1 deletion docker/setup_configuration/data.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
...
oidc_db_config_enable: true
oidc_db_config_admin_auth:
oidc_rp_client_id: client-id
oidc_rp_client_secret: secret
endpoint_config:
oidc_op_authorization_endpoint: https://example.com/realms/test/protocol/openid-connect/auth
oidc_op_token_endpoint: https://example.com/realms/test/protocol/openid-connect/token
oidc_op_user_endpoint: https://example.com/realms/test/protocol/openid-connect/userinfo
21 changes: 21 additions & 0 deletions docs/installation/config_cli.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,27 @@ Mozilla-django-oidc-db
Sites configuration
-------------------

Mozilla-django-oidc-db
----------------------

Create or update the (single) YAML configuration file with your settings:

.. code-block:: yaml
...
oidc_db_config_enable: true
oidc_db_config_admin_auth:
items:
- identifier: admin-oidc
oidc_rp_client_id: client-id
oidc_rp_client_secret: secret
endpoint_config:
oidc_op_discovery_endpoint: https://keycloak.local/protocol/openid-connect/
...
More details about configuring mozilla-django-oidc-db through ``setup_configuration``
can be found at the _`documentation`: https://mozilla-django-oidc-db.readthedocs.io/en/latest/setup_configuration.html.

Execution
=========

Expand Down
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ furl

# Common ground libraries
notifications-api-common
mozilla-django-oidc-db[setup-configuration]
10 changes: 7 additions & 3 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,9 @@ django-sendfile2==0.7.0
django-sessionprofile==3.0.0
# via open-api-framework
django-setup-configuration==0.4.0
# via open-api-framework
# via
# mozilla-django-oidc-db
# open-api-framework
django-simple-certmanager==1.4.1
# via zgw-consumers
django-solo==2.2.0
Expand Down Expand Up @@ -238,8 +240,10 @@ maykin-2fa==1.0.1
# via open-api-framework
mozilla-django-oidc==4.0.0
# via mozilla-django-oidc-db
mozilla-django-oidc-db==0.19.0
# via open-api-framework
mozilla-django-oidc-db[setup-configuration]==0.21.1
# via
# -r requirements/base.in
# open-api-framework
notifications-api-common==0.3.1
# via
# -r requirements/base.in
Expand Down
3 changes: 2 additions & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ django-sessionprofile==3.0.0
django-setup-configuration==0.4.0
# via
# -r requirements/base.txt
# mozilla-django-oidc-db
# open-api-framework
django-simple-certmanager==1.4.1
# via
Expand Down Expand Up @@ -395,7 +396,7 @@ mozilla-django-oidc==4.0.0
# via
# -r requirements/base.txt
# mozilla-django-oidc-db
mozilla-django-oidc-db==0.19.0
mozilla-django-oidc-db[setup-configuration]==0.21.1
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
3 changes: 2 additions & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ django-sessionprofile==3.0.0
django-setup-configuration==0.4.0
# via
# -r requirements/base.txt
# mozilla-django-oidc-db
# open-api-framework
django-simple-certmanager==1.4.1
# via
Expand Down Expand Up @@ -417,7 +418,7 @@ mozilla-django-oidc==4.0.0
# via
# -r requirements/base.txt
# mozilla-django-oidc-db
mozilla-django-oidc-db==0.19.0
mozilla-django-oidc-db[setup-configuration]==0.21.1
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
4 changes: 3 additions & 1 deletion src/objects/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@
#
# Django setup configuration
#
SETUP_CONFIGURATION_STEPS = tuple()
SETUP_CONFIGURATION_STEPS = (
"mozilla_django_oidc_db.setup_configuration.steps.AdminOIDCConfigurationStep",
)

0 comments on commit f2ecb04

Please sign in to comment.