diff --git a/monkey/monkey_island/cc/repository/__init__.py b/monkey/monkey_island/cc/repository/__init__.py index 232a0b165..075317b43 100644 --- a/monkey/monkey_island/cc/repository/__init__.py +++ b/monkey/monkey_island/cc/repository/__init__.py @@ -17,4 +17,5 @@ from .file_repository_logging_decorator import FileRepositoryLoggingDecorator from .agent_binary_repository import AgentBinaryRepository from .file_agent_configuration_repository import FileAgentConfigurationRepository from .file_simulation_repository import FileSimulationRepository +from .json_file_user_repository import JSONFileUserRepository from .mongo_credentials_repository import MongoCredentialsRepository diff --git a/monkey/monkey_island/cc/services/authentication/json_file_user_datastore.py b/monkey/monkey_island/cc/repository/json_file_user_repository.py similarity index 100% rename from monkey/monkey_island/cc/services/authentication/json_file_user_datastore.py rename to monkey/monkey_island/cc/repository/json_file_user_repository.py diff --git a/monkey/monkey_island/cc/services/__init__.py b/monkey/monkey_island/cc/services/__init__.py index 4adb18eb2..91bea103c 100644 --- a/monkey/monkey_island/cc/services/__init__.py +++ b/monkey/monkey_island/cc/services/__init__.py @@ -1,5 +1,4 @@ from .authentication.authentication_service import AuthenticationService -from .authentication.json_file_user_datastore import JSONFileUserRepository from .aws import AWSService from .island_mode_service import IslandModeService diff --git a/monkey/monkey_island/cc/services/initialize.py b/monkey/monkey_island/cc/services/initialize.py index 9474ea3bd..4f326f58d 100644 --- a/monkey/monkey_island/cc/services/initialize.py +++ b/monkey/monkey_island/cc/services/initialize.py @@ -25,6 +25,7 @@ from monkey_island.cc.repository import ( IFileRepository, ISimulationRepository, IUserRepository, + JSONFileUserRepository, LocalStorageFileRepository, MongoCredentialsRepository, RetrievalError, @@ -41,7 +42,7 @@ from monkey_island.cc.services.telemetry.processing.processing import ( ) from monkey_island.cc.setup.mongo.mongo_setup import MONGO_URL -from . import AuthenticationService, JSONFileUserRepository +from . import AuthenticationService from .reporting.report import ReportService logger = logging.getLogger(__name__) diff --git a/monkey/tests/unit_tests/monkey_island/cc/services/test_json_file_user_datastore.py b/monkey/tests/unit_tests/monkey_island/cc/repository/test_json_file_user_repository.py similarity index 97% rename from monkey/tests/unit_tests/monkey_island/cc/services/test_json_file_user_datastore.py rename to monkey/tests/unit_tests/monkey_island/cc/repository/test_json_file_user_repository.py index 98119d7e5..050788c26 100644 --- a/monkey/tests/unit_tests/monkey_island/cc/services/test_json_file_user_datastore.py +++ b/monkey/tests/unit_tests/monkey_island/cc/repository/test_json_file_user_repository.py @@ -10,11 +10,11 @@ from common.utils.exceptions import ( UnknownUserError, ) from monkey_island.cc.models import UserCredentials -from monkey_island.cc.server_utils.file_utils import is_windows_os -from monkey_island.cc.services.authentication.json_file_user_datastore import ( +from monkey_island.cc.repository.json_file_user_repository import ( CREDENTIALS_FILE, JSONFileUserRepository, ) +from monkey_island.cc.server_utils.file_utils import is_windows_os USERNAME = "test" PASSWORD_HASH = "DEADBEEF"