- Go 97.9%
- Makefile 1.2%
- Dockerfile 0.6%
- Go Template 0.3%
| .forgejo/workflows | ||
| api | ||
| cmd/address-register-process | ||
| helm | ||
| internal | ||
| .dockerignore | ||
| Dockerfile | ||
| go.mod | ||
| go.sum | ||
| LICENSE | ||
| Makefile | ||
| README.md | ||
address-register-process
The adresregister of Notificatie voor Burgers: it puts a citizen's adreskaart next to his BSN and brings it,
once per change, to every bronorganisatie in his wettelijke kring. This process holds the business logic;
the data lives in address-register-service. The design is docs/adresregister.md (with docs/encryptie.md)
in getting-started, the decision ADR 0008.
What it does
- Registration and closure. The app posts
{versleuteld}toPOST /adresregister/v1/registraties: a JWS signed with the brievenbus's ECDSA key (typ registratie+jwt), sealed with X-Wing for the register. The register opens it, checks the signature with the key it carries, theontvanger(address-register-process) anduitgegevenOp(−5/+1 minute), the elfproef, and asks the BRP whether the BSN belongs to a person. A closure must be signed with the key of the latest registration. - Adreskaartleveringen. Every registration or closure gets the next version of its BSN and one delivery
per member of the kring. The delivery carries the adreskaart and the app's signing key of the
registration, with which the bronorganisatie checks the citizen's signed ontvangstbevestiging. A worker
signs each delivery as the register (
typ adreskaartlevering+jwt,kid address-register-process), seals it with that member's X-Wing key and posts{versleuteld}to<member>/v1/adreskaartleveringen. Only 204 counts. A failed attempt is retried after 5 s, doubling, at most an hour apart, without end: an adreskaart that does not arrive is no zending that can go back. - A member that joins later. The kring only changes with the configuration, so at every start, before it delivers, the worker asks address-register-service to bring every member up to the current version of every registration. A bronorganisatie added to the kring gets the burgers who registered before it joined; a member that never knew a burger gets no closure, and a member that is up to date gets nothing. Until the service answers, it tries again every round.
- Keys.
GET /adresregister/v1/publieke-sleutelsgives the register's X-Wing key (use enc, for the app) and ECDSA key (use sig, for the bronorganisaties) as a JWK Set.
The BSN never appears in a URL, in an answer or in a log line except masked to its last two digits. The register keeps no name or other BRP data, and never learns who sends post.
No DigiD. Without FSC voor Burgers or DigiD there is no proof the citizen belongs to the BSN: anyone who knows a BSN can register an adreskaart over it. The register therefore only knows the BRP mock with fictitious test persons; production needs FSC voor Burgers or DigiD at registration.
API
Public, at /adresregister/v1; the contract is api/openapi.yaml (Dutch OAS 3.1, NL API Design Rules),
also served at /adresregister/v1/openapi.json and .yaml. There is no internal API: nobody but the app
talks to the register.
Regenerate the JSON after editing the YAML: npx -y js-yaml@4 api/openapi.yaml > api/openapi.json.
Configuration
Variable (chart config key) |
Meaning |
|---|---|
ADDRESS_REGISTER_SERVICE_URL (addressRegisterServiceUrl) |
the data layer, default http://address-register-service |
ADDRESS_REGISTER_SERVICE_API_KEY |
this process's service key (Secret address-register-api-keys, key ADDRESS_REGISTER_PROCESS_API_KEY) |
BRP_URL (brpUrl) |
the BRP Personen API, default http://mock-brp-api:8008/haalcentraal/api/brp |
SIGNING_KEY, DECRYPTION_KEY |
the register's ECDSA and X-Wing private keys as PEM (Secret address-register-process-sleutel) |
ADDRESS_RECIPIENTS (addressRecipients) |
the wettelijke kring: a JWK Set of X-Wing keys, kid = afzendernaam |
RECIPIENT_URLS (recipientUrls) |
the internal base URL per member: demo-organization:http://source-organization-process-internal |
RETRY_INITIAL_DELAY, RETRY_FACTOR, RETRY_MAXIMUM_DELAY |
back-off, default 5s, 2 and 1h |
WORKER_INTERVAL, CLAIM_DURATION |
default 1s and 30s |
A member with a key but no URL, or the other way round, stops the process at start.
Development
go test ./...
golangci-lint run ./...
helm lint helm
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.