From a3bdda20515d3e2048ee788fa057fd5e5e968b31 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Thu, 18 Nov 2021 08:48:07 -0500 Subject: [PATCH] Island: Move AuthenticationService to authentication directory --- monkey/monkey_island/cc/resources/auth/auth.py | 2 +- monkey/monkey_island/cc/resources/auth/registration.py | 2 +- monkey/monkey_island/cc/services/__init__.py | 1 + monkey/monkey_island/cc/services/authentication/__init__.py | 0 .../authentication_service.py} | 0 monkey/monkey_island/cc/services/initialize.py | 3 ++- 6 files changed, 5 insertions(+), 3 deletions(-) create mode 100644 monkey/monkey_island/cc/services/authentication/__init__.py rename monkey/monkey_island/cc/services/{authentication.py => authentication/authentication_service.py} (100%) diff --git a/monkey/monkey_island/cc/resources/auth/auth.py b/monkey/monkey_island/cc/resources/auth/auth.py index 7baac22c9..f5b73e062 100644 --- a/monkey/monkey_island/cc/resources/auth/auth.py +++ b/monkey/monkey_island/cc/resources/auth/auth.py @@ -9,7 +9,7 @@ from jwt import PyJWTError from common.utils.exceptions import IncorrectCredentialsError from monkey_island.cc.resources.auth.credential_utils import get_username_password_from_request -from monkey_island.cc.services.authentication import AuthenticationService +from monkey_island.cc.services import AuthenticationService logger = logging.getLogger(__name__) diff --git a/monkey/monkey_island/cc/resources/auth/registration.py b/monkey/monkey_island/cc/resources/auth/registration.py index fd9532456..bc9f3086f 100644 --- a/monkey/monkey_island/cc/resources/auth/registration.py +++ b/monkey/monkey_island/cc/resources/auth/registration.py @@ -5,7 +5,7 @@ from flask import make_response, request from common.utils.exceptions import InvalidRegistrationCredentialsError, RegistrationNotNeededError from monkey_island.cc.resources.auth.credential_utils import get_username_password_from_request -from monkey_island.cc.services.authentication import AuthenticationService +from monkey_island.cc.services import AuthenticationService logger = logging.getLogger(__name__) diff --git a/monkey/monkey_island/cc/services/__init__.py b/monkey/monkey_island/cc/services/__init__.py index e69de29bb..83cbf3492 100644 --- a/monkey/monkey_island/cc/services/__init__.py +++ b/monkey/monkey_island/cc/services/__init__.py @@ -0,0 +1 @@ +from .authentication.authentication_service import AuthenticationService diff --git a/monkey/monkey_island/cc/services/authentication/__init__.py b/monkey/monkey_island/cc/services/authentication/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/monkey/monkey_island/cc/services/authentication.py b/monkey/monkey_island/cc/services/authentication/authentication_service.py similarity index 100% rename from monkey/monkey_island/cc/services/authentication.py rename to monkey/monkey_island/cc/services/authentication/authentication_service.py diff --git a/monkey/monkey_island/cc/services/initialize.py b/monkey/monkey_island/cc/services/initialize.py index caa599e00..a03767fee 100644 --- a/monkey/monkey_island/cc/services/initialize.py +++ b/monkey/monkey_island/cc/services/initialize.py @@ -1,7 +1,8 @@ -from monkey_island.cc.services.authentication import AuthenticationService from monkey_island.cc.services.post_breach_files import PostBreachFilesService from monkey_island.cc.services.run_local_monkey import LocalMonkeyRunService +from . import AuthenticationService + def initialize_services(data_dir): PostBreachFilesService.initialize(data_dir)