by eVolpe Consulting Group

Is data privacy your priority? Get a data-breach proof CRM system! Data Anonymizer is a tool designed to quickly encode data on your CRM instance, while preserving their diversity and relations between records. It allows you to quickly prepare a realistic instance for tests and demonstrations without the risk of leaking someone’s personal information.

Includes a 30 day guarantee
Try it Now

By clicking you consent to share your profile with the developer

Configuration structure

Introduction

Anonymizer comes with pre-built basic configuration file; however, you will likely need to customize it to your needs. To quickly generate the configuration for you instance, run the following command in your instance’s main directory:

php bin/sugarcrm anonymization:gen-def

After running it, you will receive a basic configuration code covering all modules in your instance. Copy it to new dir and new config file:/custom/include/DataAnonymizer/config//modules.php

The configuration contains of 4 files. This settings determine which field will be anonimized and how.

Customizing Anonymizer

Configuration for Anonymizer consists of six files described in the next section and located in /custom/include/DataAnonymizer/config/ directory. You can store any number of possible configurations in different directories, and use them separately by adding --config to the process start command. Each of the files can be modified separately to ensure process will be run according to your needs.

If any of the files are missing, they will be loaded from the default configuration included in Anonymizer package. You do not need to include all six files in your configuration, but make sure default config suits your needs!

Fields structure

Modules.php

modules.php is the main configuration file. The $modules array included in the file contains list of modules and fields that will be anonymized, as well as parameters of the process. Each module is represented by array of fields that will be overwritten by Anonymizer, and each field takes 3 parameters:

$modules = array(
      'Accounts' => array(                              //name of module to anonymize
         'name' => array(                               //name of field
            "class_name" => "AccountNameAnonymizer",    //name of class which be used to anonymize field. It is required.
            "priority" => true,                         //It informs Anonimizer that field should be anonymized as first - default = false.
         ),
         'phone_office' => array(
            "class_name" => "PhoneNoAnonymizer",
            "fill_if_empty" => true,                    //It informs that field should be filled if it is empty - default = false
         ),
         'ticker_symbol' => array(
            "class_name" => "NIPAnonymizer",
         ),
      ),
      'Leads' => array(
         'first_name' => array(
            "class_name" => "FirstNameAnonymizer",
            "priority" => true,
         ),
         'last_name' => array(
            "class_name" => "LastNameAnonymizer",
            "priority" => true,
         ),
      ),
),

Any anonymized module is represented by array with list of fields, which should be modified. For each field you provided 3 parameters, one of them is required, others are optional.

  • class_name (required) name of class (implementing BaseAnonymizer), which will be used to modify the field.
  • priority (optional, dafault: false) - all fields with priority set to true will be anonymized before fields without it. This parameter is used to mark fields that will be used in further stages of anonymization, usually name fields and their components.
  • fill_if_empty (optional, default: false) if this parameter is set to true, the field will be filled with calculated value even if it was empty in the original data. Otherwise, it will remain empty.

Truncate_patterns.php

truncate_patterns.php is a list of database tables that will be truncated in the process of anonymization. By default, this list includes tables related to workflows and audit tables. You can list all tables separately or use SQL wildcards. (i.e. '%_audit')

$truncate_patterns = array(
   '%_audit',
   'tracker%',
   'pmse%',
   'activities%'
);

Descriptions.php

descriptions.php contains list of texts that will be used by LoremIpsumAnonymizer class.

$descriptions = array(
   'Lorem ipsum dolor sit amet',
   'Hinc ceteri particulas',
   'Expectoque quid ad id',
);

Tickers.php

Tickers.php has a list of tax identification numbers which will be used by NIPAnonymizer class.

$tickers = array(
   '3932465288',
   '7122574237',
   '4637588796',
   '7243711561',
);

demoData.php

demoData.php extends the built-in demo dictionaries with lists of states and countries, used by CountryAddressAnonymizer and StateAddressAnonymizer classes.

$sugar_demodata['state_array'] = array(
   'AL',
   'AK',
   (...)
   'WI',
   'WY',
);
$sugar_demodata['country_array'] = array(
   'Afghanistan',
   'Albania',
   (...)
   'Zambia',
   'Zimbabwe'
);

short_texts.txt

short_texts.txt is a sequence of semi-random text that will be used by ShortTextAnonymizer class.

module_save_params.php

File configurates which functionality should be disabled for modules during saving records. For each module we can set:

  • disable_audit - if true, system does not log changes to audit tables.
  • disable_activity - if true, system does not create activities record.
  • disable_favorites - if true, system does not run any process related with favorite records.
  • disable_monitors - if true, system does not add tracker records to database.
  • disable_update_modified - if true, system does not update modified date.
  • disable_logic_hooks - if true, system does not run logic hooks for module.
  • disable_workflow - if true, system does not run workflows for module.
  • disable_email_notification - if true, system does not send email notification.

The settings is important if you want to reduced duration of anonimization.

Saving Comment Saving Comment...