Documentation Index
Fetch the complete documentation index at: https://docs.causeflow.ai/llms.txt
Use this file to discover all available pages before exploring further.
How masking works
PII masking happens inside the Relay, inside your private network, before any results are sent to the CauseFlow control plane. The sequence is:- The Relay executes a query against your database.
- The result rows are scanned field by field against all configured masking patterns.
- Any value that matches a pattern is replaced with the mask string.
- Only the masked rows are included in the response sent to the control plane.
Built-in patterns
The following patterns are active by default whenmasking.enabled: true. You do not need to configure them manually.
| Pattern | Example input | Masked output |
|---|---|---|
| CPF (Brazilian tax ID) | 123.456.789-00 | ***.***.***-** |
| Email address | user@example.com | ***@***.*** |
| Credit card number | 1234-5678-9012-3456 | ****-****-****-**** |
| Bearer token | Bearer abc123xyz | Bearer *** |
| Brazilian phone number | (11) 98765-4321 | (**) *****-**** |
Adding custom patterns
Define custom patterns in themasking.patterns array in relay-config.yaml. Custom patterns are applied in addition to built-in patterns — adding a custom pattern does not disable the built-ins.
relay-config.yaml
Pattern fields
| Field | Description |
|---|---|
name | A unique name for this pattern. Appears in audit log entries when the pattern fires. |
regex | A regular expression matched against each string field value. Use single quotes in YAML to avoid double-escaping backslashes. |
replacement | The string that replaces any match. |
Masking in query responses
Every query response includes masking metadata so you can verify that masking is working:| Field | Description |
|---|---|
masked | true if masking is enabled and was applied to this response. false if masking is disabled. |
maskedFieldCount | Total number of field values that were replaced across all rows in this response. |
maskedFieldCount of 0 with masked: true means the query returned no values that matched any pattern — not that masking failed.
Disabling masking
Setmasking.enabled: false in relay-config.yaml to disable PII masking: