From e3ae29ccca502ff77c99777b9d2a7fad75ea1e3b Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Tue, 13 Aug 2024 19:05:10 +0530 Subject: [PATCH] Docs: Add server_config.json reference page --- .../content/reference/server-configuration.md | 153 ++++++++++++++---- 1 file changed, 121 insertions(+), 32 deletions(-) diff --git a/docs/content/reference/server-configuration.md b/docs/content/reference/server-configuration.md index f3c02dad899..29319e8c621 100644 --- a/docs/content/reference/server-configuration.md +++ b/docs/content/reference/server-configuration.md @@ -1,52 +1,141 @@ --- title: "Server configuration" -draft: true -pre: ' ' +draft: false +description: "Reference material for the server configuration" +pre: " " --- +{{< table_of_contents >}} -## Configuring the Monkey Island +## Configuration -The Monkey Island Server is configured through the `server_config.json` file. + -{{% notice info %}} -Refer to the [setup guides](../../setup/) to learn how to use -the `server_config.json` file for each deployment. -{{% /notice %}} + +| Property | Type | Required | Nullable | +| :----------------------------------- | :-------- | :------- | :------------- | +| [data\_dir](#data_dir) | `string` | Optional | cannot be null | +| [log\_level](#log_level) | `string` | Optional | cannot be null | +| [mongodb](#mongodb) | Merged | Optional | cannot be null | +| [ssl\_certificate](#ssl_certificate) | Merged | Optional | cannot be null | +| [island\_port](#island_port) | `integer` | Optional | cannot be null | -### Creating a configuration file +### data\_dir + +The directory where the Island will store runtime artifacts. + +`data_dir` + +* is optional + +* Type: `string` + +* cannot be null + +#### data\_dir Constraints + +The value of this string must be a valid path. + +#### data\_dir Default Value + +The default value for Windows is: + +```json +"%AppData%\\monkey_island" +``` + +The default value for Linux is: + +```json +"$HOME/.monkey_island" +``` + +### log\_level + +The threshold for the Island logger. + +`log_level` + +* is optional + +* Type: `string` + +* cannot be null + +#### log\_level Default Value + +The default value is: + +```json +"INFO" +``` + +### mongodb + +The MongoDB configuration for the Island server. + +`mongodb` + +* is optional + + +* Type: merged type ([Details](island_config_options-properties-mongodb.md)) + +* cannot be null + +#### mongodb Default Value + +The default value is: -Here's an example `server_config.json` with all options specified: ```json { - "island_port": 443, - "log_level": "DEBUG", - "ssl_certificate": { - "ssl_certificate_file": "", - "ssl_certificate_key_file": "" - }, - "mongodb": { - "start_mongodb": true - }, - "data_dir": "/monkey_island_data" + "start_mongodb": true } ``` -Only relevant options can be specified, for example: +### ssl\_certificate + +The SSL certificates configuration for the Island server. + +`ssl_certificate` + +* is optional + + +* Type: merged type ([Details](island_config_options-properties-ssl_certificate.md)) + +* cannot be null + +#### ssl\_certificate Default Value + +The default value is: + ```json { - "ssl_certificate": { - "ssl_certificate_file": "", - "ssl_certificate_key_file": "" - } + "ssl_certificate_file": "C:\\Users\\smalviya\\Desktop\\monkey-ecosystem\\infection_monkey\\monkey_island\\cc\\server.crt", + "ssl_certificate_key_file": "C:\\Users\\smalviya\\Desktop\\monkey-ecosystem\\infection_monkey\\monkey_island\\cc\\server.key" } ``` -### Configuration options +### island\_port + +The port on which the Island server should listen. + +`island_port` -See setup instructions for your operating system to understand how to apply these. +* is optional - - `island_port` - Port used by the Island C&C server. Default is `443`. - - `log_level` - can be set to `"DEBUG"`(verbose), `"INFO"`(less verbose) or `"ERROR"`(silent, except errors). - - `ssl_certificate` - contains paths for files, required to run the Island Server with custom certificate. - - `data_dir` - path to a writeable directory where the Island will store the database and other files. - - `mongodb` - options for MongoDB. Should not be changed unless you want to run your own instance of MongoDB. +* Type: `integer` + +* cannot be null + +#### island\_port Default Value + +The default value is: + +```json +443 +```