Island: Move UserCreds from environment -> services/authentication

This commit is contained in:
Mike Salvatore 2021-11-18 13:53:11 -05:00
parent 381ee64cb4
commit 2b6122eeb2
8 changed files with 6 additions and 7 deletions

View File

@ -7,7 +7,6 @@ from common.utils.exceptions import (
InvalidRegistrationCredentialsError,
)
from monkey_island.cc.environment.environment_config import EnvironmentConfig
from monkey_island.cc.environment.user_creds import UserCreds
logger = logging.getLogger(__name__)

View File

@ -1,7 +1,6 @@
import bcrypt
from common.utils.exceptions import IncorrectCredentialsError, UnknownUserError
from monkey_island.cc.environment.user_creds import UserCreds
from monkey_island.cc.server_utils.encryption import (
reset_datastore_encryptor,
unlock_datastore_encryptor,
@ -9,6 +8,7 @@ from monkey_island.cc.server_utils.encryption import (
from monkey_island.cc.setup.mongo.database_initializer import reset_database
from .i_user_datastore import IUserDatastore
from .user_creds import UserCreds
class AuthenticationService:

View File

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

View File

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

View File

@ -8,10 +8,10 @@ from common.utils.exceptions import (
InvalidRegistrationCredentialsError,
UnknownUserError,
)
from monkey_island.cc.environment.user_creds import UserCreds
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 IUserDatastore
from monkey_island.cc.services.authentication.user_creds import UserCreds
USERNAME = "user1"
PASSWORD = "test"

View File

@ -1,4 +1,4 @@
from monkey_island.cc.environment.user_creds import UserCreds
from monkey_island.cc.services.authentication.user_creds import UserCreds
TEST_USER = "Test"
TEST_HASH = "abc1231234"

View File

@ -9,12 +9,12 @@ from common.utils.exceptions import (
InvalidRegistrationCredentialsError,
UnknownUserError,
)
from monkey_island.cc.environment.user_creds import UserCreds
from monkey_island.cc.server_utils.file_utils import is_windows_os
from monkey_island.cc.services.authentication.json_file_user_datastore import (
CREDENTIALS_FILE,
JsonFileUserDatastore,
)
from monkey_island.cc.services.authentication.user_creds import UserCreds
USERNAME = "test"
PASSWORD_HASH = "DEADBEEF"