-
Notifications
You must be signed in to change notification settings - Fork 793
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
base: develop
Are you sure you want to change the base?
Changes from 2 commits
b910768
e3ae29c
c6baabc
13059e7
f57b218
362638f
bdbc1ff
6f7b757
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,141 @@ | ||
--- | ||
title: "Server configuration" | ||
draft: true | ||
pre: '<i class="fas fa-cogs"></i> ' | ||
draft: false | ||
description: "Reference material for the server configuration" | ||
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 %}} | ||
<!-- TODO --> | ||
| 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` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. It might be worth adding the constraints in the code. |
||
|
||
* cannot be null | ||
|
||
#### log\_level Default Value | ||
|
||
The default value is: | ||
|
||
```json | ||
"INFO" | ||
``` | ||
|
||
### mongodb | ||
|
||
The MongoDB configuration for the Island server. | ||
|
||
`mongodb` | ||
|
||
* is optional | ||
|
||
<!-- TODO --> | ||
* 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": "<PATH_TO_CRT_FILE>", | ||
"ssl_certificate_key_file": "<PATH_TO_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 | ||
|
||
<!-- TODO --> | ||
* 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": "<PATH_TO_CRT_FILE>", | ||
"ssl_certificate_key_file": "<PATH_TO_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 | ||
``` |
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 need to decide how to address these.
They're shown this way because these fields in
IslandConfigOptions
expect another pydantic model as the value, i.e., they have additional properties in the schema.My plan ATM is to declare the type as
object
for these fields and add a "properties" field in the explanation (see c6baabc).