Part of #5118 (compliance wave growth), epic #5110. Cross-repo: the first half targets jasperfx.
Event data masking — rewriting protected information inside already-stored events, for GDPR-style erasure — is implemented in both products with the same shape and the same member names, in parallel namespaces:
|
|
| Marten |
Marten/Events/Protected/EventDataMasking.cs:111 — interface IEventDataMasking; Advanced.ApplyEventDataMasking(Action<IEventDataMasking>, ct) (AdvancedOperations.cs:837); EventGraph.AddMaskingRuleForProtectedInformation<T>(...) |
| Polecat |
Polecat/Events/Protected/EventDataMasking.cs:11 — interface IEventDataMasking with ForTenant(string); Advanced.ApplyEventDataMasking(...) (AdvancedOperations.cs:592); EventGraph.AddMaskingRuleForProtectedInformation<T> (EventGraph.cs:639,649) |
| jasperfx |
nothing — but JasperFx.Events/Protected/ already exists and owns StreamCompactingRequest<T> |
Two independent copies of the same interface in a folder whose shared sibling already lives upstream. This is the clearest remaining upstream lift in the event store surface.
Part 1 (jasperfx): lift IEventDataMasking
Move IEventDataMasking (and the masking-rule registration on the event registry) into JasperFx.Events.Protected, with both products' current members reconciled — note Polecat's ForTenant(string tenantId) has no Marten counterpart, so decide whether it is part of the shared contract or a Polecat extension before lifting. Both products then delete their copy and re-export.
Part 2 (compliance): the suite
EventDataMaskingCompliance, needing one seam member — EventStoreComplianceFixture.ApplyEventDataMaskingAsync(Action<IEventDataMasking>), since Advanced is each product's own type — plus a config entry for the masking rules.
| Marten tests today |
Polecat tests today |
protecting_sensitive_data.cs |
Events/event_data_masking_tests.cs |
removing_protected_information.cs |
|
- A masking rule rewrites the stored event body for the matched events only
- Masking is idempotent — applying twice does not corrupt
- Masked events keep their sequence, version, timestamp and type name
- Masking by stream, by event type, and by a predicate over the event
- An inline snapshot built before masking is not silently changed (settle the intended behavior — a rebuild is the documented way to propagate)
ForTenant scoping if it survives the lift as shared
Acceptance
- jasperfx: interface lifted,
JasperFxVersion bumped in the same PR, both products adopt and delete their copies
- One fixture member + one config entry; suite enrolled in both stores
- Originals retired in both repos
Part of #5118 (compliance wave growth), epic #5110. Cross-repo: the first half targets jasperfx.
Event data masking — rewriting protected information inside already-stored events, for GDPR-style erasure — is implemented in both products with the same shape and the same member names, in parallel namespaces:
Marten/Events/Protected/EventDataMasking.cs:111—interface IEventDataMasking;Advanced.ApplyEventDataMasking(Action<IEventDataMasking>, ct)(AdvancedOperations.cs:837);EventGraph.AddMaskingRuleForProtectedInformation<T>(...)Polecat/Events/Protected/EventDataMasking.cs:11—interface IEventDataMaskingwithForTenant(string);Advanced.ApplyEventDataMasking(...)(AdvancedOperations.cs:592);EventGraph.AddMaskingRuleForProtectedInformation<T>(EventGraph.cs:639,649)JasperFx.Events/Protected/already exists and ownsStreamCompactingRequest<T>Two independent copies of the same interface in a folder whose shared sibling already lives upstream. This is the clearest remaining upstream lift in the event store surface.
Part 1 (jasperfx): lift
IEventDataMaskingMove
IEventDataMasking(and the masking-rule registration on the event registry) intoJasperFx.Events.Protected, with both products' current members reconciled — note Polecat'sForTenant(string tenantId)has no Marten counterpart, so decide whether it is part of the shared contract or a Polecat extension before lifting. Both products then delete their copy and re-export.Part 2 (compliance): the suite
EventDataMaskingCompliance, needing one seam member —EventStoreComplianceFixture.ApplyEventDataMaskingAsync(Action<IEventDataMasking>), sinceAdvancedis each product's own type — plus a config entry for the masking rules.protecting_sensitive_data.csEvents/event_data_masking_tests.csremoving_protected_information.csForTenantscoping if it survives the lift as sharedAcceptance
JasperFxVersionbumped in the same PR, both products adopt and delete their copies