Skip to content

DLP rule testing — admin workflow

Before deploying DLP rule changes to production, use the two built-in testing tools to validate that your rules behave as expected across representative input samples and organizational contexts.

  • Test panel — validates a single rule’s pattern against sample text in the DLP rule editor. Use it during rule authoring to iterate quickly on patterns.
  • Evaluate endpoint — simulates the complete DLP rule chain for a specific org/group context. Use it to validate full rule stack behavior and produce evidence for compliance reviews.

This guide focuses on the admin workflow for compliance validation. For the underlying API reference, see DLP pipeline testing guide.


The test panel is embedded in the DLP rule editor. It evaluates the rule’s current configuration (pattern, detector type, action tier) against sample text you provide, without saving the rule.

  1. Navigate to Admin > DLP Rules > New Rule.
  2. Set Detector type to regex, enter your pattern (e.g., \b\d{3}-\d{2}-\d{4}\b for SSNs), set Entity type and Action tier.
  3. Scroll to Test Rule at the bottom of the form and click to expand the panel.
  4. Paste representative sample text in the Sample Text field. Include both matching content (expected to match) and non-matching content (expected to pass through cleanly).
  5. Click Run Test.
  6. Review the results:
    • Match count badge — amber if matches found, green if clean.
    • Entity type chips — entity types detected.
    • Action badge — the action that would fire (block / redact / log_only / prompt), color-coded by severity.
    • Highlighted text — matched regions highlighted in action-tier color.
  7. Adjust the pattern and re-run until matches are correct. Then save the rule.

A rule that matches too broadly will produce unnecessary blocks or redactions. Test against content you do not want to match:

  • Generic numeric strings (e.g., phone numbers, postal codes) if your pattern targets SSNs
  • Product IDs or reference numbers that share structural similarity with PII patterns
  • Content from the user groups that will be affected most heavily by this rule

The goal is a clean run (0 matches) against non-PII content and accurate matches against PII content.

Detector typePattern fieldWhat it tests
regexRegular expressionPattern matching against the sample text
nerEntity type label (e.g., PERSON, ORG)NER model entity detection
llm / glinerEntity type labelGLiNER contextual entity detection

The test panel maps frontend detector types to backend rule types automatically (llmgliner).


Evaluate endpoint — full rule chain validation

Section titled “Evaluate endpoint — full rule chain validation”

The evaluate endpoint runs the complete DLP rule chain for an org context and returns a decision trace. Use this to:

  • Validate that rule priorities are correct (the right action wins)
  • Confirm that org-level rule suppressions work as intended
  • Produce evidence of rule coverage for compliance reviews
  • Test how changes to a group context affect the outcome
POST /api/admin/dlp-rules/evaluate
Authorization: Bearer $ADMIN_TOKEN
Content-Type: application/json
{
"text": "Please process payment card 4532-0151-1234-5678 for account holder Jane Doe (SSN 123-45-6789).",
"org_id": "org_01abc123",
"group_id": "grp_01finance",
"user_id": null
}
FieldRequiredDescription
textYesText to evaluate (max 50,000 characters)
org_idYesOrganization UUID — determines which rules and suppressions apply
group_idNoGroup UUID — applies group-level rule overrides when set
user_idNoUser UUID — reserved for future user-level overrides
{
"text_length": 92,
"org_id": "org_01abc123",
"rules_evaluated": 18,
"rules_matched": 2,
"final_action": "block",
"matched_rules": [
{
"rule_id": "rule_01cc2d3e",
"rule_name": "credit-card-pci",
"detector_type": "regex",
"entity_type": "credit_card",
"action_tier": "block",
"match_count": 1,
"matches": [
{ "start": 28, "end": 47, "matched_text": "4532-0151-1234-5678", "entity_type": "credit_card" }
],
"source": "platform"
},
{
"rule_id": "rule_01dd4e5f",
"rule_name": "ssn-pii-block",
"detector_type": "regex",
"entity_type": "ssn",
"action_tier": "block",
"match_count": 1,
"matches": [
{ "start": 79, "end": 90, "matched_text": "123-45-6789", "entity_type": "ssn" }
],
"source": "platform"
}
],
"suppressed_rule_ids": [],
"custom_org_patterns": 0,
"decision_trace": [
"Loaded 18 active platform rules for org org_01abc123",
"Loaded 0 suppressed rule IDs",
"Filtered 0 suppressed platform rules",
"Platform rule evaluation complete: 18 evaluated, 2 matched",
"Org custom pattern evaluation complete: 0 evaluated",
"Final action determined: block"
]
}

