From 45a66932637fbaf6f6536c25c6dbb5cbf36a2e9b Mon Sep 17 00:00:00 2001 From: Ilija Lazoroski Date: Fri, 8 Jul 2022 17:34:45 +0200 Subject: [PATCH] Island: Register MongoCredentialsRepository in DI container --- monkey/monkey_island/cc/services/initialize.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/monkey/monkey_island/cc/services/initialize.py b/monkey/monkey_island/cc/services/initialize.py index b5a16ec9f..9642b29de 100644 --- a/monkey/monkey_island/cc/services/initialize.py +++ b/monkey/monkey_island/cc/services/initialize.py @@ -18,9 +18,11 @@ from monkey_island.cc.repository import ( FileSimulationRepository, IAgentBinaryRepository, IAgentConfigurationRepository, + ICredentialsRepository, IFileRepository, ISimulationRepository, LocalStorageFileRepository, + MongoCredentialsRepository, RetrievalError, ) from monkey_island.cc.server_utils.consts import MONKEY_ISLAND_ABS_PATH @@ -73,6 +75,9 @@ def _register_repositories(container: DIContainer, data_dir: Path): IAgentConfigurationRepository, container.resolve(FileAgentConfigurationRepository) ) container.register_instance(ISimulationRepository, container.resolve(FileSimulationRepository)) + container.register_instance( + ICredentialsRepository, container.resolve(MongoCredentialsRepository) + ) def _decorate_file_repository(file_repository: IFileRepository) -> IFileRepository: