Skip to content

Commit

Permalink
added new parameters for config. updated doc. added support for redis…
Browse files Browse the repository at this point in the history
… as caching method
  • Loading branch information
ppanero committed Jun 15, 2017
1 parent 5d0eadd commit 2362b6d
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 12 deletions.
10 changes: 10 additions & 0 deletions README.md
Expand Up @@ -134,6 +134,7 @@ the installation of MISP itself, for the database, for the configuration and for
those cases. By default root.
* `default_high_group`- In some cases root permissions are need in the installation, this group will be used in
those cases. By default apache.
* `uuid` - The MISP instance UUID. This UUID is used to identify this instance. By default set to 0.

### Database configuration

Expand Down Expand Up @@ -189,6 +190,11 @@ This module does not install the MariaDB server. However, if that was needed it

Note that it requires the edestecd-mariadb module.

#### Redis
* `redis_host` - The host running the redis server to be used for generic MISP tasks such as caching. This is not to be confused by the redis server used by the background processing.. By default set to localhost ('127.0.01').
* `redis_port` - The port used by the redis server to be used for generic MISP tasks such as caching. This is not to be confused by the redis server used by the background processing.. By default set to 6379.
* `redis_database` - The database on the redis server to be used for generic MISP tasks. If you run more than one MISP instance, please make sure to use a different database on each instance.. By default set to 13.

### MISP configuration

#### Site Configuration
Expand Down Expand Up @@ -406,6 +412,10 @@ By default set to true.
* `import_services_url` - The url used to access the import services. By default set to 'http://127.0.0.1'.
* `import_services_port` - The port used to access the import services. By default set to 6666.
* `import_timeout` - Set a timeout for the import services. By default set to 10.
* `cortex_services_enable` - Enable/disable the import services. By default set to false.
* `cortex_services_url` - The url used to access Cortex. By default, it is accessible at http://cortex-url/api.
* `cortex_services_port` - The port used to access Cortex. By default, this is port 9000.
* `cortex_timeout` - Set a timeout for the import services. By default set to 120.

#### ApacheShibbAuth
* `shib_default_org` - Default organisation for user creation when using Shibboleth authentication plugin. By default set to 1.
Expand Down
9 changes: 9 additions & 0 deletions manifests/init.pp
Expand Up @@ -22,6 +22,10 @@
$db_host = 'localhost',
$db_port = '3306',
$db_password = '',
# # Redis DB
$redis_host = '127.0.01',
$redis_port = 6379,
$redis_database = 13,
# # config.php
$debug = 0,
$site_admin_debug = false,
Expand All @@ -42,6 +46,7 @@
$password_policy_complexity = '/((?=.*\\d)|(?=.*\\W+))(?![\\n])(?=.*[A-Z])(?=.*[a-z]).*$/',
$sanitise_attribute_on_delete = false,
# # MISP parameters
$uuid = 0,
$live = true,
$enable_advanced_correlations = false,
$maintenance_message = 'Great things are happening! MISP is undergoing maintenance, but will return shortly. You can contact the administration at \\$email.',
Expand Down Expand Up @@ -176,6 +181,10 @@
$export_services_port = 6666,
$export_services_enable = true,
$export_timeout = 10,
$cortex_services_enable = false,
$cortex_services_url = 'http://127.0.0.1/api',
$cortex_services_port = 9000,
$cortex_timeout = 120,
# ApacheShibbAuth
$shib_default_org = '1',
$egroup_role_match = {},
Expand Down
23 changes: 11 additions & 12 deletions templates/bootstrap.php.erb
Expand Up @@ -71,18 +71,17 @@
*
* Redis (http://http://redis.io/)
*
* Cache::config('default', array(
* 'engine' => 'Redis', //[required]
* 'duration'=> 3600, //[optional]
* 'probability'=> 100, //[optional]
* 'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
* 'server' => '127.0.0.1' // localhost
* 'port' => 6379 // default port 6379
* 'timeout' => 0 // timeout in seconds, 0 = unlimited
* 'persistent' => true, // [optional] set this to false for non-persistent connections
* ));
*/
Cache::config('default', array('engine' => 'File'));
Cache::config('default', array(
'engine' => 'Redis', //[required]
'duration'=> 3600, //[optional]
'probability'=> 100, //[optional]
'prefix' => Inflector::slug(APP_DIR) . '_', //[optional] prefix every cache file with this string
'server' => '<%= @redis_host -%>' // localhost
'port' => <%= @redis_port -%> // default port 6379
'timeout' => <%= @redis_timeout -%> // timeout in seconds, 0 = unlimited
'persistent' => true, // [optional] set this to false for non-persistent connections
));
//Cache::config('default', array('engine' => 'File'));
Configure::load('config');

$appendPort = true;
Expand Down
8 changes: 8 additions & 0 deletions templates/config.php.erb
Expand Up @@ -18,6 +18,7 @@ $config = array (
),
'MISP' =>
array (
'uuid' => '<%= @uuid -%>',
'baseurl' => 'https://<%= @fqdn -%>',
'live' => <%= @live -%>,
'enable_advanced_correlations' => <%= @enable_advanced_correlations -%>,
Expand Down Expand Up @@ -81,6 +82,9 @@ $config = array (
'incoming_tags_disabled_by_default' => <%= @incoming_tags_disabled_by_default -%>,
'completely_disable_correlation' => <%= @completely_disable_correlation -%>,
'allow_disabling_correlation' => <%= @allow_disabling_correlation -%>,
'redis_host' => '<%= @redis_host -%>',
'redis_port' => <%= @redis_port -%>,
'redis_database' => <%= @redis_database -%>,
),
'GnuPG' =>
array (
Expand Down Expand Up @@ -165,6 +169,10 @@ $config = array (
'Export_timeout' => <%= @export_timeout -%>,
'Export_services_url' => '<%= @export_services_url -%>',
'Export_services_port' => <%= @export_services_port -%>,
'Cortex_services_enable' => <%= @cortex_services_enable -%>,
'Cortex_services_url' => '<%= @cortex_services_url -%>',
'Cortex_services_port' => <%= @cortex_services_port -%>,
'Cortex_timeout' => <%= @cortex_timeout -%>,
),
// Uncomment the following to enable client SSL certificate authentication
/*
Expand Down

0 comments on commit 2362b6d

Please sign in to comment.