Feature Request: Add Canadian Business Number recognizer (CA_BN)
Is your feature request related to a problem? Please describe.
Presidio currently supports two Canadian entities (CA_SIN and CA_POSTAL_CODE) but not the Canadian Business Number (BN), a 9-digit business identifier issued by the Canada Revenue Agency (CRA). BNs appear in invoices, tax filings, payroll records, and B2B documents, so text containing them cannot currently be fully de-identified for Canadian business contexts.
Describe the solution you'd like
A new pattern recognizer, CaBnRecognizer, detecting the entity CA_BN:
- Format: 9 digits where the last digit is a Luhn check digit (same scheme as CA_SIN). Commonly written as a 15-character program account number: the 9-digit BN + a 2-letter CRA program identifier (RT, RP, RC, RM, RR, RZ) + a 4-digit reference number, e.g.
123456782 RT 0001. - Detection: a weak pattern for the bare 9-digit form (relies on context words) and a medium pattern for the program account form, with Luhn checksum validation to eliminate false positives.
- Bilingual English/French context words (business number / numéro d'entreprise, CRA / ARC, GST / TPS, etc.).
- Registered disabled by default with en/fr support, following the CA_SIN and CA_POSTAL_CODE (#2204) precedents.
Describe alternatives you've considered
A deny-list or custom regex per deployment, but a predefined, checksum-validated recognizer benefits all users and matches how other national identifiers (AU_ABN, SG_UEN) are handled.
Additional context
I have a working implementation with unit tests ready and will open a PR referencing this issue.
Source: data-privacy-stack/presidio