-
Notifications
You must be signed in to change notification settings - Fork 788
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add server_config.json reference page #4274
Open
shreyamalviya
wants to merge
8
commits into
develop
Choose a base branch
from
4216-docs-server-config-reference
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
b910768
Island: Update IslandConfigOptions' fields with descriptions
shreyamalviya e3ae29c
Docs: Add server_config.json reference page
shreyamalviya c6baabc
Docs: Update server_config.json reference page
shreyamalviya 13059e7
Docs: Fix formatting in server_config.json reference page
shreyamalviya f57b218
Island: Update IslandConfigOptions.log_level description
shreyamalviya 362638f
Docs: Update 'log_level' description in server_config.json reference …
shreyamalviya bdbc1ff
Docs: Remove repeated default value inserver_config.json reference page
shreyamalviya 6f7b757
Docs: Add example in server_config.json reference page
shreyamalviya File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,202 @@ | ||
--- | ||
title: "Server configuration" | ||
draft: true | ||
pre: '<i class="fas fa-cogs"></i> ' | ||
draft: false | ||
description: "Reference material for the server_config.json file" | ||
pre: "<i class='fa fa-cogs'></i> " | ||
--- | ||
{{< table_of_contents >}} | ||
|
||
## Configuring the Monkey Island | ||
## Configuration | ||
|
||
The Monkey Island Server is configured through the `server_config.json` file. | ||
<!-- | ||
This documentation was autogenerated by passing the plugin's config-schema.json | ||
through https://github.com/adobe/jsonschema2md. It was then modified by hand to | ||
remove extraneous information. | ||
--> | ||
|
||
{{% 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) | `object` | Optional | cannot be null | | ||
| [ssl\_certificate](#ssl_certificate) | `object` | 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: | ||
|
||
Here's an example `server_config.json` with all options specified: | ||
```json | ||
{ | ||
"island_port": 443, | ||
"log_level": "DEBUG", | ||
"ssl_certificate": { | ||
"ssl_certificate_file": "<PATH_TO_CRT_FILE>", | ||
"ssl_certificate_key_file": "<PATH_TO_KEY_FILE>" | ||
}, | ||
"mongodb": { | ||
"start_mongodb": true | ||
}, | ||
"data_dir": "/monkey_island_data" | ||
} | ||
"%AppData%\\monkey_island" | ||
``` | ||
|
||
Only relevant options can be specified, for example: | ||
The default value for Linux is: | ||
|
||
```json | ||
{ | ||
"ssl_certificate": { | ||
"ssl_certificate_file": "<PATH_TO_CRT_FILE>", | ||
"ssl_certificate_key_file": "<PATH_TO_KEY_FILE>" | ||
} | ||
} | ||
"$HOME/.monkey_island" | ||
``` | ||
|
||
### log\_level | ||
|
||
The log level for the Island's 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: `object` | ||
|
||
* cannot be null | ||
|
||
#### start\_mongodb | ||
|
||
If enabled, the MongoDB server will be started automatically with the Island. | ||
|
||
`start_mongodb` | ||
|
||
* is optional | ||
|
||
* Type: `boolean` | ||
|
||
* cannot be null | ||
|
||
**start\_mongodb Default Value** | ||
|
||
The default value is: | ||
|
||
```json | ||
true | ||
``` | ||
|
||
### ssl\_certificate | ||
|
||
The SSL certificates configuration for the Island server. | ||
|
||
`ssl_certificate` | ||
|
||
* is optional | ||
|
||
* Type: `object` | ||
|
||
* cannot be null | ||
|
||
#### ssl\_certificate\_file | ||
|
||
The path to the SSL certificate file that the Island server will use. | ||
|
||
`ssl_certificate_file` | ||
|
||
* is optional | ||
|
||
* Type: `string` | ||
|
||
* cannot be null | ||
|
||
**ssl\_certificate\_file Constraints** | ||
|
||
The value of this string must be a valid path. | ||
|
||
**ssl\_certificate\_file Default Value** | ||
|
||
The default value is: | ||
|
||
```json | ||
"<infection_monkey_installation_path>\\monkey_island\\cc\\server.crt" | ||
``` | ||
|
||
#### ssl\_certificate\_key\_file | ||
|
||
The path to the SSL certificate key file that the Island server will use. | ||
|
||
`ssl_certificate_key_file` | ||
|
||
* is optional | ||
|
||
* Type: `string` | ||
|
||
* cannot be null | ||
|
||
**ssl\_certificate\_key\_file Constraints** | ||
|
||
The value of this string must be a valid path. | ||
|
||
**ssl\_certificate\_key\_file Default Value** | ||
|
||
The default value is: | ||
|
||
```json | ||
"<infection_monkey_installation_path>\\monkey_island\\cc\\server.key" | ||
``` | ||
|
||
### Configuration options | ||
### island\_port | ||
|
||
The port on which the Island server should listen. | ||
|
||
`island_port` | ||
|
||
* is optional | ||
|
||
See setup instructions for your operating system to understand how to apply these. | ||
* Type: `integer` | ||
|
||
- `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. | ||
* cannot be null | ||
|
||
#### island\_port Default Value | ||
|
||
The default value is: | ||
|
||
```json | ||
443 | ||
``` | ||
|
||
### `server_config.json` example | ||
|
||
``` | ||
{ | ||
"data_dir": "/home/user/.monkey_island", | ||
"log_level": "INFO", | ||
"mongodb": { | ||
"start_mongodb": true | ||
}, | ||
"ssl_certificate": { | ||
"ssl_certificate_file": "/home/user/infection_monkey_installation/monkey_island/cc/server.crt", | ||
"ssl_certificate_key_file": "/home/user/infection_monkey_installation/monkey_island/cc/server.crt", | ||
}, | ||
"island_port": 443 | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we list the acceptable values?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have any constraints on the value in the code. It doesn't make sense to add it ourselves in the reference documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It might be worth adding the constraints in the code.