Important restrictions:
- Only STRING properties can be masked. Arrays, objects, numbers, and booleans cannot be masked.
- Flow output properties cannot be masked directly. Only flow input, flow private, and node output properties can be masked.
mask_property() method on your flow object:
Dot-notation path to the property to mask. The path uses a hierarchical structure to identify the exact location of the sensitive data within the flow.Supports masking properties in:
- Flow input schema: flow.input.property_name
- Flow private schema: flow.private.property_name
- Node output schemas: flow.node_name.output.property_name
- Nested flow node outputs: flow.nested_flow.node.output.property_name
- Nested properties: flow.input.user.emailstructures.
The masking strategy to apply. Supported values:
-
MASK_ALL: Completely masks the entire value with asterisks. Example:123-45-6789becomes*********** -
MASK_LAST4: Masks all characters except the last 4. Example:123-45-6789becomes*******6789 -
MASK_FIRST4: Masks all characters except the first 4. Example:AUTH-TOKEN-12345becomesAUTH*********** -
MASK_VIA_REGEX: Uses custom regex patterns for advanced masking scenarios. Requiresregex_configparameter. Example:1234-5678-9012-3456with pattern^(\\d{4})-(\\d{4})-(\\d{4})-(\\d{4})$and maskingXXXX-XXXX-XXXX-$4becomesXXXX-XXXX-XXXX-3456
Required when using
MaskingPolicy.MASK_VIA_REGEX.Optional input masking behavior. Supported values:
MASK_WHILE_TYPING: Masks the value in real-time as you type. If omitted, data is masked only on output, not during input.
Python

