Skip to content
forked from basicinc/Masker

Masking production data mongodb for testing/development

Notifications You must be signed in to change notification settings

hirokipf/Masker

This branch is 2 commits behind basicinc/Masker:master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Clicia Scarlet
Jan 23, 2020
455a9cf · Jan 23, 2020

History

15 Commits
Feb 19, 2019
Jan 23, 2020
Feb 14, 2019
Feb 14, 2019
Feb 14, 2019
Feb 14, 2019
Jan 23, 2020
Feb 19, 2019
Feb 19, 2019
Jan 23, 2020

Repository files navigation

Mongodb-data-masking

Masking your data in mongodb

Usage

gem install mongo_masker
mongo_masker mask mask.yml

Example mask.yml

version: 1
db_url: mongodb://mongodb:27017/development
models:
  - name: users
    condition:
      email:
        "$not": !ruby/regexp '/@basicinc\.jp$/'
    fields:
      email: FFaker::Internet.unique.safe_email
  - name: users
    fields:
      reset_password_token: String.new
      confirmation_token: String.new
  - name: sitesconta
    fields:
      title: FFaker::NameJA.name
      description: FFaker::LoremJA.sentence
      domain: FFaker::Internet.domain_name
      external_service: :external_services
  - name: external_services
    fields:
      _type: "'ExternalService'"
      facebook: nil
      google: nil
  - name: contacts
    condition:
      site_id:
        "$ne": BSON::ObjectId('12312345346456456456sdff')
    delete: true

About

Masking production data mongodb for testing/development

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 97.0%
  • Dockerfile 3.0%