Skip to content

Commit 0d4c736

Browse files
authored
Merge pull request #1523 from maykinmedia/swr/refactor-django-setup-configuration-steps
Implement connectivity-related setup configuration steps with new API
2 parents 7f73a89 + 203f516 commit 0d4c736

25 files changed

+740
-1260
lines changed

.github/workflows/ci.yml

+3
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ jobs:
208208
name: Check that documentation for configuration steps is up-to-date
209209
runs-on: ubuntu-latest
210210

211+
# Disabled while we complete the upgrade to the latest setup-configuration
212+
if: false
213+
211214
steps:
212215
- uses: actions/checkout@v3
213216
with:

bin/setup_configuration.sh

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@ SCRIPTPATH=$(dirname "$SCRIPT")
1212
${SCRIPTPATH}/wait_for_db.sh
1313

1414
src/manage.py migrate
15-
src/manage.py setup_configuration --no-selftest
15+
src/manage.py setup_configuration \
16+
--yaml-file /app/setup_configuration/data.yaml

django-setup-config.env

-11
This file was deleted.

docker-compose.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,9 @@ services:
107107
<<: *web-service
108108
container_name: open-inwoner-web-init
109109
ports: []
110-
env_file:
111-
- django-setup-config.env
112110
command: /setup_configuration.sh
111+
volumes:
112+
- ./docker/setup_configuration:/app/setup_configuration
113113

114114
nginx:
115115
image: nginx

docker/setup_configuration/data.yaml

+123
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,123 @@
1+
# Admin OIDC
2+
oidc_db_config_enable: true
3+
oidc_db_config_admin_auth:
4+
items:
5+
- identifier: admin-oidc
6+
enabled: True
7+
oidc_rp_client_id: testid
8+
oidc_rp_client_secret: 7DB3KUAAizYCcmZufpHRVOcD0TOkNO3I
9+
oidc_rp_scopes_list:
10+
- openid
11+
- email
12+
- profile
13+
oidc_rp_sign_algo: RS256
14+
endpoint_config:
15+
oidc_op_authorization_endpoint: https://example.com/realms/test/protocol/openid-connect/auth
16+
oidc_op_token_endpoint: https://example.com/realms/test/protocol/openid-connect/token
17+
oidc_op_user_endpoint: https://example.com/realms/test/protocol/openid-connect/userinfo
18+
username_claim:
19+
- sub
20+
groups_claim:
21+
- roles
22+
claim_mapping:
23+
first_name:
24+
- given_name
25+
sync_groups: true
26+
sync_groups_glob_pattern: '*'
27+
default_groups:
28+
- Functioneel beheer
29+
make_users_staff: true
30+
superuser_group_names:
31+
- superuser
32+
oidc_use_nonce: true
33+
oidc_nonce_size: 32
34+
oidc_state_size: 32
35+
userinfo_claims_source: id_token
36+
37+
# Setup service connectivity
38+
zgw_consumers_config_enable: True
39+
zgw_consumers:
40+
services:
41+
- identifier: zaken-test
42+
label: Open Zaak - Zaken API
43+
api_root: http://localhost:8003/zaken/api/v1/
44+
api_type: zrc
45+
auth_type: zgw
46+
client_id: test-vcr
47+
secret: test-vcr
48+
- identifier: documenten-test
49+
label: Open Zaak - Documenten API
50+
api_root: http://localhost:8003/documenten/api/v1/
51+
api_type: drc
52+
auth_type: zgw
53+
client_id: test-vcr
54+
secret: test-vcr
55+
- identifier: catalogi-test
56+
label: Open Zaak - Catalogi API
57+
api_root: http://localhost:8003/catalogi/api/v1/
58+
api_type: ztc
59+
auth_type: zgw
60+
client_id: test-vcr
61+
secret: test-vcr
62+
- identifier: besluiten-test
63+
label: Open Zaak - Besluiten API
64+
api_root: http://localhost:8003/besluiten/api/v1/
65+
api_type: brc
66+
auth_type: zgw
67+
client_id: test-vcr
68+
secret: test-vcr
69+
- identifier: selectielijst
70+
label: Open Zaak (public) - Selectielijst API
71+
api_root: https://selectielijst.openzaak.nl/api/v1/
72+
api_type: orc
73+
auth_type: no_auth
74+
- identifier: klanten-test
75+
label: eSuite klanten API
76+
api_root: http://localhost:8003/klanten/api/v1/
77+
api_type: kc
78+
auth_type: zgw
79+
client_id: test-vcr
80+
secret: test-vcr
81+
- identifier: contactmomenten-test
82+
label: eSuite contactmomemnten API
83+
api_root: http://localhost:8003/contactmomenten/api/v1/
84+
api_type: cmc
85+
auth_type: zgw
86+
client_id: test-vcr
87+
secret: test-vcr
88+
89+
openzaak_config_enable: true
90+
openzaak_config:
91+
zaak_max_confidentiality: openbaar
92+
document_max_confidentiality: vertrouwelijk
93+
max_upload_size: 50
94+
skip_notification_statustype_informeren: false
95+
reformat_esuite_zaak_identificatie: true
96+
fetch_eherkenning_zaken_with_rsin: false
97+
use_zaak_omschrijving_as_title: 'true'
98+
order_statuses_by_date_set: false
99+
title_text: title text from setup configuration
100+
enable_categories_filtering_with_zaken: true
101+
action_required_deadline_days: 1874
102+
zaken_filter_enabled: 'true'
103+
allowed_file_extensions:
104+
- .pdf
105+
- .txt
106+
api_groups:
107+
- zaken_api_identifier: zaken-test
108+
documenten_api_identifier: documenten-test
109+
catalogi_api_identifier: catalogi-test
110+
111+
openklant_config_enable: true
112+
openklant_config:
113+
klanten_service_identifier: klanten-test
114+
contactmomenten_service_identifier: contactmomenten-test
115+
exclude_contactmoment_kanalen: []
116+
register_email: [email protected]
117+
register_contact_moment: true
118+
register_bronorganisatie_rsin: '837194569'
119+
register_channel: email
120+
register_type: bericht
121+
register_employee_id: '1234'
122+
use_rsin_for_innNnpId_query_parameter: true
123+
send_email_confirmation: false

