This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
tango-maat/docs/tools.md

32 lines
992 B
Markdown
Raw Normal View History

# Tools
2023-07-05 10:16:32 +08:00
## maat_redis_tool
1. Dump the configuration in redis to a local IRIS format file.
2023-07-05 10:16:32 +08:00
2. Write the configuration in JSON format to redis. Note: Group multiplexing is not supported in this mode.
2023-07-05 10:16:32 +08:00
For specific usage, run ./maat_redis_tool -h
2023-07-05 10:16:32 +08:00
## compress JSON configuration using gzip command
```shell
2023-07-05 10:16:32 +08:00
$ gzip -9 < maat_json.json > maat_json.json.gz
```
2023-07-05 10:16:32 +08:00
maat_options_set_json_file_gzip_flag can indicate whether maat instance needs to decompress the json configuration before loading it. This API can be used in conjunction with the encryption command below, compressed first and then encrypted.
2023-07-05 10:16:32 +08:00
## using openssl enc to encrypt/decrypt configuration
2023-07-05 10:16:32 +08:00
maat_options_set_json_file_decrypt_key can specify the decryption key for the JSON file to be decrypted.
2023-07-05 10:16:32 +08:00
encrypt
```shell
2023-07-05 10:16:32 +08:00
$ openssl enc -e -aes-128-cbc -k 123456 -p -nosalt -in inputfile.txt -out encryptfile.txt
```
2023-07-05 10:16:32 +08:00
decrypt
2023-07-05 10:16:32 +08:00
```shell
$ openssl enc -d -aes-128-cbc -k 123456 -p -nosalt -in encryptfile.txt -out tmp.txt
```