Skip to content

rueckstiess/fruitsalad

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fruitsalad

A script to redact text and structed JSON log files from MongoDB.

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: This is still in beta. It is advised to perform a manual check on the output to ensure any sensitive data has been redacted.

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