-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
author Daniel Mursa <[email protected]> 1734341658 +0100 committer Daniel Mursa <[email protected]> 1734604578 +0100 parent 64fa395 author Daniel Mursa <[email protected]> 1734341658 +0100 committer Daniel Mursa <[email protected]> 1734604572 +0100 [#485] Merge closed branch [#485] Add SitesConfigurationStep and TokenAuthConfigurationStep in settings [#485] Black and isort [#485] Fix requirements [#485] Update namespace [#486] Update TokenAuthConfigurationStep [#486] Permissions can be empty list [#486] Update tests [#486] New tests [#486] Update tests [#486] Fix old tests [#486] Update data.yaml [#486] Activate ObjectTypesConfigurationStep [#486] Add new test [#486] Update config_cli.rst [#486] Fix config_cli.rst [#486] Fix config_cli.rst [#486] Uniform data.yaml and config_cli.rst
- Loading branch information
1 parent
64fa395
commit 02426aa
Showing
7 changed files
with
845 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,18 +42,29 @@ objecttypes: | |
name: Object Type 1 | ||
service_identifier: objecttypes-api | ||
|
||
- uuid: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2 | ||
name: Object Type 2 | ||
service_identifier: objecttypes-api | ||
|
||
|
||
tokenauth_config_enable: true | ||
tokenauth: | ||
items: | ||
- identifier: token-1 | ||
token: 18b2b74ef994314b84021d47b9422e82b685d82f | ||
token: ba9d233e95e04c4a8a661a27daffe7c9bd019067 | ||
contact_person: Person 1 | ||
email: [email protected] | ||
organization: Organization 1 | ||
application: Application 1 | ||
administration: Administration 1 | ||
is_superuser: true | ||
permissions: | ||
- object_type: b427ef84-189d-43aa-9efd-7bb2c459e281 | ||
mode: read_and_write | ||
- object_type: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2 | ||
mode: read_only | ||
use_fields: true | ||
fields: | ||
key1: value1 | ||
|
||
|
||
oidc_db_config_enable: true | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ Objecttypes configuration | |
To configure objecttypes the following configuration could be used: | ||
|
||
.. code-block:: yaml | ||
... | ||
zgw_consumers_config_enable: true | ||
zgw_consumers: | ||
|
@@ -68,6 +69,7 @@ To configure objecttypes the following configuration could be used: | |
name: Object Type 2 | ||
service_identifier: objecttypen-bar | ||
... | ||
.. note:: The ``uuid`` field will be used to lookup existing ``ObjectType``'s. | ||
|
||
Objecttypes require a corresponding ``Service`` to work correctly. Creating | ||
|
@@ -81,8 +83,8 @@ In order to be able to retrieve objecttypes, a corresponding ``Service`` should | |
created. An example of a configuration could be seen below: | ||
|
||
.. code-block:: yaml | ||
... | ||
... | ||
zgw_consumers_config_enable: true | ||
zgw_consumers: | ||
services: | ||
|
@@ -102,7 +104,8 @@ created. An example of a configuration could be seen below: | |
auth_type: api_key | ||
header_key: Authorization | ||
header_value: Token b9f100590925b529664ed9d370f5f8da124b2c20 | ||
.... | ||
... | ||
Tokens configuration | ||
-------------------- | ||
|
@@ -121,14 +124,26 @@ Create or update the (single) YAML configuration file with your settings: | |
organization: Organization XYZ # optional | ||
application: Application XYZ # optional | ||
administration: Administration XYZ # optional | ||
is_superuser: true # optional | ||
permissions: | ||
- object_type: b427ef84-189d-43aa-9efd-7bb2c459e281 | ||
mode: read_and_write | ||
- identifier: token-2 | ||
token: 7b2b212d9f16d171a70a1d927cdcfbd5ca7a4799 | ||
contact_person: Person 2 | ||
email: [email protected] | ||
permissions: | ||
- object_type: b0e8553f-8b1a-4d55-ab90-6d02f1bcf2c2 | ||
mode: read_only | ||
use_fields: true | ||
fields: | ||
key1: value1 | ||
... | ||
.. note:: To ensure the proper functioning of the tokens, it is essential to first configure the ``objecttypes``. | ||
Then, the token configuration must be completed to guarantee the correct configuration of the ``Permissions``. | ||
|
||
|
||
Mozilla-django-oidc-db | ||
---------------------- | ||
|
||
|
@@ -158,16 +173,32 @@ can be found at the _`documentation`: https://mozilla-django-oidc-db.readthedocs | |
Sites configuration | ||
------------------- | ||
|
||
.. code-block:: yaml | ||
... | ||
sites_config_enable: true | ||
sites_config: | ||
items: | ||
- domain: example.com | ||
name: Example site | ||
- domain: test.example.com | ||
name: Test site | ||
... | ||
More details about sites configuration through ``setup_configuration`` | ||
can be found at the _`site documentation`: https://github.com/maykinmedia/django-setup-configuration/blob/main/docs/sites_config.rst | ||
|
||
|
||
Notifications configuration | ||
------------------------- | ||
--------------------------- | ||
|
||
To configure sending notifications for the application ensure there is a ``services`` | ||
item present that matches the ``notifications_api_service_identifier`` in the | ||
``notifications_config`` namespace: | ||
|
||
.. code-block:: yaml | ||
... | ||
... | ||
zgw_consumers_config_enable: true | ||
zgw_consumers: | ||
services: | ||
|
@@ -184,7 +215,7 @@ item present that matches the ``notifications_api_service_identifier`` in the | |
notification_delivery_max_retries: 1 | ||
notification_delivery_retry_backoff: 2 | ||
notification_delivery_retry_backoff_max: 3 | ||
.... | ||
... | ||
Execution | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,16 @@ tokenauth: | |
organization: Organization 1 | ||
application: Application 1 | ||
administration: Administration 1 | ||
is_superuser: True | ||
permissions: | ||
- object_type: 3a82fb7f-fc9b-4104-9804-993f639d6d0d | ||
mode: read_only | ||
use_fields: true | ||
fields: | ||
key1: value1 | ||
key2: value2 | ||
key3: value3 | ||
- object_type: ca754b52-3f37-4c49-837c-130e8149e337 | ||
mode: read_and_write | ||
|
||
- identifier: token-2 | ||
token: e882642bd0ec2482adcdc97258c2e6f98cb06d85 | ||
|
@@ -17,4 +26,15 @@ tokenauth: | |
organization: Organization 2 | ||
application: Application 2 | ||
administration: Administration 2 | ||
permissions: | ||
- object_type: feeaa795-d212-4fa2-bb38-2c34996e5702 | ||
mode: read_only | ||
|
||
- identifier: token-3 | ||
token: ff835859ecf8df4d541aab09f2d0854d17b41a77 | ||
contact_person: Person 3 | ||
email: [email protected] | ||
organization: Organization 3 | ||
application: Application 3 | ||
administration: Administration 3 | ||
is_superuser: True |
Oops, something went wrong.