final_action — the highest-priority action across all matched rules. The action hierarchy is:

block > redact > prompt > log_only > none

If one rule matches with block and another with redact, the final action is block.

matched_rules — each rule that produced at least one match, including:

  • rule_id — use this to navigate to the rule in the admin UI
  • sourceplatform (built-in platform rules), org_custom (org-added patterns), or org_suppress (suppressed by the org)
  • action_tier — the action this individual rule contributes

suppressed_rule_ids — platform rule IDs that were excluded because the org has configured a suppression for them.

decision_trace — ordered evaluation log showing each step. This is the primary artifact for compliance review.


Use the evaluate endpoint to build a test matrix that demonstrates rule coverage for your compliance framework. Run these tests after any rule configuration change and before promoting to production.

Validate that payment card data is blocked in all required contexts:

Terminal window
# Test 1: Visa card number triggers block
curl -s -X POST https://api.arbitex.ai/api/admin/dlp-rules/evaluate \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Card number 4532015112345678 expiry 12/28 CVV 123",
"org_id": "'$ORG_ID'"
}' | jq '{final_action, rules_matched}'
# Expected: { "final_action": "block", "rules_matched": 1 }
# Test 2: Non-PCI text passes cleanly
curl -s -X POST https://api.arbitex.ai/api/admin/dlp-rules/evaluate \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Please summarize Q3 earnings from the annual report.",
"org_id": "'$ORG_ID'"
}' | jq '{final_action, rules_matched}'
# Expected: { "final_action": "none", "rules_matched": 0 }

Validate that protected health information is identified:

Terminal window
# Test: PHI content triggers redact or block
curl -s -X POST https://api.arbitex.ai/api/admin/dlp-rules/evaluate \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Patient Jane Doe DOB 1985-04-12 diagnosis: Type 2 diabetes MRN 00123456",
"org_id": "'$ORG_ID'"
}' | jq '{final_action, "matched": [.matched_rules[].rule_name]}'

Validate that group-level rule overrides apply correctly. Some groups may have stricter or more permissive rules:

Terminal window
# Test finance group — should trigger ALLOW_WITH_OVERRIDE for card numbers
curl -s -X POST https://api.arbitex.ai/api/admin/dlp-rules/evaluate \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "Test card 4532015112345678 (synthetic QA data)",
"org_id": "'$ORG_ID'",
"group_id": "'$FINANCE_GROUP_ID'"
}' | jq .final_action
# Expected: "prompt" (if finance group has ALLOW_WITH_OVERRIDE rule)

Confirm that org-level rule suppressions don’t unintentionally widen coverage:

Terminal window
curl -s -X POST https://api.arbitex.ai/api/admin/dlp-rules/evaluate \
-H "Authorization: Bearer $ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"text": "NPI 1234567890 provider John Smith",
"org_id": "'$ORG_ID'"
}' | jq '{final_action, suppressed_rule_ids}'

If suppressed_rule_ids is non-empty, verify that the suppressed rules were intentionally suppressed and that sufficient alternative coverage exists.


The evaluate endpoint response is suitable as compliance evidence that DLP rules are configured to detect specific data types. To produce a test evidence package:

  1. Define a test case matrix (input text, expected final_action, expected rules_matched).
  2. Run each test case and capture the full response JSON.
  3. Store the responses alongside the rule configuration export (see Config backup and restore).
  4. Include the decision_trace array in your evidence — it provides an auditable chain showing which rules evaluated and in what order.

For SOX: demonstrate that rules covering financial data types (credit_card, bank_account, iban) produce block or redact actions in the production org context.

For GLBA: demonstrate that customer financial information patterns are covered and that override actions (ALLOW_WITH_OVERRIDE) produce audit log entries (test the override flow end-to-end; see ALLOW_WITH_OVERRIDE governance).