Commit Graph

10834 Commits

Author SHA1 Message Date
Mike Salvatore bed684d7d0 Island: Rename IslandEventTopic.AGENT_{CONNECTED,REGISTERED} 2022-09-21 15:42:28 -04:00
Mike Salvatore 371e495f17 Island: Fix call to IIslandEventQueue.publish() 2022-09-21 15:42:12 -04:00
Mike Salvatore 71da0a559a Island: Register handle_agent_registration for AGENT_CONNECTED events 2022-09-21 15:05:47 -04:00
Mike Salvatore 271475570d Island: Modify machine with AgentRegistrationData
Since the Machine is passed to other methods, it should have the most up
to date data.
2022-09-21 15:05:47 -04:00
Mike Salvatore 4101f7509a Island: Handle IP address collisions when updating Machine on agent reg 2022-09-21 15:05:47 -04:00
Mike Salvatore c0870e6696 Island: Add new node communication on agent registration 2022-09-21 15:05:47 -04:00
Mike Salvatore 1e8a60c890 Island: Add new agent to repository on agent registration 2022-09-21 15:05:47 -04:00
Mike Salvatore c95c2ffdf9 Island: Add handle_agent_registration event handler
- Add handle_agent_registration callable class
- Add/Update machine to the repository
2022-09-21 15:05:47 -04:00
Mike Salvatore 41dbb92eef UT: Remove debug print statement 2022-09-21 15:05:47 -04:00
Mike Salvatore d514ac283c Island: Publish AgentRegistrationData from Agents resource 2022-09-21 15:05:47 -04:00
Mike Salvatore f811f91d73 Agent: Add missing `return` to convert_json_error_to_island_api_error() 2022-09-21 15:05:19 -04:00
Mike Salvatore 388b9fe4ed Agent: Add missing `return` to handle_island_api_errors() 2022-09-21 15:05:16 -04:00
Mike Salvatore 69c8d3a667 Agent: Remove errant line that sets `self._control_client = None` 2022-09-21 15:04:07 -04:00
Mike Salvatore fbb8e85b46 Agent: Pass server to InfectionMonkey._register_agent() 2022-09-21 14:56:53 -04:00
Kekoa Kaaikala ccfc41fc2f Agent: Fix mypy issues in IslandAPIClient 2022-09-21 17:54:33 +00:00
Kekoa Kaaikala fc82715262 Agent: Fix mypy issues in vuln_assessment.py 2022-09-21 17:49:04 +00:00
Kekoa Kaaikala 2fab84636e Agent: Fix mypy issues in exploit/tools/helpers.py 2022-09-21 17:47:56 +00:00
Kekoa Kaaikala 0a9d221ad8 Agent: Fix mypy issues in HostExploiter.py 2022-09-21 17:47:11 +00:00
Kekoa Kaaikala be4c5e7312 Agent: Fix mypy issues in propagation credentials
Updated aggregating_propagation_credentials_repository.py
2022-09-21 17:42:52 +00:00
Kekoa Kaaikala 60c1eb9cc1 Agent: Fix mypy errors in monkey.py 2022-09-21 17:09:06 +00:00
Kekoa Kaaikala 4f04cf1c18 Common: Fix mypy error in encoding.py 2022-09-21 17:07:11 +00:00
Mike Salvatore b4c8ac7242 Island: Accept any kwargs in IIslandEventQueue.publish() 2022-09-21 12:53:39 -04:00
Ilija Lazoroski 320364a7a2 UI: Get derived state from props in AdvancedMultiSelect 2022-09-21 16:48:47 +02:00
Mike Salvatore a76273fa0d
Merge pull request #2327 from guardicore/2266-replace-IslandModeService
Replace IslandModeService with event
2022-09-21 09:25:29 -04:00
Shreya Malviya a8fb05f2b8 Island: Simplify logic in test_island_mode.py with fixtures 2022-09-21 18:53:12 +05:30
Shreya Malviya 60db495cee UT: Use MagicMock to simulate internal server error in test_island_mode_post__invalid_mode() 2022-09-21 18:43:26 +05:30
Shreya Malviya 1afafd20dd UT: Simplify some logic in test_island_mode.py's flask_client fixture 2022-09-21 18:09:13 +05:30
Shreya Malviya 10e1177ef6 Island: Remove set_simulation_mode 2022-09-21 18:08:06 +05:30
Shreya Malviya 547637d151 Island: Subscribe ISimulationRepository.set_mode to IslandEventTopic.SET_ISLAND_MODE 2022-09-21 18:08:06 +05:30
Shreya Malviya add31fe397 Island: Rename IslandModeEnum.SET_ISLAND_MODE's subscribers' arguments from 'event' to 'mode' 2022-09-21 18:07:54 +05:30
Shreya Malviya c1e15f8be5 Island: Fix docstring in set_agent_configuration_per_island_mode 2022-09-21 17:41:54 +05:30
ilija-lazoroski 18ceb6c279
Merge pull request #2322 from guardicore/2181-credential-reuse-ete
2181 credential reuse ete
2022-09-21 13:58:12 +02:00
Shreya Malviya fb2165b2e8 UT: Fix broken IslandMode tests 2022-09-21 17:20:32 +05:30
Shreya Malviya 4e0f2c89ec UT: Remove test_island_mode_service.py 2022-09-21 16:39:24 +05:30
Shreya Malviya 6933d25768 Island: Remove IslandModeService 2022-09-21 16:38:57 +05:30
Shreya Malviya bc630e86e9 Island: Remove IslandModeService from IslandMode resource 2022-09-21 16:36:44 +05:30
Shreya Malviya d9d388d41c Island: Get Island mode from simulation repository in IslandMode's GET 2022-09-21 16:32:30 +05:30
Shreya Malviya 1f96ab5ea9 Island: Extract event topic to a variable in all Island event handler subscribe functions 2022-09-21 16:26:04 +05:30
Shreya Malviya 5a96d5b570 Island: Subscribe set_simulation_mode to IslandEventTopic.SET_ISLAND_MODE 2022-09-21 16:21:59 +05:30
Shreya Malviya b4c1879bf9 Island: Add set_simulation_mode Island event handler 2022-09-21 16:20:05 +05:30
Shreya Malviya 9ce652f1a5 Island: Rename IslandEventTopic.SET_MODE -> IslandEventTopic.SET_ISLAND_MODE 2022-09-21 16:15:33 +05:30
Shreya Malviya 822d9d6eec Island: Rename set_island_mode -> set_agent_configuration_per_island_mode 2022-09-21 16:13:33 +05:30
Shreya Malviya 8b87783998 Island: Subscribe set_island_mode to IslandEventTopic.SET_MODE 2022-09-21 16:07:00 +05:30
Shreya Malviya f20f11265b Island: Add set_island_mode Island event handler 2022-09-21 16:03:03 +05:30
Shreya Malviya 67e280fd7a Island: Publish SET_MODE event in IslandMode's PUT 2022-09-21 14:38:08 +05:30
Shreya Malviya 5675724843 Island: Add SET_MODE to IslandEventTopic 2022-09-21 14:33:16 +05:30
Mike Salvatore f8777cd37d
Merge pull request #2326 from guardicore/2256-initialize-i-machine-repository
2256 initialize i machine repository
2022-09-20 15:26:37 -04:00
Mike Salvatore 183b065ae6 Island: Set island=True on IMachineRepository initialization 2022-09-20 15:11:33 -04:00
Mike Salvatore a323441ffe Island: Add Machine.island field 2022-09-20 15:09:43 -04:00
Mike Salvatore f472963b78
Merge pull request #2324 from guardicore/2292-control-channel-client-api-client
2292 control channel client api client
2022-09-20 14:47:51 -04:00