adr-proposal: correlate the citizen reference with the openbaar register (enrich projection via the ACL) #78
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
The self-service confirmation shows the domain
registrationId(aRegistrationaggregate GUID), while the openbaar register shows the OpenZaakzaakId(the zaak UUID, from the NRC notification'shoofdObject). They are independent id spaces and can never match, so a citizen's reference is not findable in the public register.Why the projection can't carry it today
Per ADR-0008: the NRC
zaken/zaak/createnotification carries only the zaak URL + fixedkenmerken(bronorganisatie,zaaktype,vertrouwelijkheidaanduiding) — not theregistrationId. The event-subscriber may not read ZGW directly (§8.1). ADR-0008 explicitly foresaw this: "populating [bsn/naam] requires reading the zaak through the ACL (§8.1) and is its own follow-up."Proposed decision (option #1 — correlate via the zaak identificatie, enriched through the ACL)
zaak.identificatie = registrationIdat creation (domain passes its reference; extends ADR-0003 default-fill). Boundary-internal.identificatie/status.identificatieand stores it as areferenceon the projection row and in theprocessed_notificationsreplay log, so a rebuild stays log-only (no ZGW/ACL at rebuild) per ADR-0008.reference; it now equals the confirmation'sregistrationId.§8 impact (why this ADR)
Introduces a new service boundary: event-subscriber → ACL (the ADR-0008 "enrich via the ACL" follow-up). This is the same mechanism that will later populate
bsn/naam, so the decision is broader than the reference alone.Open sub-decisions to settle here
referencein the replay log (rebuild reprojects it, no ACL needed) — recommended — vs. re-fetch from the ACL at rebuild (needs the stack up).identificatie,status; defer bsn/naam or include now).Alternatives considered
Scope:
services/acl,services/event-subscriber,services/projection-api(schema +referencecolumn/migration),apps/openbaar, e2e, ADR. Sizeable — a full vertical slice.