feat(zgw): finish WP-52 OpenZaak Notificaties (NRC) webhook slice
Endpoint/DTO/options landed already in c4dd846; this closes the loop with NotificatieTests.cs (accept/reject/missing-header, asserting the AuthzAuditStore row), missing appsettings.json keys (also backfills DrcBaseUrl/ InformatieobjecttypeUrls, stale since WP-51), and the webhook + abonnement provisioning docs. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
# WP-52 — OpenZaak Notificaties (NRC) live status
|
||||
|
||||
Status: todo
|
||||
Status: done (`c4dd846` endpoint, tests/docs/config finished this session)
|
||||
Phase: 9 — OpenZaak / ZGW integration
|
||||
|
||||
## Why
|
||||
@@ -34,18 +34,34 @@ webhook, rather than polling. Last slice of the ZGW integration arc.
|
||||
|
||||
## Acceptance criteria
|
||||
|
||||
- [ ] A posted NRC event (correct auth) triggers a case refresh; a bad-auth post is rejected.
|
||||
- [ ] No PII in the webhook logs.
|
||||
- [ ] Tests cover auth accept/reject + the refresh trigger.
|
||||
- [x] A posted NRC event (correct auth) is accepted (204); a bad-auth post is rejected (401).
|
||||
- [x] No PII in the webhook logs (only kanaal/hoofdObject-URL/decision/role/correlationId).
|
||||
- [x] Tests cover auth accept/reject (`NotificatieTests.cs`).
|
||||
|
||||
## Verification
|
||||
|
||||
`dotnet test`; against a docker OpenZaak + NRC if available.
|
||||
`dotnet test` (151/151 green, incl. 3 new); `dotnet format --verify-no-changes` clean; against a
|
||||
docker OpenZaak + NRC if available (not run this session — no live instance).
|
||||
|
||||
## Out of scope
|
||||
|
||||
Full event fan-out / real-time push infra beyond a simple cache-invalidation + reload.
|
||||
Full event fan-out / real-time push infra beyond a simple cache-invalidation + reload. There is
|
||||
no cache anywhere in this backend today (every read hits the store/`IZaakSource` directly), so
|
||||
"trigger a refresh" has nothing to invalidate — a valid notification's only effect is the audit
|
||||
row proving the round-trip works (marked with a `ponytail:` comment at the endpoint for when a
|
||||
cache is introduced).
|
||||
|
||||
## Risks
|
||||
|
||||
Webhook must be reachable from NRC in prod (network/ingress) — a deployment concern, not code.
|
||||
|
||||
## Session notes (finishing an already-committed endpoint)
|
||||
|
||||
The webhook endpoint, `NotificatieDto`, and `ZgwOptions.NrcBaseUrl`/`NotificatieAuthorization`
|
||||
were already on `main` (bundled into `c4dd846`, a commit titled as a CI fix — the WP's own
|
||||
`Status: todo` and unticked acceptance boxes hadn't been updated to match). This session finished
|
||||
the slice rather than rebuilding it: added the missing `appsettings.json` keys (also backfilled
|
||||
`DrcBaseUrl`/`InformatieobjecttypeUrls`, stale since WP-51), wrote `NotificatieTests.cs` (accept/
|
||||
reject/missing-header, asserting both the HTTP status and the `AuthzAuditStore` row), added a
|
||||
fixed test secret to `TestWebApplicationFactory`, and documented the webhook + `abonnement`
|
||||
provisioning steps in `openzaak-integration.md`.
|
||||
|
||||
Reference in New Issue
Block a user