Masking pipeline
Masking is fail-closed and happens at the SDK, inside your infrastructure, before any data is transmitted. The following describes the full pipeline from SDK to storage.
- SDK: primary masking (edge). The SDK applies your project's masking rules before posting to ingest. Every value is hidden unless a
keeprule explicitly permits it. By default every string, including an email address, becomes<masked>; numbers become0and booleans becomefalse. A stub email address is only produced when a mask rule for that field carriestype: "email"and theSTUBSMITH_MASK_SALTenvironment variable is set, in which case the SDK generates a format-preserving placeholder on your project's placeholder domain (defaultstub.invalid). A new field in a response is masked automatically until you configure a rule for it. The masking rules, both the per-fingerprintfield_rulesand the project-level global rule sets, are downloaded from the server and cached locally by the SDK. The server never applies these rules itself; it only provides them to the SDK. - Ingest: checks. The ingest service accepts only payloads marked
sdk_masked=true, which the official SDKs set after masking. Payloads lacking this flag are rejected with a400 sdk_requirederror. Ingest does not scan captures for personal data: masking happens in the SDK, and a server-side scan could only recognise an arbitrary subset of formats. On accepted payloads the server runs one safety net, clearly secondary to the masking layer:- Image backstop. Request and response bodies with an
image/*content type that do not match the canonical 1×1 pixel placeholder for their subtype are replaced with that placeholder. This enforces the same image-placeholder invariant the SDK applies.
- Image backstop. Request and response bodies with an
- Fingerprint pending gate. Every capture is classified into a fingerprint, the structural identity of its request shape. New fingerprint shapes are held in a pending state. While a fingerprint is pending, occurrence counts and response-variant metadata are recorded, but no capture bodies are stored. An operator opens the fingerprint in the Request Types editor, reviews the field names and paths (not stored plaintext), and saves a set of
field_rulesto approve it. Only after approval does the ingest service begin writing matching capture bodies to permanent storage.