To resolve this, we recommend that you create a new custom data identifier (DI) to use in conjunction with a custom policy.
- In Enforce, go to Manage -> Policies -> Data Identifiers.
- Click Add Data Identifier.
- In the Details section, enter a name for this custom DI. The description is optional, but recommended.
- In Patterns, enter the following string:
- Under Data Normalizer, select "Do nothing".
- Under Validation Checks, click Exclude beginning characters.
- In the Description and Data Entry box, under Exclude beginning characters, enter the following:
- Click Add Validator.
- Under Validation Checks, click Polish Social Security Number Validation Check.
- Click Add Validator.
- Click the Save button at the top of the window. This will create your custom DI.
Now, let's create the custom policy to detect PESEL numbers.
- In Enforce, go to Manage -> Policies -> Policy List.
- Click New.
- Select Add a blank policy and click Next.
- Enter a name for your policy. You can also enter a description, but this is optional.
- Select the policy group this policy should be in.
- Click Add Rule.
- Select Content Matches Regular Expression, then click Next.
- Enter a name for the rule.
- In the Regular Expression field, enter the following string:
\d{2}(0[1-9]|[1-9][0-9])(0[1-9]|([1-3][0-9]))\d{5}
- Click the pull-down for Also Match: and select the custom DI we created earlier.
- Click Add.
- Click OK.
- Click Save.
At this point, you have a policy that will correctly detect PESEL numbers while excluding invalid numbers. You can edit this policy to add other rules, exclusions, and response rules as needed.