webgme / webgme-engine

WebGME server and Client API without a GUI
MIT License
11 stars 7 forks source link

OverrideFromEnv is adding extra keys to config #244

Closed umesh-timalsina closed 3 years ago

umesh-timalsina commented 3 years ago

I wanted to create a public deployment of webgme where the jwt token keys are being setup from the environment variables.

I named the environment variables WEBGME_PUBLIC_KEY and WEBGME_PRIVATE_KEY, which is great, except its adding the keys to config object and hence validation of configuration fails. I see that this is an intended behaviour, as done in #145. However, it might be nice to check if the parsed/resolved configuration from the environment variable actually yields a valid configuration item.

kecso commented 3 years ago

I believe this is good approach. Otherwise you might ignore a badly formed environment variable and even if we would log that the value was ignored, you might not understand why the server behaves differently (as many only check the direct logs related to a crash...).