{"type":"root","children":[{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"What this solves"}]},{"type":"text","value":": Detect your own identifiers (employee numbers, project names, internal ticket formats) with rules you write, for the whole account or for a single key, and try them on sample text before saving."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A custom rule is built from a fixed set of parts: one way to match, plus an optional checksum and optional context words. The parts and their limits come from one place, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET /v1/dlp/capabilities"}]},{"type":"text","value":"; the console form, the API and this page all read from it."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Custom rules run only while data protection is on for the call (see "},{"type":"element","tagName":"a","properties":{"href":"security"},"children":[{"type":"text","value":"Data protection (DLP)"}]},{"type":"text","value":"). They are added on top of the built-in types and the recommended rules; they do not replace them."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Where a rule applies"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Scope"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Applies to"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Limit"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"TENANT"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Every call of the account, including calls that go directly to a "},{"type":"element","tagName":"a","properties":{"href":"local-nodes"},"children":[{"type":"text","value":"Local Node"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"50 rules"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"KEY"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Calls made with that key only. The key must belong to your account"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"20 rules per key"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Rules from both scopes run together on a key's calls. The scope is fixed when the rule is created."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Console: "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Security"}]},{"type":"text","value":" → "},{"type":"element","tagName":"strong","properties":{},"children":[{"type":"text","value":"Custom rules"}]},{"type":"text","value":". The selector at the top switches between the whole account and one key."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Ways to match"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"kind"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Fields"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Notes"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"KEYWORDS"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"keywords.words"}]},{"type":"text","value":" (up to 100, each up to 64 characters), "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"keywords.wholeWord"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Always case-insensitive. With "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"wholeWord"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Apollo"}]},{"type":"text","value":" does not match inside "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"Apollos"}]}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"FORMAT"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"format.prefix"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"format.charset"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"format.length.min"}]},{"type":"text","value":"/"},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"max"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"format.boundary"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"format.suffix"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Prefix + characters of one set + bounded length. Prefix and suffix up to 32 characters, length up to 512, prefix plus minimum length at least 6"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"REGEX"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"regex"}]},{"type":"text","value":" (up to 500 characters)"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Java regular expression syntax"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"charset"}]},{"type":"text","value":" is one of "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ALNUM"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"UPPER_DIGIT"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"LOWER_DIGIT"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"HEX"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"DIGITS"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"B64URL"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"B64"}]},{"type":"text","value":". "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"boundary"}]},{"type":"text","value":" is "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"WORD"}]},{"type":"text","value":" (the match may not touch a letter, digit, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"_"}]},{"type":"text","value":" or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"-"}]},{"type":"text","value":" on either side) or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"NONE"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"A regular expression is checked when saved: it must compile, must not match empty text, and must stay fast on long input. Patterns that start with "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":".*"}]},{"type":"text","value":" or nest repetition such as "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"(a+)+"}]},{"type":"text","value":" are refused with the reason. At scan time a rule that runs out of its time budget fails the call instead of letting it through."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Keywords and formats are compiled into a pattern that runs in linear time, so prefer them over a hand-written regex when they fit."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Checksum"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"checksum"}]},{"type":"text","value":" keeps only matches whose digits pass a check. Separators (spaces and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"-"}]},{"type":"text","value":") are ignored when checking."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Name"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Check"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"LUHN"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Luhn mod 10 (bank card numbers)"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"IBAN_MOD97"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"IBAN mod 97"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"CN_RESIDENT_ID"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"China resident ID, GB 11643"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"TW_NATIONAL_ID"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Taiwan national ID"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"TW_RESIDENT_CERT"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Taiwan resident certificate (old and new format)"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"TW_UBN"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Taiwan unified business number"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Context words"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"context"}]},{"type":"text","value":" keeps only matches that have one of the words within "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" characters before or after them. Up to 20 words, each up to 32 characters, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"window"}]},{"type":"text","value":" from 1 to 200 (default 40). Words are compared case-insensitively."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Use it for bare numbers: an 8-digit number is everywhere, an 8-digit number within 20 characters of \"member no.\" is not."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Action"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"action"}]},{"type":"text","value":" is "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"MASK"}]},{"type":"text","value":" (replace with a placeholder and continue), "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"BLOCK"}]},{"type":"text","value":" (fail the call, not billed) or "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ALERT"}]},{"type":"text","value":" (forward unchanged, record and notify). The result of each is the same as for built-in types; see "},{"type":"element","tagName":"a","properties":{"href":"security"},"children":[{"type":"text","value":"Data protection (DLP)"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Rule schema"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"{\n  \"id\": 12,\n  \"scope\": \"TENANT\",\n  \"keyId\": null,\n  \"name\": \"Member number\",\n  \"kind\": \"REGEX\",\n  \"regex\": \"\\\\b\\\\d{8}\\\\b\",\n  \"keywords\": null,\n  \"format\": null,\n  \"checksum\": null,\n  \"context\": { \"words\": [\"member no\", \"會員編號\"], \"window\": 20 },\n  \"action\": \"MASK\",\n  \"enabled\": true,\n  \"description\": \"Loyalty programme\",\n  \"updatedAt\": \"2026-11-20T14:02:11\"\n}\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Only the fields of the rule's "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"kind"}]},{"type":"text","value":" are set. "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"name"}]},{"type":"text","value":" is up to 64 characters and unique within its scope; "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"description"}]},{"type":"text","value":" is up to 255 characters."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"When a rule blocks a call, the error returned to the caller says "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"CUSTOM_RULE"}]},{"type":"text","value":" without the rule's name, so your rule names never reach the application that made the call. Test scans and the console show the name."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Endpoints"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Console session: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/..."}]},{"type":"text","value":". "},{"type":"element","tagName":"a","properties":{"href":"management-key"},"children":[{"type":"text","value":"Management key"}]},{"type":"text","value":": the same paths under "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/manage/dlp/..."}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"table","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"thead","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Method"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"Path"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"th","properties":{},"children":[{"type":"text","value":"What it does"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tbody","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/capabilities"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"The parts, names and limits above"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"GET"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/rules?scope=TENANT"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Account rules. "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"scope=KEY&keyId=N"}]},{"type":"text","value":" for one key, "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"scope=ALL"}]},{"type":"text","value":" for both"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/rules"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Create. Body: "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"scope"}]},{"type":"text","value":", "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"keyId"}]},{"type":"text","value":" (for "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"KEY"}]},{"type":"text","value":"), and the rule fields"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"PUT"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/rules/{id}"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Change. Fields you send replace the stored ones; "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"scope"}]},{"type":"text","value":" and "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"keyId"}]},{"type":"text","value":" cannot change"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"DELETE"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/rules/{id}"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Delete"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"tr","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"POST"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"/v1/dlp/rules/test"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"td","properties":{},"children":[{"type":"text","value":"Test scan, nothing is saved"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"The test scan takes "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"text"}]},{"type":"text","value":" (up to 20,000 characters). With "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"rule"}]},{"type":"text","value":" it runs only that draft rule. Without "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"rule"}]},{"type":"text","value":" it runs everything in effect for "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"keyId"}]},{"type":"text","value":" (or the account): built-in types, recommended rules and saved custom rules."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-bash"]},"children":[{"type":"text","value":"curl -X POST https://tare.jamerly.ai/v1/dlp/rules/test \\\n  -H \"Authorization: Bearer $TOKEN\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"text\": \"Refund for member no 40271536, order 99812733\",\n    \"rule\": {\n      \"name\": \"Member number\",\n      \"kind\": \"REGEX\",\n      \"regex\": \"\\\\b\\\\d{8}\\\\b\",\n      \"context\": { \"words\": [\"member no\"], \"window\": 20 },\n      \"action\": \"MASK\"\n    }\n  }'\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"{\n  \"code\": 200,\n  \"data\": {\n    \"hits\": [{ \"label\": \"CUSTOM:Member number\", \"action\": \"MASK\", \"start\": 21, \"end\": 29, \"matched\": \"40271536\" }],\n    \"blocked\": false,\n    \"blockedLabel\": null,\n    \"maskedText\": \"Refund for member no [CUSTOM_REDACTED], order 99812733\"\n  }\n}\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"More examples"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Project code names, whole words only:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"{ \"scope\": \"TENANT\", \"name\": \"Project names\", \"kind\": \"KEYWORDS\",\n  \"keywords\": { \"words\": [\"Apollo\", \"Gemini\", \"Artemis\"], \"wholeWord\": true }, \"action\": \"MASK\" }\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"An internal token format on one key, blocked:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"{ \"scope\": \"KEY\", \"keyId\": 314, \"name\": \"Internal token\", \"kind\": \"FORMAT\",\n  \"format\": { \"prefix\": \"itk_\", \"charset\": \"B64URL\", \"length\": { \"min\": 32, \"max\": 40 }, \"boundary\": \"WORD\", \"suffix\": null },\n  \"action\": \"BLOCK\" }\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Card numbers only next to the word \"card\", checked with Luhn, alert only:"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"pre","properties":{},"children":[{"type":"element","tagName":"code","properties":{"className":["language-json"]},"children":[{"type":"text","value":"{ \"scope\": \"TENANT\", \"name\": \"Card near label\", \"kind\": \"REGEX\", \"regex\": \"\\\\b(?:\\\\d[ -]?){15}\\\\d\\\\b\",\n  \"checksum\": \"LUHN\", \"context\": { \"words\": [\"card\"], \"window\": 30 }, \"action\": \"ALERT\" }\n"}]}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"On a Local Node"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"p","properties":{},"children":[{"type":"text","value":"Account rules also run on calls that go directly to your "},{"type":"element","tagName":"a","properties":{"href":"local-nodes"},"children":[{"type":"text","value":"Local Node"}]},{"type":"text","value":". A node runs them through its DLP sidecar. A sidecar from before custom rules gained checksums and context words runs only the pattern part of such a rule, so it may catch more than the same rule does in Tare. Update the sidecar to the current release to get the same result on both paths."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"h3","properties":{},"children":[{"type":"text","value":"Next steps"}]},{"type":"text","value":"\n"},{"type":"element","tagName":"ul","properties":{},"children":[{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Built-in types and the order in which settings win: read "},{"type":"element","tagName":"a","properties":{"href":"security"},"children":[{"type":"text","value":"Data protection (DLP)"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Manage rules from your own product: read "},{"type":"element","tagName":"a","properties":{"href":"management-key"},"children":[{"type":"text","value":"Management key"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"},{"type":"element","tagName":"li","properties":{},"children":[{"type":"text","value":"Get notified on "},{"type":"element","tagName":"code","properties":{},"children":[{"type":"text","value":"ALERT"}]},{"type":"text","value":" hits: read "},{"type":"element","tagName":"a","properties":{"href":"alerts"},"children":[{"type":"text","value":"Alerts"}]},{"type":"text","value":"."}]},{"type":"text","value":"\n"}]}]}