feat: een burgerapp haalt via FSC voor Burgers de brongegevens en de casus op #39
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/fsc4b-gegevens"
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?
The executor (the RegelHet server) now gives a citizen app what it needs to predict a decision on the citizen's own device, through FSC voor Burgers. This is PR A of the citizen-environment design (burgeromgeving). PR B builds the browser app against this API.
What it adds
POST /fsc4b/burger/v1/gegevens, a citizen route encrypted under the session key like the others. The server hands out only the answers the case file names underuitgeven; each must be an answer of the executor's cell (answersincel.yaml) that needs only the login field. It computes them for the BSN of the session. A BSN in the request is not read. The answer is{ "ondertekend": "<JWS>", "gegevens": { … } }: a JWS under the organization's key from the Stelseldocument, with its payload beside it in plain form. The payload contains:sub,iss,iat,peildatum,casusandcel;bundel_hash: the hash of the bundle ofGET /fsc4b/regelwerken, so the signature covers the case the app computes on. It issha256:plus the hex SHA-256 over, per path in byte order,<bytes of path>:<path><bytes of text>:<text>;antwoorden: per answer its value, the parameters it was asked with, and where it came from;records: the citizen's dossier records up to today;regelwerken: the versions the answers were computed under;bij_aanvraag: the facts that only come after an application, such as the GGD's advice.uitgevenin the case file. Without it nothing goes out andantwoordenis empty. A name that is no answer of the cell, or one that needs more than the login field, stops the server with a message naming it. The list is the case's and not the cell's: one cell's catalogue serves every case that runs it, and what goes out to a citizen is a choice of the procedure. The parking-card case lists two answers. The manifest repository gets the same list in regelrecht/wetsproces-parkeerkaart#1, which must merge only after this PR is deployed.GET /fsc4b/regelwerken: the case as a bundle{ "<path>": "<text>" }, without a session. The kern loads it as a source withbundel::uit_bron.REGELHET_FSC4B_ORIGINStakes exact origins, comma-separated, and stable mode accepts only https ones (plus localhost). The headers apply to every answer under/fsc4b/, including preflights, errors and paths that are no route, and to nothing else. The chart value isfsc4b.origins.Cell::answer_parametersandCell::give_answerinpackages/celask a cell for one of its own catalogue answers directly. They go through the same checks and recursion guard as a binding.kern::antwoord/Cell::consultrefuse a reduction as their source (RFC-056), because a decision may take a reduction only through a binding; this path decides and records nothing.brongegevensinpackages/poc-chronolexografiedoes the selection and the computation, so the app's WASM kern can run the same function and compare.ROUTES, OpenAPI, the service profile page and the FSC voor Burgers page. The example client now fetches the source data and checks the signature.For the parking card two answers remain: whether the municipality granted a card before (
aanvrager_eerder_gehandicaptenparkeerkaart_verstrekt), and whether a request to the GGD is open (verzoek_om_geneeskundig_onderzoek_staat_open). The advice answers also need the date of an application, so they drop out; the advice appears underbij_aanvraag. The provenance does not say how far the cell read its chronicle, because that chronicle holds everyone's records.Example
The decrypted answer for a fictitious citizen who was granted a card earlier (shortened):
Not in this PR
fsc4b.origins.Tests
tests/fsc4b.rs:bij_aanvraagis listed and not returned;service.rs: withoutuitgevennothing goes out; with it only the listed answers go out; an answer that needs more than the login field stops the server.case.rs: an unknown name underuitgevenstops the load.fsc4b.rs: the bundle hash and its byte-level definition; the e2e test checks the signedbundel_hashagainst the served bundle, and CORS on a 404.config.rs: origin parsing, and stable mode accepting only https.🤖 Generated with Claude Code
https://claude.ai/code/session_01XDZRnqjJJ2izeL3kP33bnv
deb6a30243781fe3fd83781fe3fd831823db8762