diff --git a/monkey/monkey_island/cc/environment/__init__.py b/monkey/monkey_island/cc/environment/__init__.py index 1792ea99b..2c43eb9be 100644 --- a/monkey/monkey_island/cc/environment/__init__.py +++ b/monkey/monkey_island/cc/environment/__init__.py @@ -77,9 +77,6 @@ class Environment(object, metaclass=ABCMeta): def testing(self, value): self._testing = value - def save_config(self): - self._config.save_to_file() - def get_config(self) -> EnvironmentConfig: return self._config diff --git a/monkey/monkey_island/cc/environment/environment_singleton.py b/monkey/monkey_island/cc/environment/environment_singleton.py index 82c6b90b0..4c5c6f744 100644 --- a/monkey/monkey_island/cc/environment/environment_singleton.py +++ b/monkey/monkey_island/cc/environment/environment_singleton.py @@ -1,16 +1,13 @@ import logging -import monkey_island.cc.resources.auth.user_store as user_store -from monkey_island.cc.environment import EnvironmentConfig, aws, password, standard +from monkey_island.cc.environment import EnvironmentConfig, aws, password logger = logging.getLogger(__name__) AWS = "aws" -STANDARD = "standard" PASSWORD = "password" ENV_DICT = { - STANDARD: standard.StandardEnvironment, AWS: aws.AwsEnvironment, PASSWORD: password.PasswordEnvironment, } @@ -24,16 +21,6 @@ def set_env(env_type: str, env_config: EnvironmentConfig): env = ENV_DICT[env_type](env_config) -def set_to_standard(): - global env - if env: - env_config = env.get_config() - env_config.server_config = "standard" - set_env("standard", env_config) - env.save_config() - user_store.UserStore.set_users(env.get_auth_users()) - - def initialize_from_file(file_path): try: config = EnvironmentConfig(file_path) diff --git a/monkey/monkey_island/cc/environment/standard.py b/monkey/monkey_island/cc/environment/standard.py deleted file mode 100644 index 3bc823b9b..000000000 --- a/monkey/monkey_island/cc/environment/standard.py +++ /dev/null @@ -1,12 +0,0 @@ -from monkey_island.cc.environment import Environment -from monkey_island.cc.resources.auth.auth_user import User - - -class StandardEnvironment(Environment): - _credentials_required = False - - NO_AUTH_USER = "1234567890!@#$%^&*()_nothing_up_my_sleeve_1234567890!@#$%^&*()" - NO_AUTH_SECRET = "$2b$12$frH7uEwV3jkDNGgReW6j2udw8hy/Yw1SWAqytrcBYK48kn1V5lQIa" - - def get_auth_users(self): - return [User(1, StandardEnvironment.NO_AUTH_USER, StandardEnvironment.NO_AUTH_SECRET)]