@mailprotector/haraka-plugin-secrets-manager
v1.1.0
Published
A Haraka plugin for parsing config files with EJS to inject environment variables into config files on initialize
Downloads
20
Readme
haraka-plugin-secrets-manager
A Haraka plugin for parsing config files with EJS to inject environment variables into config files on initialize
Install
Install with npm
npm install @mailprotector/haraka-plugin-secrets-manager --save
Setup
Enable Plugin
Add to plugin
file in the haraka config folder
@mailprotector/haraka-plugin-secrets-manager
Setup Secrets
When Haraka initializes it loads your passed in config folder and parses each config file using EJS, passing in process.env as the model. This allows us to set configuration files through environment variables on init, instead of keeping configs in plaintext on github. Create an environment variable called CONFIG_PATH and set it to your absolute haraka config folder path.
Example
process.env.CONFIG_PATH = '/etc/haraka/config
process.env.TESTING = 'truth'
your_plugin_config.json
{
"eats_cake": "<%= TESTING %>"
}
will produce:
{
"eats_cake": "truth"
}