Skip to content

Commit

Permalink
[#294] add django-setup-configuration support for mozilla-django-oidc…
Browse files Browse the repository at this point in the history
…-db (#298)
  • Loading branch information
SonnyBA authored Dec 10, 2024
1 parent 4641023 commit b9dd5f8
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 4 deletions.
9 changes: 9 additions & 0 deletions docker/setup_configuration/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,12 @@ openklant_tokens:
organization: Organization XYZ
application: Application XYZ
administration: Administration XYZ

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
20 changes: 20 additions & 0 deletions docs/installation/setup_configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,26 @@ Create a (single) YAML configuration file with your settings:
contact_person: Person 2
email: [email protected]
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:
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
@@ -1,3 +1,4 @@
open-api-framework

django-setup-configuration
mozilla-django-oidc-db[setup-configuration]
7 changes: 5 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ django-sessionprofile==3.0.0
django-setup-configuration==0.4.0
# via
# -r requirements/base.in
# mozilla-django-oidc-db
# open-api-framework
django-simple-certmanager==2.3.0
# via zgw-consumers
Expand Down Expand Up @@ -236,8 +237,10 @@ maykin-2fa==1.0.1
# via open-api-framework
mozilla-django-oidc==4.0.1
# via mozilla-django-oidc-db
mozilla-django-oidc-db==0.19.0
# via open-api-framework
mozilla-django-oidc-db[setup-configuration]==0.20.0
# via
# -r requirements/base.in
# open-api-framework
notifications-api-common==0.3.1
# via commonground-api-common
open-api-framework==0.9.0
Expand Down
3 changes: 2 additions & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,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==2.3.0
# via
Expand Down Expand Up @@ -422,7 +423,7 @@ mozilla-django-oidc==4.0.1
# via
# -r requirements/base.txt
# mozilla-django-oidc-db
mozilla-django-oidc-db==0.19.0
mozilla-django-oidc-db[setup-configuration]==0.20.0
# 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==2.3.0
# via
Expand Down Expand Up @@ -431,7 +432,7 @@ mozilla-django-oidc==4.0.1
# via
# -r requirements/base.txt
# mozilla-django-oidc-db
mozilla-django-oidc-db==0.19.0
mozilla-django-oidc-db[setup-configuration]==0.20.0
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
1 change: 1 addition & 0 deletions src/openklant/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,5 @@
#
SETUP_CONFIGURATION_STEPS = (
"openklant.setup_configuration.steps.TokenAuthConfigurationStep",
"mozilla_django_oidc_db.setup_configuration.steps.AdminOIDCConfigurationStep",
)

0 comments on commit b9dd5f8

Please sign in to comment.