Open Organisatie configuration (CLI)
Using the setup_configuration management command
You can use the included setup_configuration management command to configure your
instance from a yaml file as follows:
python manage.py setup_configuration --yaml-file /path/to/config.yaml
You can also validate that the configuration source can be successfully loaded,
without actually running the steps, by adding the validate-only flag:
python manage.py setup_configuration --yaml-file /path/to/config.yaml --validate-only
Both commands will either return 0 and a success message if the configuration file can be loaded without issues, otherwise it will return a non-zero exit code and print any validation errors.
Your YAML file should contain both a flag indicating whether the step is enabled or disabled, as well as an object containing the actual configuration values under the appropriate key.
Note
All steps are disabled by default. You only have to explicitly include the flag to enable a step, not to disable it, though you may do so if you wish to have an explicit record of what steps are disabled.
Further information can be found at the django-setup-configuration documentation.
This projects includes the following configuration steps (click on each step for a brief descripion and an example YAML you can include in your config file):
Configuration to connect with external services
- class zgw_consumers.contrib.setup_configuration.steps.ServiceConfigurationStep
Configure one or more
Serviceinstances with their connection parameters and authentication credentials, which will allow this application to integrate with third-party systems in a consistent manner.
zgw_consumers_config_enable: true
zgw_consumers:
# REQUIRED: true
services:
-
# DESCRIPTION: A unique, human-friendly slug to identify this service. Primarily
# useful for cross-instance import/export.
# REQUIRED: true
identifier: service-identifier
# REQUIRED: true
label: Short and human-friendly description of this service
# POSSIBLE VALUES: ["ac", "nrc", "zrc", "ztc", "drc", "brc", "cmc", "kc", "vrc",
# "orc"]
# REQUIRED: true
api_type: ac
# DESCRIPTION: The root URL of the service that will be used to construct the URLs
# when making requests.
# REQUIRED: true
api_root: https://example.com/api/v1/
# DESCRIPTION: A relative URL to perform a connection test. If left blank, the API
# root itself is used. This connection check is only performed in the admin when
# viewing the service configuration.
# DEFAULT VALUE: ""
# REQUIRED: false
api_connection_check_path: /some/relative/path
# DESCRIPTION: The type of authorization to use for this service.
# POSSIBLE VALUES: ["no_auth", "api_key", "zgw"]
# DEFAULT VALUE: "zgw"
# REQUIRED: false
auth_type: zgw
# DESCRIPTION: The client ID used to construct the JSON Web Token to connect with
# the service (only needed if auth type is `zgw`).
# DEFAULT VALUE: ""
# REQUIRED: false
client_id: modify-this
# DESCRIPTION: The secret used to construct the JSON Web Token to connect with the
# service (only needed if auth type is `zgw`).
# DEFAULT VALUE: ""
# REQUIRED: false
secret: modify-this
# DESCRIPTION: The header key used to store the API key (only needed if auth type
# is `api_key`).
# DEFAULT VALUE: ""
# REQUIRED: false
header_key: Authorization
# DESCRIPTION: The API key to connect with the service (only needed if auth type
# is `api_key`).
# DEFAULT VALUE: ""
# REQUIRED: false
header_value: Token <modify-this>
# DESCRIPTION: NLX (outway) address.
# DEFAULT VALUE: ""
# REQUIRED: false
nlx: http://some-outway-adress.local:8080/
# DESCRIPTION: User ID to use for the audit trail. Although these external API
# credentials are typically used bythis API itself instead of a user, the user ID
# is required.
# DEFAULT VALUE: ""
# REQUIRED: false
user_id: client-id
# DESCRIPTION: Human readable representation of the user.
# DEFAULT VALUE: ""
# REQUIRED: false
user_representation: Name of the user
# DESCRIPTION: Timeout (in seconds) for HTTP calls.
# DEFAULT VALUE: 10
# REQUIRED: false
timeout: 10
# DESCRIPTION: How long a JWT is valid for, in seconds. This controls the 'exp'
# claim (only used if auth type is `zgw`).
# DEFAULT VALUE: 43200
# REQUIRED: false
jwt_valid_for: 43200
Configuration for Notificaties API
- class notifications_api_common.contrib.setup_configuration.steps.NotificationConfigurationStep
Configure settings for Notificaties API
notifications_config_enable: true
notifications_config:
# REQUIRED: true
notifications_api_service_identifier: notificaties-api
# DESCRIPTION: The maximum number of automatic retries. After this amount of
# retries, guaranteed delivery stops trying to deliver the message.
# DEFAULT VALUE: 7
# REQUIRED: false
notification_delivery_max_retries: 7
# DESCRIPTION: If specified, a factor applied to the exponential backoff. This
# allows you to tune how quickly automatic retries are performed.
# DEFAULT VALUE: 25
# REQUIRED: false
notification_delivery_retry_backoff: 25
# DESCRIPTION: An upper limit in seconds to the exponential backoff time.
# DEFAULT VALUE: 52000
# REQUIRED: false
notification_delivery_retry_backoff_max: 52000
# DESCRIPTION: The base factor used for exponential backoff. This can be increased
# or decreased to spread retries over a longer or shorter time period.
# DEFAULT VALUE: 4
# REQUIRED: false
notification_delivery_base_factor: 4