Aller au contenu principal

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​

NameTypeRequiredDescription
datatextNoData string to mask (mask operation)
texttextNoText to scan for PII (detect operation)
masked_datatextNoPreviously masked data (unmask operation)
authorizedanyNoAuthorization flag for unmask operation
fieldsjsonNoMap of field name to value for batch masking
field_typesjsonNoMap of field name to PII type for batch masking

Output ports​

NameTypeRequiredDescription
resultjsonNoFull masking result with operation details and masked data
token_mapjsonNoToken-to-original mapping for reversible masking
successbooleanNoWhether the operation succeeded

Settings​

Basic​

SettingNameTypeRequiredDefaultAllowed valuesDescription
OperationoperationenumYesmaskmask, unmask, detect, batchMasking operation to perform
Data Typedata_typeenumNotextemail, phone, ssn, credit_card, name, address, date_of_birth, textType of PII data to mask
StrategystrategyenumNoredactredact, replace, hash, partialMasking strategy to apply

Auth​

SettingNameTypeRequiredDefaultAllowed valuesDescription
TokentokenstringNoToken for vault-based unmasking

Advanced​

SettingNameTypeRequiredDefaultAllowed valuesDescription
Mask Charactermask_charstringNo*Character to use for masking
Preserve Formatpreserve_formatbooleanNofalseKeep the original format while masking content

Errors​

CodeDescription
INVALID_OPERATIONThe specified masking operation is not recognized
MISSING_DATARequired input data is not provided for the operation
UNMASK_UNAUTHORIZEDUnmasking requires authorization that was not provided
INVALID_TOKENToken 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.

Quelque chose n'est pas clair ? Envoyez vos commentaires sur la documentation par courriel.