Island: Move IUserRepository to repository/ package

This commit is contained in:
Mike Salvatore 2022-07-12 08:14:41 -04:00
parent 7c98ca0004
commit 292887baf8
6 changed files with 6 additions and 5 deletions

View File

@ -6,6 +6,7 @@ from .i_agent_binary_repository import IAgentBinaryRepository
from .i_agent_configuration_repository import IAgentConfigurationRepository
from .i_simulation_repository import ISimulationRepository
from .i_credentials_repository import ICredentialsRepository
from .i_user_repository import IUserRepository
from .local_storage_file_repository import LocalStorageFileRepository

View File

@ -1,6 +1,6 @@
import abc
from .user_creds import UserCreds
from monkey_island.cc.services.authentication.user_creds import UserCreds
class IUserRepository(metaclass=abc.ABCMeta):

View File

@ -7,13 +7,13 @@ from common.utils.exceptions import (
InvalidRegistrationCredentialsError,
UnknownUserError,
)
from monkey_island.cc.repository import IUserRepository
from monkey_island.cc.server_utils.encryption import (
reset_datastore_encryptor,
unlock_datastore_encryptor,
)
from monkey_island.cc.setup.mongo.database_initializer import reset_database
from .i_user_datastore import IUserRepository
from .user_creds import UserCreds

View File

@ -6,9 +6,9 @@ from common.utils.exceptions import (
InvalidRegistrationCredentialsError,
UnknownUserError,
)
from monkey_island.cc.repository import IUserRepository
from monkey_island.cc.server_utils.file_utils import open_new_securely_permissioned_file
from .i_user_datastore import IUserRepository
from .user_creds import UserCreds
CREDENTIALS_FILE = "credentials.json"

View File

@ -24,6 +24,7 @@ from monkey_island.cc.repository import (
ICredentialsRepository,
IFileRepository,
ISimulationRepository,
IUserRepository,
LocalStorageFileRepository,
MongoCredentialsRepository,
RetrievalError,
@ -41,7 +42,6 @@ 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 .authentication.i_user_datastore import IUserRepository
from .reporting.report import ReportService
logger = logging.getLogger(__name__)

View File

@ -8,9 +8,9 @@ from common.utils.exceptions import (
InvalidRegistrationCredentialsError,
UnknownUserError,
)
from monkey_island.cc.repository import IUserRepository
from monkey_island.cc.services import AuthenticationService
from monkey_island.cc.services.authentication import authentication_service
from monkey_island.cc.services.authentication.i_user_datastore import IUserRepository
from monkey_island.cc.services.authentication.user_creds import UserCreds
USERNAME = "user1"