diff --git a/monkey/monkey_island/cc/setup/island_config_options.py b/monkey/monkey_island/cc/setup/island_config_options.py index 18f503e21bd..2127a035a68 100644 --- a/monkey/monkey_island/cc/setup/island_config_options.py +++ b/monkey/monkey_island/cc/setup/island_config_options.py @@ -19,22 +19,52 @@ class MongoDBConfig(InfectionMonkeyBaseModel): - start_mongodb: bool = DEFAULT_START_MONGO_DB + start_mongodb: bool = Field( + default=DEFAULT_START_MONGO_DB, + description="If enabled, the MongoDB server will be started automatically with the Island.", + ) # TODO: rename redundant ssl_certificate_file and split the classes into idividual files class SSLCertificatesConfig(InfectionMonkeyBaseModel): ssl_certificate_file: Annotated[ - Path, Field(default=Path(DEFAULT_CRT_PATH)), BeforeValidator(expand_path) + Path, + Field( + default=Path(DEFAULT_CRT_PATH), + description="The path to the SSL certificate file that the Island server will use.", + ), + BeforeValidator(expand_path), ] ssl_certificate_key_file: Annotated[ - Path, Field(default=Path(DEFAULT_KEY_PATH)), BeforeValidator(expand_path) + Path, + Field( + default=Path(DEFAULT_KEY_PATH), + description="The path to the SSL certificate key file that the Island server will use.", + ), + BeforeValidator(expand_path), ] class IslandConfigOptions(InfectionMonkeyBaseModel): - data_dir: Annotated[Path, Field(default=DEFAULT_DATA_DIR), BeforeValidator(expand_path)] - log_level: str = DEFAULT_LOG_LEVEL - mongodb: MongoDBConfig = MongoDBConfig() - ssl_certificate: SSLCertificatesConfig = SSLCertificatesConfig() - island_port: int = DEFAULT_ISLAND_PORT + data_dir: Annotated[ + Path, + Field( + default=DEFAULT_DATA_DIR, + description="The directory where the Island will store runtime artifacts.", + ), + BeforeValidator(expand_path), + ] + log_level: str = Field( + default=DEFAULT_LOG_LEVEL, description="The threshold for the Island logger." + ) + mongodb: MongoDBConfig = Field( + default=MongoDBConfig(), description="The MongoDB configuration for the Island server." + ) + ssl_certificate: SSLCertificatesConfig = Field( + default=SSLCertificatesConfig(), + description="The SSL certificates configuration for the Island server.", + ) + island_port: int = Field( + default=DEFAULT_ISLAND_PORT, + description="The port on which the Island server should listen.", + )