Skip to content

have default and customizable anonymization definitions #3

@NeimadTL

Description

@NeimadTL

Since data anonymization is just a way to make data unrecognizable, we should introduce a way so the gem does it by default for a set of chosen attributes.

class User
  def anonymization_definitions
    [firstname, lastname, email] 
  end
end

user = User.new(firstname: 'John', lastname: 'Doe', email: 'jd@example.com')
user.save

John's has used the service for quite long time and was happy with it but for some reason, he no longer needs it. He decides to delete his account and therefore the service provider needs to anonymize its data.

user = User.find_by(email: 'jd@example.com')
user.anonymize
user.reload
=> #<User id:3, firstname: '3_anonymzed', lastname: '3_anonymized', email: '3_anonymized@anonymzed.com'>

Customizable anonymzation values should still be allowed from the standpoint of the service providers. They may want to exposed those anonymized data to their customers in different way than <record.id>_anonymized

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions