-
Notifications
You must be signed in to change notification settings - Fork 94
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make every MISP setting customizable by environment variables. #88
base: master
Are you sure you want to change the base?
Make every MISP setting customizable by environment variables. #88
Conversation
the ngix entrypoint iterates over every suitable misp settings variable and parses the relevant arguments.
What problem does this solve? What happens if an admin (not the person maintaining the server/roll out) makes a change in the UI? I assume this will over-write any changes? I think I'd prefer this to be contained in INITIALIZE Env Flag block so it could be used to setup initially, but not force the configs after. The only things we force are things specific to deployment level. Configurations may be done by an application admin, not the deployment person. |
Changes will be overwritten. (If an administrator sets them in the first place. You always have the option to ignore this.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the env vars should start with M_S?
Should it be not better to start with MISP_?
Kind regards
Well there are settings that can be changed by cake starting with MISP already. For example MISP.live=true. That's why I opted with M(isp)S(etting) And then the actual setting name and value. |
In my opinion it is then better to write MISP__ The point is there exists a lot of settings some for modules, some for authentication, some for Redis, mail, etc.... If you have a .env file directly from name it should be clear which application, which location, what exact setting you mentioned here. I like the method of grafana docker environments https://grafana.com/docs/grafana/latest/administration/configuration/#configure-with-environment-variables If you allow I will make some suggestions this weekend. kind regards |
Hi, # iterate over every environment variable starting with "M_S_" and parsing it to key value pair to execute cake setting
for var in $(env | grep MISP_MISP_); do
setting_name="$(echo "$var" | sed "s/^MISP_MISP_//g" | sed "s/=.*$//g")"
setting_value="$(echo "$var" | sed "s/^MISP_MISP_.*=//g")"
$MISP_MISP_CAKE_FILE Admin setSetting "${setting_name}" "${setting_value}"
done But the environment variables should be added in uppercase so is it possible to modify your code that it convert it to the correct end format? |
the ngix entrypoint iterates over every suitable misp settings variable and parses the relevant arguments.
This pull quest allows the user to set every MISP config by environment variables.
Every environment variable set must start with "M_S_" following by the misp setting. The value of the environment variable is the value set in MISP.