This is a personal hobby project; based on the observation, sometimes we need a simple enough CLI tool with auditable capability for Data Masking/Encyption/Decryption for CSV/JSON files.
The binary name for M.E.D. is med, it depends on the med_core.
Archives of precompiled binaries for med are available for Windows, macOS and Linux. Users of platforms not explicitly mentioned below are advised to download one of these archives.
bash
dnf install med
```bash $ med --help A simple to use, enterprise ready, rust powered data masking/encryption/decription cli tool
Usage: med
Arguments:
Options:
-t, --type
The configuration file can be any given name of yaml file.
bash
// example of the conf.yaml
mask_symbols: "#####" # mask symbols
fields: # list of the cols/fields you want to mask
- name
- email
- phone
```bash // mask the csv files in folders med mask -f demo/data/csv -c demo/conf/conf_csv.yaml -w 3
// mask the json files in folders med mask -t json -f demo/data/json -c demo/conf/conf_json.yaml -w 3
// encrypt the csv files med encrypt -f demo/data/csv -c demo/conf/confcsv.yaml -w 4 -k YOURSECRET -s des64
// decrypt the json files med decrypt -t json -f output/demo/data/json -c demo/conf/confjson.yaml -w 5 -k YOURSECRET -s des64
```
M.E.D. uses SQLite for the audit capture, mainly ensuring following the Entreprise level Audit base standard, capture, Who, When, Where(which machine), do what, and status, etc.
The metadata and migration are available here.
The audit db location will be different depending on your OS.
| Platform | Value | Example | | ------------- | ------------- | ------------- | | Linux | $HOME/.config/med | /home/bob/.config/med | | MacOS | $HOME/Library/Application Support/med | /Users/Bob/Library/Application Support/med | | Windows | {FOLDERID_RoamingAppData}/med | C:\Users\Bob\AppData\Roaming\med |
We prepare the database migration capabilites and this migrations folder NEED to be in the same directoy of your binary.