Skip to content

Commit

Permalink
[maykinmedia/objects-api#480] Setup configuration mozilla django OIDC db
Browse files Browse the repository at this point in the history
  • Loading branch information
danielmursa-dev committed Dec 13, 2024
1 parent 6fb512e commit 646dd1c
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bin/setup_configuration.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

# setup initial configuration using environment variables
# setup initial configuration using a yaml file
# Run this script from the root of the repository

set -e
Expand Down
16 changes: 15 additions & 1 deletion docker/setup_configuration/data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,18 @@ sites_config_enable: true
sites_config:
items:
- domain: example.com
name: example
name: example

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_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

# workaround for https://github.com/maykinmedia/django-setup-configuration/issues/27
userinfo_claims_source: id_token
1 change: 1 addition & 0 deletions requirements/base.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ furl
django-jsonsuit
sharing-configs
django-setup-configuration>=0.4.0
mozilla-django-oidc-db[django-setup-configuration]

# API libraries
drf-nested-routers
6 changes: 4 additions & 2 deletions requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,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[django-setup-configuration]==0.21.1
# 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
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,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[django-setup-configuration]==0.21.1
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,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[django-setup-configuration]==0.21.1
# via
# -r requirements/base.txt
# open-api-framework
Expand Down
1 change: 1 addition & 0 deletions src/objecttypes/conf/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,5 @@
SETUP_CONFIGURATION_STEPS = [
"objecttypes.setup_configuration.steps.sites.SitesConfigurationStep",
"objecttypes.setup_configuration.steps.token_auth.TokenAuthConfigurationStep",
"objecttypes.setup_configuration.steps.TokenAuthConfigurationStep",
]

0 comments on commit 646dd1c

Please sign in to comment.