@mailprotector/haraka-plugin-secrets-manager

1.1.0 • Public • Published

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"
}

alt text About Mailprotector

Package Sidebar

Install

npm i @mailprotector/haraka-plugin-secrets-manager

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

6.57 kB

Total Files

14

Last publish

Collaborators

  • djatmp
  • andy.mailprotector
  • danwagoner
  • ben.hathaway