diff --git a/AIDojoCoordinator/scenarios/one_net.py b/AIDojoCoordinator/scenarios/one_net.py index 25f2d2ba..7ec86143 100644 --- a/AIDojoCoordinator/scenarios/one_net.py +++ b/AIDojoCoordinator/scenarios/one_net.py @@ -42,15 +42,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, @@ -169,7 +172,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DatabaseData" + description="DatabaseData", + path="/etc/" )], local=False, access_level=cyst_cfg.AccessLevel.LIMITED @@ -209,7 +213,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User2", - description="WebServerData" + description="WebServerData", + path="/etc/" ), ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/scenario_configuration.py b/AIDojoCoordinator/scenarios/scenario_configuration.py index d8fedb80..ccb13efb 100644 --- a/AIDojoCoordinator/scenarios/scenario_configuration.py +++ b/AIDojoCoordinator/scenarios/scenario_configuration.py @@ -35,15 +35,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, @@ -162,7 +165,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DatabaseData" + description="DatabaseData", + path="/etc/" )], local=False, access_level=cyst_cfg.AccessLevel.LIMITED @@ -202,7 +206,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User2", - description="WebServerData" + description="WebServerData", + path="/etc/" ), ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/smaller_scenario_configuration.py b/AIDojoCoordinator/scenarios/smaller_scenario_configuration.py index 215b4aa7..9c7d9c03 100644 --- a/AIDojoCoordinator/scenarios/smaller_scenario_configuration.py +++ b/AIDojoCoordinator/scenarios/smaller_scenario_configuration.py @@ -36,15 +36,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, @@ -163,7 +166,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DatabaseData" + description="DatabaseData", + path="/etc/" )], local=False, access_level=cyst_cfg.AccessLevel.LIMITED @@ -203,7 +207,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User2", - description="WebServerData" + description="WebServerData", + path="/etc/" ), ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/test_scenario_configuration.py b/AIDojoCoordinator/scenarios/test_scenario_configuration.py index 17233c06..53e474f6 100644 --- a/AIDojoCoordinator/scenarios/test_scenario_configuration.py +++ b/AIDojoCoordinator/scenarios/test_scenario_configuration.py @@ -33,15 +33,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, @@ -160,7 +163,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DatabaseData" + description="DatabaseData", + path="/etc/" )], local=False, access_level=cyst_cfg.AccessLevel.LIMITED @@ -200,7 +204,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User2", - description="WebServerData" + description="WebServerData", + path="/etc/" ), ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/three_net_scenario.py b/AIDojoCoordinator/scenarios/three_net_scenario.py index b4bd6f95..7e5692a8 100644 --- a/AIDojoCoordinator/scenarios/three_net_scenario.py +++ b/AIDojoCoordinator/scenarios/three_net_scenario.py @@ -39,9 +39,9 @@ version="10.0.19041", local=False, private_data=[ - cyst_cfg.DataConfig(owner="User1", description="DataFromServer1"), - cyst_cfg.DataConfig(owner="User2", description="Data2FromServer1"), - cyst_cfg.DataConfig(owner="User1", description="Data3FromServer1"), + cyst_cfg.DataConfig(owner="User1", description="DataFromServer1", path="/etc/"), + cyst_cfg.DataConfig(owner="User2", description="Data2FromServer1", path="/etc/"), + cyst_cfg.DataConfig(owner="User1", description="Data3FromServer1", path="/etc/"), ], access_level=cyst_cfg.AccessLevel.LIMITED, authentication_providers=[], @@ -162,7 +162,7 @@ version="1.4.54", local=False, private_data=[ - cyst_cfg.DataConfig(owner="User2", description="WebServerData"), + cyst_cfg.DataConfig(owner="User2", description="WebServerData", path="/etc/"), ], access_level=cyst_cfg.AccessLevel.LIMITED, authentication_providers=[], @@ -310,7 +310,7 @@ version="10.0.19041", local=False, private_data=[ - cyst_cfg.DataConfig(owner="admin", description="passwords"), + cyst_cfg.DataConfig(owner="admin", description="passwords", path="/etc/"), ], access_level=cyst_cfg.AccessLevel.LIMITED, authentication_providers=[], @@ -410,7 +410,7 @@ owner="postgresql", version="14.3.0", private_data=[ - cyst_cfg.DataConfig(owner="User1", description="DatabaseData") + cyst_cfg.DataConfig(owner="User1", description="DatabaseData", path="/etc/") ], local=False, access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/tiny_scenario_configuration.py b/AIDojoCoordinator/scenarios/tiny_scenario_configuration.py index b630560f..80604055 100644 --- a/AIDojoCoordinator/scenarios/tiny_scenario_configuration.py +++ b/AIDojoCoordinator/scenarios/tiny_scenario_configuration.py @@ -41,15 +41,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/two_nets.py b/AIDojoCoordinator/scenarios/two_nets.py index d8fedb80..ccb13efb 100644 --- a/AIDojoCoordinator/scenarios/two_nets.py +++ b/AIDojoCoordinator/scenarios/two_nets.py @@ -35,15 +35,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, @@ -162,7 +165,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DatabaseData" + description="DatabaseData", + path="/etc/" )], local=False, access_level=cyst_cfg.AccessLevel.LIMITED @@ -202,7 +206,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User2", - description="WebServerData" + description="WebServerData", + path="/etc/" ), ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/two_nets_small.py b/AIDojoCoordinator/scenarios/two_nets_small.py index 215b4aa7..9c7d9c03 100644 --- a/AIDojoCoordinator/scenarios/two_nets_small.py +++ b/AIDojoCoordinator/scenarios/two_nets_small.py @@ -36,15 +36,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, @@ -163,7 +166,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DatabaseData" + description="DatabaseData", + path="/etc/" )], local=False, access_level=cyst_cfg.AccessLevel.LIMITED @@ -203,7 +207,8 @@ private_data=[ cyst_cfg.DataConfig( owner="User2", - description="WebServerData" + description="WebServerData", + path="/etc/" ), ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/scenarios/two_nets_tiny.py b/AIDojoCoordinator/scenarios/two_nets_tiny.py index b630560f..80604055 100644 --- a/AIDojoCoordinator/scenarios/two_nets_tiny.py +++ b/AIDojoCoordinator/scenarios/two_nets_tiny.py @@ -41,15 +41,18 @@ private_data=[ cyst_cfg.DataConfig( owner="User1", - description="DataFromServer1" + description="DataFromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User2", - description="Data2FromServer1" + description="Data2FromServer1", + path="/etc/" ), cyst_cfg.DataConfig( owner="User1", - description="Data3FromServer1" + description="Data3FromServer1", + path="/etc/" ) ], access_level=cyst_cfg.AccessLevel.LIMITED, diff --git a/AIDojoCoordinator/worlds/WhiteBoxNSGCoordinator.py b/AIDojoCoordinator/worlds/WhiteBoxNSGCoordinator.py index 852c1134..3b0fdcd2 100644 --- a/AIDojoCoordinator/worlds/WhiteBoxNSGCoordinator.py +++ b/AIDojoCoordinator/worlds/WhiteBoxNSGCoordinator.py @@ -116,6 +116,10 @@ def _generate_all_actions(self)-> list: self.logger.debug(action) self._all_actions = actions + + def _create_state_from_view(self, view, add_neighboring_nets = True): + return super()._create_state_from_view(view, add_neighboring_nets=False) + if __name__ == "__main__": parser = argparse.ArgumentParser( description="NetSecGame Coordinator Server Author: Ondrej Lukas ondrej.lukas@aic.fel.cvut.cz",