Skip to content

esedor/fruitsalad

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fruitsalad

A script to redact MongoDB log files.

This script reads a MongoDB log file and outputs a redacted version of the log file, replacing IP addresses, namespaces and query/update data. Namespace details are replaced with generic adjectives, colours and fruit names (hence the name "fruitsalad"). IP addresses are mapped to a private range starting with 192.168.. The query values are hashed with a standard MD5 algorithm, so that the distribution of data remains unchanged, while the actual data will be lost. Note: The field names of the queries are currently left unchanged.

This is a very early beta version.

Usage

python fruitsalad.py <logfile>

to output the scrambled version to stdout, or redirect the output to a file by adding > redacted.log to the end of the command.

Tests

fruitsalad uses nose for testing. Please follow the instructions in the nose documentation page for the recommended method to install nose. After nose is installed, testing could be done by running:

nosetests -v

in fruitsalad's root directory. The -v is optional, and is only used to display a more verbose testing messages.

DISCLAMER

This software is not supported by MongoDB, Inc. under any of their commercial support subscriptions or otherwise. Any usage of fruitsalad is at your own risk. Bug reports, feature requests and questions can be posted in the Issues section here on github.

About

A script to redact MongoDB log files

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%