Files
register-referentie/docs/synthetic-data.md
not 5f8ab4dbcd
CI / lint (push) Successful in 1m19s
CI / build (push) Successful in 1m7s
CI / unit (push) Successful in 1m16s
CI / frontend (push) Successful in 2m41s
CI / mutation (push) Successful in 5m57s
CI / verify-stack (push) Successful in 8m24s
feat: self-service resume of an existing registration after refresh (S-26, closes #111) (#119)
## What & why

After submitting, the self-service portal held the registration only in in-memory signals, so a **page refresh stranded an in-flight registration** — the reference and its "Documenten aanleveren" / "Trek aanvraag in" actions were lost, with no way back (the reference wasn't in the URL and there was no read endpoint). This is the gap a citizen hit in testing.

Now the portal **resumes on load**:
- **Domain:** `IRegistrationStore.FindOpenByBsnAsync` (the citizen's non-terminal INGEDIEND/IN_BEHANDELING registration) + `GET /registrations/current?bsn=`.
- **BFF:** owner-scoped `GET /self-service/registrations` (bsn from the DigiD token) → the current registration, or **204** when none. Regenerated `services/bff/openapi.json`.
- **Frontend:** `registration-page` calls it on init and restores the submitted view (reference + actions); 204 shows the submit form as before. api-client regenerated (orval).

Closes #111

## Definition of Done

- [x] Linked issue (#111).
- [x] TDD — store `FindOpenByBsnAsync` tests, BFF endpoint tests, an Angular component test (resume-on-load), a Playwright e2e (submit → reload → restored).
- [x] Conventional Commits referencing #111.
- [ ] CI green — validated locally (below); runner CI running.
- [x] `docker compose up` reaches green health — fresh stack + full e2e (3 specs) green.
- [x] Docs — `docs/synthetic-data.md` (new e2e users).
- [ ] ADR — N/A (follows existing BFF/domain patterns; no boundary change).
- [ ] Demo note — the flow is unchanged for the demo; no new demo-script section (happy to add one if wanted).

## Verified locally

- Unit: Big 141 (+7 store tests), Bff 36 (+3 endpoint tests), all suites green.
- Frontend: 12 self-service component tests (incl. resume-on-load); lint + build green.
- **e2e (fresh CI stack): all 3 specs pass** — `registration`, `resume`, `withdrawal` (29.5s, single worker).
- Mutation: domain **91.04%**, bff **100%** (break 90%). `make lint` clean.

## Notes for reviewers

- **Shared-stack isolation:** resume-on-load restores any open registration for the logged-in bsn, so the self-service e2e specs can no longer share `jan-burger` (the verify-* API checks submit as `jan-burger`/`123456782` before the e2e). Each spec now has its own DigiD citizen (`emma`/`sanne`/`lars`-burger); `jan-burger` stays the documented citizen for the verify checks. This is the fix for the two intermittent e2e failures seen during development.
- **Scope:** resumes the current **in-flight** registration only (terminal ones aren't resumed), per the issue's out-of-scope note.

Reviewed-on: #119
2026-07-23 07:22:08 +00:00

1.6 KiB

Synthetic data

All credentials here are dev-only synthetic test data — never real personal data, never used outside local development.

Keycloak realms (S-02)

Keycloak runs at http://localhost:8180 (admin console: admin / admin). Four realms are imported at boot from infra/keycloak/realms/. Each has a public OIDC client big-portal (standard flow + direct access grants enabled, redirect URIs * for dev).

All test users share the password test123.

Realm Mimics User Identifying claim
digid DigiD (burgers) jan-burger bsn = 123456782
digid DigiD (burgers) sanne-burger bsn = 231477813 (S-26 resume e2e — its own user so it can leave an open registration)
eherkenning eHerkenning (bedrijven) acme-ondernemer kvk = 12345678
eidas eIDAS (EU) pierre-dupont eidas_id = FR/NL/AB-1234-5678
medewerker Internal staff merel-behandelaar role behandelaar
medewerker Internal staff tom-teamlead roles behandelaar, teamlead

The identifying claims are injected via OIDC protocol mappers on big-portal (user-attribute → token claim); medewerker roles appear in realm_access.roles.

Get a token (for testing)

curl -s -X POST \
  http://localhost:8180/realms/digid/protocol/openid-connect/token \
  -d grant_type=password -d client_id=big-portal \
  -d username=jan-burger -d password=test123 -d scope=openid | jq -r .access_token

Decode the JWT payload to see the bsn claim. make keycloak-smoke checks every realm automatically.