PayloadMasks

class PayloadMasks(manifest: Manifest, strategies: MaskStrategyResolver = MaskStrategyResolver.NONE)

The response masks of the payloads a state read and the events model return outside a snapshot query: an aggregate's state and an event's body, masked by the x-wow-sensitive and x-wow-mask keywords of their schemas in manifest's $defs, as a snapshot query masks its records (SchemaMasker): every sensitive value, whatever its level, is replaced by its mask for every caller. A payload whose schema the Manifest does not carry, or that declares nothing sensitive, is returned as it is.

Each schema is compiled once, on first use; strategies resolves the custom mask strategies, and one it does not know fails the read rather than return the raw value.

Constructors

Link copied to clipboard
constructor(manifest: Manifest, strategies: MaskStrategyResolver = MaskStrategyResolver.NONE)

Types

Link copied to clipboard

Functions

Link copied to clipboard
fun event(type: AggregateType, name: String, body: JsonNode): JsonNode

body, the body of type's event named name, masked in place where it can be. name is the event's name in the log (<context>.<aggregate>.<Name>) or the Manifest's, or one of its aliases.

Link copied to clipboard
fun state(type: AggregateType, state: JsonNode): JsonNode

state, a state of type, masked in place where it can be; the masked value.