cea-sec / openwec

An implementation of a Windows Event Collector server running on GNU/Linux.
GNU General Public License v3.0
47 stars 18 forks source link

Configure options via environment variables #134

Open 3ster opened 4 months ago

3ster commented 4 months ago

We're currently deploying a custom docker image for OpenWEC in a Kubernetes cluster, and would like to switch to the official image.
Since we're dynamically generating secrets, such as the database credentials, supplying the entire openwec.conf.toml file as a single secret would be a bit of a pain. Our current approach is mounting the relevant secrets as environment variables, and then running envsubst on a templated config file on container start.
Being able to completely configure the service via environment variables, i.e., without the openwec.conf.toml file, would simplify our deployment quite a bit.

vruello commented 4 months ago

Hi!

I don't think that it would be a good idea to configure openwec entirely through environment variables. However, I agree that it would be nice to be able to provide parts of the configuration that contain secrets (such as database credentials) using environment variables. I need to think about how to implement this properly.