optionally provide "sanitized" version of database/filesystem

greggles - May 25, 2009 - 20:00
Project:Demonstration site (Sandbox / Snapshot)
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

A great additional feature for Demo module is to create versions of the files which can be shared with untrusted users so they can try out a particular set of configurations. But, because they are untrusted, you want to share only the basic pieces and not e-mail address, hashed passwords, i.p addresses of visitors, etc.

In addition to the items in the attached script, it is important to change the value of the drupal_private_key in the variable table which is a 64 character string.

The attached script is a starting point and is what is used on d.o databases before they are shared. So, it has some d.o specific stuff and may not work for other core/contrib modules.

AttachmentSize
sanitize_db_prior_to_share.txt1.2 KB

#1

sun - May 25, 2009 - 20:33

Nice! I'm tinkering about what the best place for this would be, and, how we could support custom sanitations (for contrib modules, as in this script).

For example, in #294879: Split module into admin include and demo_reset module, I already want to split the "demonstration" functionality from the "snapshot" functionality. One could argue that sharing snapshots rather belongs to the "demonstration" functionality, and thus, could be provided by that new sub-module.

OTOH, RobLoach's Demo Site Install Profile might as well be an option to put this. Not sure though, because I didn't look at its code.

#2

Rob Loach - May 25, 2009 - 20:39

Good god yes. Would save a lot of space in the backed up databases. I'm not sure how I feel about the "Munge emails for security" feature here though, as you'd loose a lot of data. The "Get rid of irrelevant data" is a definite must though.

#3

sun - May 25, 2009 - 23:36

Note that excluding entire data in selected tables is handled in #204033: Allow Specified Table to Remain.

This is different though, since we want to keep the data, but make it safe for sharing.

#4

Michelle - May 26, 2009 - 01:57

You know, I always say ideas aren't worth much without code. But here I was saying "I want" on IRC and Greg comes along and makes it happen. LOL! Sometimes you do get ponies, I guess. ;)

This feature will make a whole lot of people happy. Between this and Rob's module (I'm hoping; havent' tried it out, yet) I can provide a Drupal Social Networking in a Box on SocNet.

Michelle

#5

Michelle - May 26, 2009 - 02:00

Oh, re putting this in Rob's module, I was under the impression that his module consumes the snapshots so I think it makes more sense to put it in the module generating them.

Michelle

 
 

Drupal is a registered trademark of Dries Buytaert.