From a8410cd132c05e383b5f1744c9a70783953da1e1 Mon Sep 17 00:00:00 2001 From: Liviu Valsan Date: Tue, 19 Mar 2019 09:18:35 +0100 Subject: [PATCH 1/6] CakeReque version is now a parameter --- README.md | 1 + manifests/init.pp | 1 + manifests/install.pp | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8541fde..75f175c 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,7 @@ the installation of MISP itself, for the database, for the configuration and for * `stix_git_tag`- Version of the STIX module. By default "v1.1.1.4". * `cybox_git_repo`- Git url of the CyBox repository. By default "https://github.com/CybOXProject/python-cybox.git". * `cybox_git_tag`- Version of the CyBox module. By default "v2.1.0.12". +* `cake_resque_version`- Version of Cake Resque. By default "4.1.2". * `timezone`- Timezone where the instance has been placed. By default "UTC". * `default_user`- User as which to run the installation of MISP. By default apache. * `default_group`- Group as which to run the installation of MISP. By default apache. diff --git a/manifests/init.pp b/manifests/init.pp index ff4946e..e1060c1 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -20,6 +20,7 @@ $maec_git_tag = 'v4.1.0.14', $pydeep_git_repo = 'https://github.com/kbandla/pydeep.git', $pydeep_git_tag = 'e4ce348566293475016ca7fa9fb7fc4f61f1997f', # Using SHA from latest commit in 0.2 tag, because there is also a 0.2 branch + $cake_resque_version = '4.1.2', # Whether to manage Python or not. Please note that python dev needs to be # present in order to be able to install some of the MISP dependencies $manage_python = true, diff --git a/manifests/install.pp b/manifests/install.pp index e13930d..4c3f00c 100644 --- a/manifests/install.pp +++ b/manifests/install.pp @@ -119,7 +119,7 @@ } exec {'CakeResque kamisama': - command => '/usr/bin/php composer.phar require kamisama/cake-resque:4.1.2', + command => "/usr/bin/php composer.phar require kamisama/cake-resque:${misp::cake_resque_version}", cwd => "${misp::install_dir}/app/", environment => ["COMPOSER_HOME=${misp::install_dir}/app/"], refreshonly => true, From 163a2ae2e4bea111e19d6687d59364425b2d7746 Mon Sep 17 00:00:00 2001 From: Liviu Valsan Date: Tue, 19 Mar 2019 09:19:42 +0100 Subject: [PATCH 2/6] Changed default event threat level and added config option for default event tag collection --- README.md | 3 ++- manifests/init.pp | 3 ++- templates/config.php.erb | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 75f175c..d9f470a 100644 --- a/README.md +++ b/README.md @@ -265,7 +265,8 @@ By defualt set to false. community only, 2 means contacted communities and 3 is all communities. By default set to 1. * `default_attribute_distribution` - The default distribution setting for attributes, set it to 'event' if you would like the attributes to default to the event distribution level. (0-3 or "event"). By default set to 'event'. -* `default_event_threat_level` - The default threat level setting when creating events. By default set to 1. +* `default_event_threat_level` - The default threat level setting when creating events. By default set to 4 (undefined). +* `default_event_tag_collection` - The tag collection to be applied to all events created manually. * `tagging` - Enable the tagging feature of MISP. By default set to true. * `full_tags_on_event_index` - Show the full tag names on the event index. By default set to true. * `welcome_text_top` - Used on the login page, before the MISP logo. Empty by default. diff --git a/manifests/init.pp b/manifests/init.pp index e1060c1..e69866f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -94,7 +94,8 @@ $extended_alert_subject = true, $default_event_distribution = '1', $default_attribute_distribution = 'event', - $default_event_threat_level = '1', + $default_event_threat_level = '4', + $default_event_tag_collection = 0, $tagging = true, $full_tags_on_event_index = true, $welcome_text_top = '', diff --git a/templates/config.php.erb b/templates/config.php.erb index 6456af8..f6886a2 100644 --- a/templates/config.php.erb +++ b/templates/config.php.erb @@ -53,6 +53,7 @@ $config = array ( 'default_event_distribution' => '<%= @default_event_distribution -%>', 'default_attribute_distribution' => '<%= @default_attribute_distribution -%>', 'default_event_threat_level' => '<%= @default_event_threat_level -%>', + 'default_event_tag_collection' => <%= @default_event_tag_collection -%>, 'tagging' => <%= @tagging -%>, 'full_tags_on_event_index' => <%= @full_tags_on_event_index -%>, 'welcome_text_top' => '<%= @welcome_text_top -%>', From 201a965bf9a739a2a270e0215605b3e54721fa30 Mon Sep 17 00:00:00 2001 From: Liviu Valsan Date: Tue, 19 Mar 2019 09:21:00 +0100 Subject: [PATCH 3/6] Bug fix: Elasticsearch connection string and index name need to be string escaped --- templates/config.php.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/config.php.erb b/templates/config.php.erb index f6886a2..c522d59 100644 --- a/templates/config.php.erb +++ b/templates/config.php.erb @@ -166,8 +166,8 @@ $config = array ( 'ZeroMQ_tag_notifications_enable' => <%= @zeromq_tag_notifications_enable -%>, 'ZeroMQ_audit_notifications_enable' => <%= @zeromq_audit_notifications_enable -%>, 'ElasticSearch_logging_enable' => <%= @elasticsearch_logging_enable -%>, - 'ElasticSearch_connection_string' => <%= @elasticsearch_connection_string -%>, - 'ElasticSearch_log_index' => <%= @elasticsearch_log_index -%>, + 'ElasticSearch_connection_string' => '<%= @elasticsearch_connection_string -%>', + 'ElasticSearch_log_index' => '<%= @elasticsearch_log_index -%>', 'syslog' => <%= @syslog -%>, 'Sightings_enable' => <%= @sightings_enable -%>, 'Sightings_policy' => <%= @sightings_policy -%>, From 0a308a4c1b1db55222f40a267f80bcd6f8cca098 Mon Sep 17 00:00:00 2001 From: Liviu Valsan Date: Tue, 19 Mar 2019 09:23:54 +0100 Subject: [PATCH 4/6] Changed default value for session auto regenerate to match MISP default and removed un-necessary quoting of config options --- manifests/init.pp | 2 +- templates/config.php.erb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/manifests/init.pp b/manifests/init.pp index e69866f..dcd3401 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -160,7 +160,7 @@ $secure_auth_amount = 5, $secure_auth_expire = 300, # # Session - $session_auto_regenerate = true, + $session_auto_regenerate = false, $session_check_agent = false, $session_defaults = 'php', $session_timeout = '60', diff --git a/templates/config.php.erb b/templates/config.php.erb index c522d59..2ea441f 100644 --- a/templates/config.php.erb +++ b/templates/config.php.erb @@ -133,10 +133,10 @@ $config = array ( 'Session' => array ( 'autoRegenerate' => <%= @session_auto_regenerate -%>, - 'checkAgent' => '<%= @session_check_agent -%>', + 'checkAgent' => <%= @session_check_agent -%>, 'defaults' => '<%= @session_defaults -%>', 'timeout' => '<%= @session_timeout -%>', - 'cookie_timeout' => '<%= @session_cookie_timeout -%>' + 'cookie_timeout' => <%= @session_cookie_timeout -%> ), 'Plugin' => array ( From 571b39388fe6859fc46e707798158db5c514a4cf Mon Sep 17 00:00:00 2001 From: Liviu Valsan Date: Tue, 19 Mar 2019 09:27:42 +0100 Subject: [PATCH 5/6] Changed the default MISP version installed to version 2.4.102 and added extra dependency introduced in MISP version 2.4.102 --- manifests/dependencies.pp | 1 + manifests/init.pp | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/dependencies.pp b/manifests/dependencies.pp index 91196f9..7048208 100644 --- a/manifests/dependencies.pp +++ b/manifests/dependencies.pp @@ -12,6 +12,7 @@ 'haveged', 'sclo-php56-php-pecl-redis', # Redis connection from PHP 'php-pear-crypt-gpg', # Crypto GPG + 'php-pear-Console-CommandLine', 'python-magic', # Advance attachment handler 'ssdeep', 'ssdeep-libs', 'ssdeep-devel', #For pydeep ].each |String $pkg| { diff --git a/manifests/init.pp b/manifests/init.pp index dcd3401..1be3ed2 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -9,7 +9,7 @@ # MISP installation # # MISP repositories $misp_git_repo = 'https://github.com/MISP/MISP.git', - $misp_git_tag = 'v2.4.71', + $misp_git_tag = 'v2.4.102', $stix_git_repo = 'https://github.com/STIXProject/python-stix.git', $stix_git_tag = 'v1.2.0.6', $cybox_git_repo = 'https://github.com/CybOXProject/python-cybox.git', From 48024f3247c2ce48274ae482216cb4b314c5ceb3 Mon Sep 17 00:00:00 2001 From: Liviu Valsan Date: Wed, 20 Mar 2019 14:57:03 +0100 Subject: [PATCH 6/6] Added configuration option for the path to the python binary --- README.md | 1 + manifests/init.pp | 1 + templates/config.php.erb | 1 + 3 files changed, 3 insertions(+) diff --git a/README.md b/README.md index d9f470a..7e525b3 100644 --- a/README.md +++ b/README.md @@ -231,6 +231,7 @@ By default set to "Rooraenietu8Eeyo <%= @live -%>, 'language' => '<%= @language -%>', 'enable_advanced_correlations' => <%= @enable_advanced_correlations -%>, +<% unless @python_bin.nil? -%> 'python_bin' => '<%= @python_bin -%>',<%= "\n" %><% end -%> 'ssdeep_correlation_threshold' => <%= @ssdeep_correlation_threshold -%>, 'max_correlations_per_event' => <%= @max_correlations_per_event -%>, 'maintenance_message' => '<%= @maintenance_message -%>',