Repository navigation
feat(integriq): build call-log-personal-data-masking - #3550
Merged
rubenvdlinde merged 8 commits intoNov 17, 2026
Merged
Conversation
Personal data in logged bodies is masked before the write, in the same pass as the secret masking: BSN, name, address, date of birth, e-mail address and telephone number fields read [afgeschermd] in JSON and XML (StUF) bodies, headers, request options and URL queries of the call log, trace snapshots, outbound call records and message records. - PersonalDataMasker: walks arrays, JSON, XML text elements and query strings; names match exactly after normalisation (inp.bsn, BG:inp.bsn) - SensitiveFieldRegistry: the default list plus the names an administrator adds (app setting personal_data_fields) - Admin endpoint and settings section to add field names - The message that is sent is untouched; a failed call's replayRequest keeps the real values because a replay sends it Assisted-by: ClaudeCode:claude-opus-5-5
rubenvdlinde
requested review from
Rem-Dam,
SudoThijn,
WilcoLouwerse,
bbrands02,
remko48 and
rjzondervan
as code owners
November 13, 2026 21:00
…skip ci] AdminSettings.vue: both settings sections kept. l10n: both sides' strings. The masking tests now mock ObjectService with main's option objects, as development's CallRecorder calls it. Assisted-by: ClaudeCode:claude-opus-5-5
…skip ci] Without replayRequest the stored request is what a replay sends; once its personal data is masked, a replay would send the placeholder. Such a record is now refused like one whose bodies were stripped. Assisted-by: ClaudeCode:claude-opus-5-5
…skip ci] Keeps both admin settings sections (IdP registrations and personal data fields) and both sides' l10n strings. Assisted-by: ClaudeCode:claude-opus-5-5
…s [skip ci] The personal data list, its app config key and the masker over it move from SensitiveFieldRegistry into PersonalDataFieldList. BodyRedactor and the personal data settings controller use the new class directly, so the registry keeps its fan-in and its size, and the module coupling rating holds at 5.04 against development. Behaviour is unchanged. Assisted-by: ClaudeCode:claude-opus-5-5
…try [skip ci] The outbound log and the settings page referenced PersonalDataMasker and PersonalDataFieldList directly from other components, which exposed both classes and lowered component independence below development's. They now use PersonalDataFields, a small entry in the service layer that keeps the masker and the list internal; behaviour is unchanged. PHP component independence measures 93.00% again (development 92.98%). Assisted-by: ClaudeCode:claude-opus-5-5
…skip ci] Keep both sides: the BSN text pattern from development next to the personal data field list constructor, both admin settings sections and both sets of l10n keys. Assisted-by: ClaudeCode:claude-opus-5-5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Builds
openspec/changes/call-log-personal-data-masking(matrix rowintegriq:obs-redact, REQ-PDM-001): personal data in a logged message body is masked before the log is written.Tasks done
lib/Service/Security/PersonalDataMasker.php(new) walks arrays by key, JSON bodies (layout kept when nothing matches,{}stays{}), XML text elements (StUF; namespaces, attributes and other elements untouched) and URL query strings. A field name matches exactly after normalisation (lower case, namespace prefix and punctuation dropped), soinp.bsn,BG:inp.bsnandinpBsnare one name andzaaktypeNaamis not a name.SensitiveFieldRegistryholds the default list (BSN, name, address, date of birth, e-mail address, telephone number, in StUF / Haal Centraal / common English spellings) plus the names an administrator adds in the app settingpersonal_data_fields.CallServicecall log and trace snapshot,BodyRedactor(soCallRecorderandMessageRecorderrecords), the response of a later attempt.GET/PUT /api/admin/personal-data-fields(#[AuthorizedAdminSetting]), a "Personal data in logs" section on the admin settings page, en + nl strings, documented inopenapi.json.Behaviour to review
replayRequestkeeps the real values. A failed call keeps the request it sent asreplayRequest, and a replay sends it again, so masking it would send[afgeschermd]to the partner. It is masked nowhere and stays hidden from listings, as it is today (CallLogControllerunsets it). Therequestandresponsean administrator reads are masked. To do this,CallServiceandCallRecordernow mask after the body capture policy runs.BodyRedactorgained apersonalData: falsemode for that copy.BodyRedactornow masks personal data before its secret text patterns run, because a secret pattern can cut through JSON syntax and leave a body that can no longer be parsed.CallServiceBodyCaptureTest×2,CallServiceWithheldBodiesTestcontrol). The spec now asks for exactly the opposite, so they now assert that the body is captured with[afgeschermd]in place of the BSN. The replay test is unchanged and still passes:replayRequestkeeps the real BSN.Tests added
PersonalDataMaskerTest(12): normalisation, exact matching, JSON at depth, XML/StUF, URL queries, arrays.SensitiveFieldRegistryTest(+5): the default list covers the required kinds, JSON and XML masking, an added field (kenteken) is masked, a malformed setting adds nothing.CallServicePersonalDataMaskingTest(5): the StUF scenario (inp.bsn+geslachtsnaammasked in the stored request, the partner received both), a JSON response and query, an added field, replay kept, the trace snapshot.CallRecorderPersonalDataTest(4) andPersonalDataSettingsControllerTest(8, including admin-only attributes and refusals).Tasks left
None in code. Other locales do not have the four new admin strings yet (
test:l10n:paritywas already red before this change).Suite
PHPUnit unit: before 8222 tests, 2 errors + 2 failures (CallServiceTest ×2, JobsControllerTest::testUnknownJobIsNotFound ×2). After 8256 tests, the same 2 errors + 2 failures.
SynchronizationSynchronizeEntryGoldenTestfails now and then on plain development as well (it timed out once in three runs there), so it is inherited. phpcs and phpstan are clean on the changed lib files; eslint is clean on the changed Vue;test:l10npasses andcheck:l10n-jsis up to date.Generated by Claude Code