Custom Labels
While Gigantics provides comprehensive system labels, you may need to create custom labels for organization-specific data types or unique business requirements. Custom labels allow you to define your own data classification rules using two distinct detection mechanisms.
When to Use Custom Labels
Custom labels are useful for:
- Organization-specific data classifications
- Industry-specific sensitive data types
- Internal data categories not covered by system labels
- Business logic-based classifications
Creating Custom Labels
Accessing Custom Label Creation
- Navigate to the Project Settings
- Go to the "Labels" section
- Click "Create Custom Label"
- Fill in the label configuration details
Custom Label Properties
When creating a custom label, you need to specify several properties that control how the label behaves during discovery and processing.
Basic Information
| Property | Description | Example |
|---|---|---|
| Label Name | A unique identifier for your label (will be prefixed with "custom/") | CUSTOMER_LOYALTY_ID |
| Description | Explanation of what data this label covers | Internal customer loyalty program identifiers |
| Category | Grouping for organizational purposes | Customer Data, HR Data, Financial Data |
Classification Settings
| Property | Description | Options |
|---|---|---|
| PII Status | Whether this label represents PII data | True (contains PII), False (does not contain PII) |
| Default Severity | Risk level assigned to fields with this label | Low, Medium, High, Very High |
Detection Logic
There are two types of detection logic you can configure for custom labels. Each type has specific configuration fields that control how the label is detected during discovery.
1. Metadata Hint Detection
This method applies labels based on patterns in entity (table) names and field (column) names. It's useful for structured data where naming conventions indicate sensitive data types.
| Field | Purpose | Options | Example |
|---|---|---|---|
| Entity Name Type | How to match entity/table names | Exact (exact text matching), Regex (regular expressions) | Regex |
| Entity Name Text | Pattern to match against table/entity names | Text pattern | customer.* |
| Field Name Type | How to match field/column names | Exact (exact text matching), Regex (regular expressions) | Regex |
| Field Name Text | Pattern to match against column/field names | Text pattern | ^loyalty_.*_id$ |
2. Data Matchers Detection
This method applies labels based on patterns in the actual data values. It's useful when data content indicates sensitivity regardless of naming conventions.
| Field | Purpose | Options | Example |
|---|---|---|---|
| Matcher Type | How to match data values | Exact (exact text matching), Regex (regular expressions) | Regex |
| Expression Text | Pattern to match against actual data values | Text pattern or regex | ^EMP\d{6}$ |
Custom Functions for Label Processing
You can associate custom JavaScript functions with your labels for specialized processing during data handling. These functions are created in the Project > Functions area and can be used for detection, transformation, or validation of data values during different phases of processing.
Types of Custom Functions:
- Detection Functions - Used during the discovery process to identify if a field should be labeled with a specific label, often with complex business logic
- Transformation Functions - Used during anonymization to modify the actual data values
- Validation Functions - Used to verify data format or content
To create a custom function for label processing:
- Navigate to Project Settings > Functions
- Click "New Function"
- Give your function a name and description
- Write your JavaScript code in the editor
Example 1 - Pattern-Based Label Detection:
Example 2 - Context-Aware Label Detection:
Example 3 - Dictionary-Based Label Detection:
Example Custom Labels with Detection Logic
Example 1 - Metadata Hint for Customer Loyalty IDs:
Example 2 - Data Matcher for Custom Employee IDs:
Managing Custom Labels
Editing Custom Labels
You can modify existing custom labels:
- Change the description
- Update PII status
- Adjust default severity levels
Note: Changes to custom labels affect future discovery jobs but not completed ones.
Deleting Custom Labels
Delete custom labels you no longer need:
- Only unused labels can be deleted
- System will warn if the label is in use
- Associated field classifications will be removed
Applying Custom Labels
Custom labels can be applied during:
-
Discovery Process:
- Added to the label dictionary
- Used in automatic classification
-
Manual Labeling:
- Applied to specific fields during review
- Used in the field editing interface
-
Rules Configuration:
- Referenced in anonymization rules
- Used in data synthesis transformations
Custom Label Best Practices
- Use clear, descriptive names that indicate the data type
- Follow your organization's data classification standards
- Regularly review and update custom labels
- Document the business purpose of each custom label
- Ensure consistent application across projects
After creating custom labels, you can use them in your discovery processes and adjust their sensitivity as needed.