Mask
Deprecated
Use phi-deidentify node instead. It provides NLP-based detection and FHIR-aware processing.
Category: Security
Node id: mask
Maturity: beta
Risk tier: B
Standards: HIPAA, SOC2
Masks sensitive PII/PHI data using multiple strategies including redaction, hashing, partial masking, and replacement
What it does
- Four operations: mask, unmask, detect, batch
- Four masking strategies: redact, replace, hash, partial
- Eight PII data types: email, phone, SSN, credit card, name, address, DOB, text
- Tokenized masking; reversing a token needs a vault, which is not implemented
- Format-preserving masking option
Use cases
- Mask patient SSN and phone numbers in clinical reports
- Detect PII in free-text clinical notes
- Batch-mask multiple fields in patient records
- Reversible masking for authorized data recovery
Runtime
- Performance tier:
fast
Input ports
| Name | Type | Required | Description |
|---|---|---|---|
data | text | No | Data string to mask (mask operation) |
text | text | No | Text to scan for PII (detect operation) |
masked_data | text | No | Previously masked data (unmask operation) |
authorized | any | No | Authorization flag for unmask operation |
fields | json | No | Map of field name to value for batch masking |
field_types | json | No | Map of field name to PII type for batch masking |
Output ports
| Name | Type | Required | Description |
|---|---|---|---|
result | json | No | Full masking result with operation details and masked data |
token_map | json | No | Token-to-original mapping for reversible masking |
success | boolean | No | Whether the operation succeeded |
Settings
Basic
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Operation | operation | enum | Yes | mask | mask, unmask, detect, batch | Masking operation to perform |
| Data Type | data_type | enum | No | text | email, phone, ssn, credit_card, name, address, date_of_birth, text | Type of PII data to mask |
| Strategy | strategy | enum | No | redact | redact, replace, hash, partial | Masking strategy to apply |
Auth
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Token | token | string | No | Token for vault-based unmasking |
Advanced
| Setting | Name | Type | Required | Default | Allowed values | Description |
|---|---|---|---|---|---|---|
| Mask Character | mask_char | string | No | * | Character to use for masking | |
| Preserve Format | preserve_format | boolean | No | false | Keep the original format while masking content |
Errors
| Code | Description |
|---|---|
INVALID_OPERATION | The specified masking operation is not recognized |
MISSING_DATA | Required input data is not provided for the operation |
UNMASK_UNAUTHORIZED | Unmasking requires authorization that was not provided |
INVALID_TOKEN | Token for vault-based unmasking is invalid |
Runtime notes
- token_map is currently empty — vault-based tokenization is pending; use hash strategy for deterministic pseudonymization
- result shape varies by operation — mask includes masked_data, detect includes detections array, batch includes masked_fields map
- unmask operation returns success=false (not an error) when authorized=false — check success to gate access
- unmask is a STUB: it does not retrieve the original value from a token vault and returns a placeholder. Do not build a workflow that depends on reversing a mask.
- detect operation scans for email, phone, SSN, and credit card patterns via regex; does not mask automatically
See Build any workflow for how to put nodes together and Ports, types and data flow for how port types connect.
¿Algo no está claro? Envíe sus comentarios sobre la documentación por correo electrónico..