From 62056175a18c1045fc12d15baf79a718b76986ad Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 17 Jun 2022 11:05:55 -0400 Subject: [PATCH] Island: Remove unneeded methods in IConfigRepository Also remove stale comments. No encryption is needed here because configuration does not contain anything sensitive. --- .../cc/repository/i_config_repository.py | 21 ------------------- 1 file changed, 21 deletions(-) diff --git a/monkey/monkey_island/cc/repository/i_config_repository.py b/monkey/monkey_island/cc/repository/i_config_repository.py index c9967ad45..ce6935b87 100644 --- a/monkey/monkey_island/cc/repository/i_config_repository.py +++ b/monkey/monkey_island/cc/repository/i_config_repository.py @@ -1,32 +1,11 @@ from abc import ABC -from typing import Any, Sequence from common.configuration import AgentConfiguration class IConfigRepository(ABC): - - # Config - ############################################### - - # This returns the current config - # TODO investigate if encryption should be here or where - # TODO potentially should be a DTO as well, but it's structure is defined in schema already def get_config(self) -> AgentConfiguration: pass def set_config(self, config: AgentConfiguration): pass - - # Used when only a subset of config is submitted, for example only PBAFiles - # Used by passing keys, like ['monkey', 'post_breach_actions', 'linux_filename'] - # Using a list is less ambiguous IMO, than using . notation - def set_config_field(self, key_list: Sequence[str], value: Any): - pass - - # Used when only a subset of config is needed, for example only PBAFiles - # Used by passing keys, like ['monkey', 'post_breach_actions', 'linux_filename'] - # Using a list is less ambiguous IMO, than using . notation - # TODO Still in doubt about encryption, this should probably be determined automatically - def get_config_field(self, key_list: Sequence[str]) -> Any: - pass