No description
  • Go 97.9%
  • Makefile 1.2%
  • Dockerfile 0.5%
  • Go Template 0.4%
Find a file
Zamir Amir 83581643f8
All checks were successful
CI / chart (push) Successful in 6s
CI / test (push) Successful in 21s
CI / specification (push) Successful in 25s
CI / image (push) Successful in 12s
CI / chart-release (push) Has been skipped
Release 0.2.1
2026-11-25 13:15:46 +01:00
.forgejo/workflows Scan the rendered chart with KICS on every push and pull request 2026-11-25 10:34:11 +01:00
api Take an address declaration only sealed for this bezorgdienst 2026-11-24 18:57:26 +01:00
cmd/delivery-process Take only signed declarations and zendingen, and open sealed envelopes 2026-11-24 13:07:30 +01:00
helm Release 0.2.1 2026-11-25 13:15:46 +01:00
internal Take an address declaration only sealed for this bezorgdienst 2026-11-24 18:57:26 +01:00
.dockerignore Deliver citizen envelopes to registered mailboxes as bezorgdienst 2026-11-23 11:13:02 +01:00
Dockerfile Publish the OpenAPI document as committed JSON and YAML, as in blauwe knop 2026-11-23 22:19:08 +01:00
go.mod Take only signed declarations and zendingen, and open sealed envelopes 2026-11-24 13:07:30 +01:00
go.sum Take only signed declarations and zendingen, and open sealed envelopes 2026-11-24 13:07:30 +01:00
LICENSE License under EUPL-1.2 2026-11-23 20:10:32 +01:00
Makefile Release delivery-process with a version, chart and image together 2026-11-24 19:02:12 +01:00
README.md Merge branch 'charts-release' 2026-11-24 19:32:28 +01:00

delivery-process

The process of the bezorgdienst in Notificatie voor Burgers. It takes address declarations from hosters and brings shipments from the dispatch service to the right mailbox, passing the citizen envelope on unopened. It knows the functional and technical address of every mailbox, never the sender: it does not accept, store or log a Sender header.

Address declarations and zendingen are signed (ES256 JWS) by a hoster or verzenddienst on its trust lists. With its X-Wing key it opens the bezorgenvelop and the adres-sticker inside; the citizen envelope stays sealed for the citizen. The format is docs/encryptie.md in getting-started; all cryptography is blauwe-knop's go-connect.

The process keeps no state. Following the blauwe-knop layers, addresses and events live in delivery-service (data access) and delivery-db (Postgres); the management screen reads them through delivery-management-process. Internal only: hosters and the dispatch service reach this Service; no route exposes it outside the cluster.

API

Dutch, as in api/openapi.yaml (OpenAPI 3.1, NL API Design Rules), served at /v1/openapi.json and /v1/openapi.yaml (both committed in api/, as in blauwe knop). Every response carries API-Version; errors are application/problem+json.

  • PUT /v1/adressen/{functioneelAdres} {versleuteld} → 200 {adresSticker}: the address declaration of a hoster, signed and then sealed for this bezorgdienst, answered with a fresh adres-sticker (the functional address sealed for this bezorgdienst); 422 when it does not open with this bezorgdienst's key; a repeated declaration replaces the old one
  • POST /v1/zendingen {ondertekend}: the signed zending of the verzenddienst. Untrusted, wrong recipient or older than 5 minutes → 401; a bezorgenvelop or sticker that does not open → 422; unknown functioneel adres → 404 at once; otherwise 202 {zendingReferentie} and a background worker delivers it, retrying with exponential back-off while the mailbox is unreachable. After DELIVERY_MAXIMUM_DURATION (default 1h; the 48 hours of art. 2:10 Awb cap all delays together) it goes back to the verzenddienst as POST /v1/retouren {zendingReferentie, reden: onbestelbaar} — only the reference, never an address.
  • GET /v1/publieke-sleutels: the X-Wing public key as a JWK Set

The mailbox receives POST <technischAdres> with {"burgerenvelop": "<compacte JWE>"}.

Configuration

  • DELIVERY_SERVICE_URL: internal base URL of delivery-service
  • DELIVERY_SERVICE_API_KEY: this process's service key for delivery-service
  • LISTEN_ADDRESS: defaults to :8080
  • DECRYPTION_KEY: this bezorgdienst's X-Wing private key as PEM, from the Secret delivery-process-sleutel
  • TRUSTED_HOSTERS, TRUSTED_DISPATCHERS: JWK Sets of the parties whose signatures are accepted, kid = name; empty trusts no one

Retry configuration: DISPATCH_URL (default http://dispatch-process), RETRY_INITIAL_DELAY (5s), RETRY_FACTOR (2), RETRY_MAXIMUM_DELAY (5m), DELIVERY_MAXIMUM_DURATION (1h), WORKER_INTERVAL (1s), CLAIM_DURATION (30s).

Development

go test ./...          # collaborators are in-memory fakes; no database needed here
golangci-lint run ./...

CI

.forgejo/workflows/ci.yml tests, validates the spec with Redocly and the ADR checker, lints the chart, and on main pushes code.digitaledienst.overheid.nl/mijn-betaaloverzicht/delivery-process:<commit>.

Release

make release VERSION=1.2.3   # on an up-to-date main: writes helm/Chart.yaml, commits, tags v1.2.3
git push --follow-tags

The tag pipeline tags the image 1.2.3 and v1.2.3 and publishes the chart at 1.2.3 to the Forgejo Helm registry (see the charts repository). The environments repository pins that version.

License

EUPL-1.2, see LICENSE.