docker-misp
docker-misp copied to clipboard
dynamically create crontab entries based on cake output for sync servers
Hello @coolacid,
I have created this pull request to to allow the crontabs for MISP to be generated automatically based on configured Sync Servers in MISP.
added dependencies:
curl
This is needed because the crontab entrypoint needs to wait for nginx to startup. Otherwise the command cake Server listServers
will fail. The MySQL Database is not ready at an earlier stage.
Is there a scenario where nginx will only listen on port 80? Then this will not work.
jq
This is needed for parsing the JSON output of the command cake Server listServers
Allows the removal of the environment variable: SYNCSERVERS
One thing to point out is that adding / removing sync servers from MISP requires a restart of the container. (It actually does in this version and in the one before as well. So not really a change. )
Also fixes: https://github.com/coolacid/docker-misp/issues/99
What do you think about putting this in its own container?
I'm going to think about this one a bit more. Couple notes:
- I don't want to force everyone to sync all their servers, so this needs to be configurable if included
- Adding Curl/jq adds more size that may/may not be warranted. Maybe a PHP script since we already have PHP might be better?
I think the entire cron thing needs to be looked at - so we're not forcing people into doing things they may want to change. Like, if there's a volume mounted cron file, don't make a new one, etc.
- I don't want to force everyone to sync all their servers, so this needs to be configurable if included
:+1:
I would not like to sync all servers. I actually don't use SYNCSERVERS
now since I want even more control (so I'm adding my own cron file after container creation).