3

I'm looking to script the standup of a development environment...specifically, a dev environment that I can allow devs to work in without them seeing personal or sensitive information about our clients.

  • Partly this is because some of our devs are also our clients and I don't want them to see their fellow clients' information.
  • Partly it is because some of our devs are all over the world and I feel I owe it to our users who share their very personal details to protect that information.

My thinking on how to achieve this goes something like this:

System Stuff

  • Use docker with buildkit to jumpstart a Drupal / Civi environment
  • Pull latest code / themes / modules from our prod site and push it into docker
  • Dump latest prod database for Drupal and Civi and push that into docker
  • Make changes to configuration. e.g. stripe keys, SMTP, etc.

Privacy Stuff - CiviCRM

  • Replace all first and last names with random words
  • Replace all street addresses with random words. Leave postal codes and states.
  • Replace all phone numbers with random numbers.
  • Delete all sensitive activities (e.g. our custom ones where we collect personal information), or replace the activities' data with random data
  • Replace all email addresses with test addresses

Privacy Stuff - Drupal

  • Replace all webform submissions with random information, at least for those with private info

I fully expected there to be something already out there in our community that I could use for the CiviCRM privacy stuff, but it doesn't seem to be the case.

  • Do any of you have suggestions for existing tools or scripts?
  • What do you do for allowing 3rd party developers to work with your CiviCRM instance?

Thanks

PS: Why do this instead of just put in some test users? We categorize our users in various ways so creating, say, 5 test users of each type is becoming increasingly cumbersome. Also, it is helpful to be able to test against real data such as our set of historical events, user event registrations, and so on. I figured writing one anonymization script would be easier than writing and maintaining a script that creates realistic test data. But tell me if you think I'm going about this wrong!

1
  • Thanks Demerit! "Anonymize" was the keyword I did not realize I should search on. Thank you. – richardsplayground Sep 25 '19 at 4:46
0

You should check out the Anonymizer extension.

A word of warning - make sure that outgoing email is disabled! You don't want any of your CiviRules etc. being triggered and sending out emails. I saw a colleague who had CiviCRM WordPress Profile Sync installed, which meant that changing the email address in Civi changed the email in WordPress - which sent out a "your email address has been changed" message to everyone who had a login...

1
  • I'll just comment that I really think this question is a duplicate of the one mentioned in my comment above, which lists the anonymizer extension as the first choice in its answer. Can you add this as a comment at that question, since yes that does seem like a good warning. But I don't think this question should be answered here. Not that it's a bad question, it just already has been asked and answered. – Demerit Sep 25 '19 at 3:17

Not the answer you're looking for? Browse other questions tagged or ask your own question.