{
"type": "object",
"title": "PII Text Redaction Plugin Configuration",
"$schema": "http://json-schema.org/draft-07/schema#",
"properties": {
"context": {
"type": "array",
"items": {
"type": "string"
},
"title": "Context Words",
"description": "Additional context words to improve detection accuracy."
},
"entities": {
"type": "array",
"items": {
"type": "string"
},
"title": "Entity Types",
"examples": [
[
"EMAIL_ADDRESS",
"PHONE_NUMBER",
"SSN"
]
],
"description": "List of PII entity types to redact. Supported types include: PERSON, EMAIL_ADDRESS, PHONE_NUMBER, CREDIT_CARD, SSN, IBAN_CODE, IP_ADDRESS, etc. If not specified, all detected entities will be redacted."
},
"language": {
"type": "string",
"title": "Language",
"default": "en",
"examples": [
"en",
"es",
"de",
"fr"
],
"description": "Language code for text analysis."
},
"deny_list": {
"type": "array",
"items": {
"type": "string"
},
"title": "Deny List",
"examples": [
[
"confidential"
]
],
"description": "List of terms/patterns that should always be redacted."
},
"allow_list": {
"type": "array",
"items": {
"type": "string"
},
"title": "Allow List",
"examples": [
[
"[email protected]"
]
],
"description": "List of terms/patterns that should not be redacted."
},
"score_threshold": {
"type": "number",
"title": "Score Threshold",
"default": 0.5,
"maximum": 1,
"minimum": 0,
"description": "Minimum confidence score (0-1) required to redact an entity."
},
"default_anonymizer": {
"type": "object",
"title": "Default Anonymizer",
"default": {
"type": "replace",
"new_value": "<REDACTED>"
},
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"replace",
"redact",
"hash",
"mask",
"encrypt"
],
"type": "string",
"title": "Type",
"description": "Type of anonymization: 'replace' (substitute with value), 'redact' (remove), 'hash' (one-way hash), 'mask' (partial masking), 'encrypt' (reversible encryption)"
},
"from_end": {
"type": "boolean",
"title": "Mask from End",
"description": "Mask from end instead of beginning for 'mask' type"
},
"new_value": {
"type": "string",
"title": "New Value",
"description": "Replacement value for 'replace' type (e.g., '<REDACTED>')"
},
"masking_char": {
"type": "string",
"title": "Masking Character",
"description": "Character to use for 'mask' type (default: *)"
},
"chars_to_mask": {
"type": "number",
"title": "Characters to Mask",
"description": "Number of characters to mask for 'mask' type"
}
},
"description": "Default anonymization method to apply to all detected entities."
},
"entity_anonymizers": {
"type": "object",
"title": "Entity-Specific Anonymizers",
"examples": [
{
"CREDIT_CARD": {
"type": "hash"
},
"PHONE_NUMBER": {
"type": "mask",
"from_end": true,
"masking_char": "X",
"chars_to_mask": 4
},
"EMAIL_ADDRESS": {
"type": "replace",
"new_value": "<EMAIL_REDACTED>"
}
}
],
"description": "Entity-specific anonymization methods. Keys are entity types (e.g., 'PHONE_NUMBER', 'EMAIL_ADDRESS')",
"additionalProperties": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"enum": [
"replace",
"redact",
"hash",
"mask",
"encrypt"
],
"type": "string",
"title": "Type"
},
"from_end": {
"type": "boolean",
"title": "Mask from End"
},
"new_value": {
"type": "string",
"title": "New Value"
},
"masking_char": {
"type": "string",
"title": "Masking Character"
},
"chars_to_mask": {
"type": "number",
"title": "Characters to Mask"
}
}
}
}
},
"description": "Configuration for the Presidio-based text redaction plugin that detects and redacts PII from text messages."
}