CJohnston079 / obfuscator

0 stars 0 forks source link

Ensure data obfuscated with `anonymise` method maintains internal consistency and contextual awareness #29

Closed CJohnston079 closed 4 months ago

CJohnston079 commented 4 months ago

Issue

Data generated to anonymise PII fields is not consistent with itself. For instance, en entru with name "Claire Burton" may have an email address "ian460@example.com".

Proposed resolution

Ensure anonymised PII fields are generated with contextual awareness. For instance, names should be generated before email addresses, which can then be derived from the name. Generating the fields within a class PIIFields would allow anonymise to create a new set of linked PII fields on demand.

CJohnston079 commented 4 months ago

Resolved in 600f8db14e23f6805c892b66cb4ed19ed3c9878b by adding a new generate_pii module that calls generate_gender, generate_name, generate_email, generate_person and generate_pii functions in that order to ensure consistency of data.