docker-misp icon indicating copy to clipboard operation
docker-misp copied to clipboard

dynamically create crontab entries based on cake output for sync servers

Open garrit-schroeder opened this issue 4 years ago • 3 comments

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

garrit-schroeder avatar Mar 03 '21 10:03 garrit-schroeder

What do you think about putting this in its own container?

garrit-schroeder avatar Mar 03 '21 10:03 garrit-schroeder

I'm going to think about this one a bit more. Couple notes:

  1. I don't want to force everyone to sync all their servers, so this needs to be configurable if included
  2. 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.

coolacid avatar Apr 19 '21 14:04 coolacid

  1. 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).

paalbra avatar Nov 09 '21 19:11 paalbra