requirements/base.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ fontawesomefree
4242
django-timeline-logger
4343
django-csp
4444
django-csp-reports
45-
mozilla-django-oidc-db
45+
mozilla-django-oidc-db[setup-configuration]
4646
django-open-forms-client
4747
django-htmx
4848
playwright

requirements/base.txt

+22-10
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,10 @@ django-sessionprofile==1.0
256256
# via
257257
# -r requirements/base.in
258258
# django-digid-eherkenning
259-
django-setup-configuration==0.3.0
260-
# via -r requirements/base.in
259+
django-setup-configuration==0.5.0
260+
# via
261+
# -r requirements/base.in
262+
# mozilla-django-oidc-db
261263
django-simple-certmanager==1.4.1
262264
# via
263265
# django-digid-eherkenning
@@ -405,7 +407,7 @@ messagebird==2.1.0
405407
# via -r requirements/base.in
406408
mozilla-django-oidc==4.0.1
407409
# via mozilla-django-oidc-db
408-
mozilla-django-oidc-db==0.19.0
410+
mozilla-django-oidc-db[setup-configuration]==0.21.1
409411
# via
410412
# -r requirements/base.in
411413
# django-digid-eherkenning
@@ -440,10 +442,17 @@ psycopg2==2.9.9
440442
# via -r requirements/base.in
441443
pycparser==2.20
442444
# via cffi
443-
pydantic[email]==2.6.4
444-
# via -r requirements/base.in
445-
pydantic-core==2.16.3
445+
pydantic[email]==2.9.2
446+
# via
447+
# -r requirements/base.in
448+
# django-setup-configuration
449+
# pydantic-settings
450+
pydantic-core==2.23.4
446451
# via pydantic
452+
pydantic-settings[yaml]==2.7.0
453+
# via
454+
# django-setup-configuration
455+
# pydantic-settings
447456
pydyf==0.1.2
448457
# via weasyprint
449458
pyee==12.0.0
@@ -475,19 +484,22 @@ python-dateutil==2.8.2
475484
# python-crontab
476485
python-decouple==3.5
477486
# via -r requirements/base.in
478-
python-dotenv==0.19.0
479-
# via -r requirements/base.in
487+
python-dotenv==1.0.1
488+
# via
489+
# -r requirements/base.in
490+
# pydantic-settings
480491
python-stdnum==1.17
481492
# via django-localflavor
482493
pytz==2021.3
483494
# via
484495
# -r requirements/base.in
485496
# django-yubin
486497
# djangorestframework
487-
pyyaml==6.0
498+
pyyaml==6.0.2
488499
# via
489500
# drf-spectacular
490501
# gemma-zds-client
502+
# pydantic-settings
491503
# tablib
492504
# zgw-consumers-oas
493505
qrcode==6.1
@@ -593,7 +605,7 @@ xmlsec==1.3.12
593605
# via maykin-python3-saml
594606
xsdata==23.8
595607
# via -r requirements/base.in
596-
zgw-consumers==0.35.1
608+
zgw-consumers==0.36.1
597609
# via
598610
# -r requirements/base.in
599611
# notifications-api-common

