Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cloudhooks for scrubbing database #659

Closed
aweingarten opened this issue Nov 11, 2016 · 9 comments
Closed

Add cloudhooks for scrubbing database #659

aweingarten opened this issue Nov 11, 2016 · 9 comments
Assignees
Labels
Enhancement A feature or feature request

Comments

@aweingarten
Copy link
Contributor

Business Requirements

() As a user who values my PII I want it protected on lower environments

Technical Requirements

  • Add a recipe for scrubbing the user table
  • Add a facility for scrubbing, keys stored in the DB
  • Add tools to execute scrubs on custom tables.
@grasmash
Copy link
Contributor

You probably want to scrub fields attached to the user entity as well.

@greylabel
Copy link
Contributor

Should also consider stored IP addresses, sessions table, authmap table, URL alias (if users have aliases set), and any form submissions.

@grasmash
Copy link
Contributor

Quick note that this exists in part already: https://github.com/acquia/cloud-hooks/blob/master/samples/db-scrub.sh

@grasmash grasmash self-assigned this Nov 21, 2016
@grasmash grasmash added the Enhancement A feature or feature request label Nov 21, 2016
@grasmash
Copy link
Contributor

Ok, I'm changing my mind on the involvement of BLT here. BLT will run drush sql-sanitize in a cloud hook, which will take care of user email addresses, passwords, and sessions.

Any further sanitization should be provided by a contrib module that implements hook_drush_sql_sync_sanitize. Ideally, that module would handle further sanitization of core fields, like email addresses associated with comments, or fields attached to the user entity.

@grasmash
Copy link
Contributor

The downside of sql-sanitize is that it seems to change all user passwords to the same password, which is "password" by default. This feels like it's making non-prod envs less secure.

@seanhamlin
Copy link

seanhamlin commented Dec 18, 2016

There is a requirement for this functionality on a project I am working with.

Ideal scenario:

  • Developer would execute blt local:refresh and it would do all the regular steps as well as execute a drush sql-sanitize at the end (with optional arguments supplied, e.g. --sanitize-email=no --sanitize-password=no)

How would one best achieve the above? I don't believe cloud hooks fire on a local environment ;)

@greylabel
Copy link
Contributor

@seanhamlin I think in this scenario, you would want to make sure the sanitization occurs before a develop could ever run a db sync and not leave it up to a post-sync process. Ideally, developers would never be using (or have access to) data from production or any other environments that contains sensitive information.

@seanhamlin
Copy link

@greylabel well this seems at odds with the blt command blt local:refresh to which pulls a database from a remote source (by live dumping the database). They could pull the database from Site Factory TEST, but this will contain out of date data (as content authors are working on production), and will add another (lengthy) step to the synchronisation process (an ACSF PROD -> ACSF TEST sync can take a while to complete depending on the number of sites you stage).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement A feature or feature request
Projects
None yet
Development

No branches or pull requests

4 participants