|
4 | 4 | Open Klant configuration (CLI)
|
5 | 5 | ==============================
|
6 | 6 |
|
7 |
| -After deploying Open Klant, it needs to be configured to be fully functional. |
8 |
| -The django management command ``setup_configuration`` assist with this configuration. |
9 |
| -You can get the full command documentation with: |
10 |
| - |
11 |
| -.. code-block:: bash |
12 |
| -
|
13 |
| - python ./src/manage.py setup_configuration --help |
14 |
| -
|
15 |
| -.. warning:: This command is declarative - if configuration is manually changed after |
16 |
| - running the command and you then run the exact same command again, the manual |
17 |
| - changes will be reverted. |
18 |
| - |
19 |
| -Preparation |
20 |
| -=========== |
21 |
| - |
22 |
| -The command executes the list of pluggable configuration steps, and each step |
23 |
| -requires specific configuration information, that should be prepared. |
24 |
| -Here is the description of all available configuration steps and the configuration |
25 |
| -format, used by each step. |
26 |
| - |
27 |
| -Token configuration |
28 |
| ----------------------- |
29 |
| - |
30 |
| -Create a (single) YAML configuration file with your settings: |
31 |
| - |
32 |
| -.. code-block:: yaml |
33 |
| -
|
34 |
| - tokenauth_config_enable: true |
35 |
| - tokenauth: |
36 |
| - items: |
37 |
| - - identifier: token-1 |
38 |
| - token: ba9d233e95e04c4a8a661a27daffe7c9bd019067 |
39 |
| - contact_person: Person 1 |
40 |
| - email: person-1@example.com |
41 |
| - organization: Organization XYZ # optional |
42 |
| - application: Application XYZ # optional |
43 |
| - administration: Administration XYZ # optional |
44 |
| -
|
45 |
| - - identifier: token-2 |
46 |
| - token: 7b2b212d9f16d171a70a1d927cdcfbd5ca7a4799 |
47 |
| - contact_person: Person 2 |
48 |
| - email: person-2@example.com |
49 |
| -
|
50 |
| -
|
51 |
| -Mozilla-django-oidc-db |
52 |
| ----------------------- |
53 |
| - |
54 |
| -Create or update the (single) YAML configuration file with your settings: |
55 |
| - |
56 |
| -.. code-block:: yaml |
57 |
| -
|
58 |
| - ... |
59 |
| - oidc_db_config_enable: true |
60 |
| - oidc_db_config_admin_auth: |
61 |
| - items: |
62 |
| - - identifier: admin-oidc |
63 |
| - oidc_rp_client_id: client-id |
64 |
| - oidc_rp_client_secret: secret |
65 |
| - endpoint_config: |
66 |
| - oidc_op_discovery_endpoint: https://keycloak.local/protocol/openid-connect/ |
67 |
| - ... |
68 |
| -
|
69 |
| -More details about configuring mozilla-django-oidc-db through ``setup_configuration`` |
70 |
| -can be found at the _`documentation`: https://mozilla-django-oidc-db.readthedocs.io/en/latest/setup_configuration.html. |
71 |
| - |
72 |
| -Execution |
73 |
| -========= |
74 |
| - |
75 |
| -Open Klant configuration |
76 |
| ------------------------- |
77 |
| - |
78 |
| -With the full command invocation, everything is configured at once. Each configuration step |
79 |
| -is idempotent, so any manual changes made via the admin interface will be updated if the command |
80 |
| -is run afterwards. |
81 |
| - |
82 |
| -.. code-block:: bash |
83 |
| -
|
84 |
| - python ./src/manage.py setup_configuration --yaml-file /path/to/config.yaml |
85 |
| -
|
86 |
| -.. note:: Due to a cache-bug in the underlying framework, you need to restart all |
87 |
| - replicas for part of this change to take effect everywhere. |
| 7 | +.. setup-config-usage:: |
0 commit comments