requirements/ci.txt

+19-7
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,11 @@ django-sessionprofile==1.0
438438
# -c requirements/base.txt
439439
# -r requirements/base.txt
440440
# django-digid-eherkenning
441-
django-setup-configuration==0.3.0
441+
django-setup-configuration==0.5.0
442442
# via
443443
# -c requirements/base.txt
444444
# -r requirements/base.txt
445+
# mozilla-django-oidc-db
445446
django-simple-certmanager==1.4.1
446447
# via
447448
# -c requirements/base.txt
@@ -749,11 +750,12 @@ mozilla-django-oidc==4.0.1
749750
# -c requirements/base.txt
750751
# -r requirements/base.txt
751752
# mozilla-django-oidc-db
752-
mozilla-django-oidc-db==0.19.0
753+
mozilla-django-oidc-db[setup-configuration]==0.21.1
753754
# via
754755
# -c requirements/base.txt
755756
# -r requirements/base.txt
756757
# django-digid-eherkenning
758+
# mozilla-django-oidc-db
757759
multidict==6.0.5
758760
# via yarl
759761
mypy-extensions==1.0.0
@@ -837,16 +839,24 @@ pycparser==2.20
837839
# -c requirements/base.txt
838840
# -r requirements/base.txt
839841
# cffi
840-
pydantic[email]==2.6.4
842+
pydantic[email]==2.9.2
841843
# via
842844
# -c requirements/base.txt
843845
# -r requirements/base.txt
846+
# django-setup-configuration
844847
# pydantic
845-
pydantic-core==2.16.3
848+
# pydantic-settings
849+
pydantic-core==2.23.4
846850
# via
847851
# -c requirements/base.txt
848852
# -r requirements/base.txt
849853
# pydantic
854+
pydantic-settings[yaml]==2.7.0
855+
# via
856+
# -c requirements/base.txt
857+
# -r requirements/base.txt
858+
# django-setup-configuration
859+
# pydantic-settings
850860
pydyf==0.1.2
851861
# via
852862
# -c requirements/base.txt
@@ -920,10 +930,11 @@ python-decouple==3.5
920930
# via
921931
# -c requirements/base.txt
922932
# -r requirements/base.txt
923-
python-dotenv==0.19.0
933+
python-dotenv==1.0.1
924934
# via
925935
# -c requirements/base.txt
926936
# -r requirements/base.txt
937+
# pydantic-settings
927938
python-stdnum==1.17
928939
# via
929940
# -c requirements/base.txt
@@ -935,12 +946,13 @@ pytz==2021.3
935946
# -r requirements/base.txt
936947
# django-yubin
937948
# djangorestframework
938-
pyyaml==6.0
949+
pyyaml==6.0.2
939950
# via
940951
# -c requirements/base.txt
941952
# -r requirements/base.txt
942953
# drf-spectacular
943954
# gemma-zds-client
955+
# pydantic-settings
944956
# tablib
945957
# vcrpy
946958
# zgw-consumers-oas
@@ -1165,7 +1177,7 @@ xsdata==23.8
11651177
# -r requirements/base.txt
11661178
yarl==1.9.8
11671179
# via vcrpy
1168-
zgw-consumers==0.35.1
1180+
zgw-consumers==0.36.1
11691181
# via
11701182
# -c requirements/base.txt
11711183
# -r requirements/base.txt

0 commit comments

Comments
 (0)