From 84db00b72809bcab2ec06e622ffce84cabe96393 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 17 Jun 2022 11:05:10 -0400 Subject: [PATCH] Island: Use AgentConfiguration in IConfigRepository --- monkey/monkey_island/cc/repository/i_config_repository.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/monkey/monkey_island/cc/repository/i_config_repository.py b/monkey/monkey_island/cc/repository/i_config_repository.py index 70e59a89f..c9967ad45 100644 --- a/monkey/monkey_island/cc/repository/i_config_repository.py +++ b/monkey/monkey_island/cc/repository/i_config_repository.py @@ -1,5 +1,7 @@ from abc import ABC -from typing import Any, Mapping, Sequence +from typing import Any, Sequence + +from common.configuration import AgentConfiguration class IConfigRepository(ABC): @@ -10,10 +12,10 @@ class IConfigRepository(ABC): # 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) -> Mapping: + def get_config(self) -> AgentConfiguration: pass - def set_config(self, config: dict): + def set_config(self, config: AgentConfiguration): pass # Used when only a subset of config is submitted, for example only PBAFiles