Skip to content

Commit

Permalink
🍱 [#18] Dump Open Zaak configuration fixture
Browse files Browse the repository at this point in the history
The configuration includes:

* Disabled all APIs that are not relevant (only Documenten API is
  relevant)
* Added API client/application for WOO Publications to use
* Added service definition from OZ -> WooP, currently without credentials
  • Loading branch information
sergei-maertens committed Sep 18, 2024
1 parent 5d2c15a commit 0e6b65d
Show file tree
Hide file tree
Showing 2 changed files with 142 additions and 2 deletions.
22 changes: 21 additions & 1 deletion docker/open-zaak/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,26 @@ Open Zaak binds to port 8001 on the host system.
Open your browser and navigate to http://localhost:8001/admin/, where you can log in
with the credentials `admin` / `admin`.

## API client

One API client is configured, with all permissions enabled. The credentials are:

* Client ID: `woo-publications-dev`
* Secret: `insecure-yQL9Rzh4eHGVmYx5w3J2gu`

## API connection from Open Zaak to WOO Publications

Open Zaak will make certain API calls to API endpoints exposed by WOO Publications. This
requires some specific setup - most notably the Woo Publications must be listening on
port 8000 on the host system.

If you're bringing up the whole compose stack, this is taken care of already. If you run
the development server, it's easiest to bind to all ports:

```bash
src/manage.py runserver 0.0.0.0:8000
```

## Dumping the fixture

The service automatically loads the fixtures provided in the `fixtures` directory. When
Expand All @@ -35,7 +55,7 @@ docker compose run openzaak-web \
authorizations.applicatie \
vng_api_common.jwtsecret \
config \
catalogi
zgw_consumers
```

Depending on your OS and local user ID, you may need to grant additional write permissions:
Expand Down
122 changes: 121 additions & 1 deletion docker/open-zaak/fixtures/configuration.json
Original file line number Diff line number Diff line change
@@ -1 +1,121 @@
[]
[
{
"model": "authorizations.applicatie",
"pk": 1,
"fields": {
"uuid": "4dd384d6-a941-4523-9b68-49746921e78d",
"client_ids": "[\"woo-publications-dev\"]",
"label": "WOO Publicatiebank",
"heeft_alle_autorisaties": true
}
},
{
"model": "vng_api_common.jwtsecret",
"pk": 1,
"fields": {
"identifier": "woo-publications-dev",
"secret": "insecure-yQL9Rzh4eHGVmYx5w3J2gu"
}
},
{
"model": "config.internalservice",
"pk": 1,
"fields": {
"api_type": "ac",
"enabled": true
}
},
{
"model": "config.internalservice",
"pk": 2,
"fields": {
"api_type": "zrc",
"enabled": false
}
},
{
"model": "config.internalservice",
"pk": 3,
"fields": {
"api_type": "ztc",
"enabled": false
}
},
{
"model": "config.internalservice",
"pk": 4,
"fields": {
"api_type": "drc",
"enabled": true
}
},
{
"model": "config.internalservice",
"pk": 5,
"fields": {
"api_type": "brc",
"enabled": false
}
},
{
"model": "config.featureflags",
"pk": 1,
"fields": {
"allow_unpublished_typen": false
}
},
{
"model": "zgw_consumers.service",
"pk": 1,
"fields": {
"label": "VNG Selectielijst",
"oas": "https://selectielijst.openzaak.nl/api/v1/schema/openapi.yaml",
"oas_file": "",
"uuid": "fd46ec3f-db03-4915-b406-b874a706a1b4",
"api_type": "orc",
"api_root": "https://selectielijst.openzaak.nl/api/v1/",
"client_id": "",
"secret": "",
"auth_type": "no_auth",
"header_key": "",
"header_value": "",
"nlx": "",
"user_id": "",
"user_representation": "",
"client_certificate": null,
"server_certificate": null
}
},
{
"model": "zgw_consumers.service",
"pk": 2,
"fields": {
"label": "Woo Publications",
"oas": "http://host.docker.internal:8000/api/v1/",
"oas_file": "",
"uuid": "120d62ff-5f95-44ee-8439-19c162a020c1",
"api_type": "orc",
"api_root": "http://host.docker.internal:8000/api/v1/",
"client_id": "",
"secret": "",
"auth_type": "no_auth",
"header_key": "Authorization",
"header_value": "Token :future:",
"nlx": "",
"user_id": "",
"user_representation": "",
"client_certificate": null,
"server_certificate": null
}
},
{
"model": "zgw_consumers.nlxconfig",
"pk": 1,
"fields": {
"directory": "",
"outway": "",
"certificate": "",
"certificate_key": ""
}
}
]

0 comments on commit 0e6b65d

Please sign in to comment.