Commit Graph

10680 Commits

Author SHA1 Message Date
Shreya Malviya fa9225370e Agent: Add handle_island_errors() decorator to http_island_api_client.py 2022-09-19 19:39:00 -04:00
Shreya Malviya d188b06980 Agent: Implement HTTPIslandAPIClient.get_pba_file and use in ControlClient 2022-09-19 19:39:00 -04:00
Shreya Malviya 1b92ec78fb Agent: Implement HTTPIslandAPIClient.send_log and use in ControlClient 2022-09-19 19:39:00 -04:00
Mike Salvatore e674f3ab24 Merge branch '2292-modify-find-server' into develop
PR #2314
2022-09-19 14:42:33 -04:00
Mike Salvatore b9576db426 UT: Fix broken tests for find_available_island_apis() 2022-09-19 14:21:17 -04:00
Mike Salvatore 753ac739b0 Agent: rename find_servers() -. find_available_island_apis() 2022-09-19 14:20:40 -04:00
Mike Salvatore 2ebb7621e3 Agent: Fix server selection logic 2022-09-19 14:05:34 -04:00
Mike Salvatore 9ea291a7fa Agent: Fix crash when connecting to IPv4Address
socket.connect() needs a string, not IPv4Address, otherwise the thread
will crash.
2022-09-19 14:01:51 -04:00
Mike Salvatore 51ecf52d4b Agent: Add an ID (int) to relay control message thread name 2022-09-19 14:01:08 -04:00
Mike Salvatore c6a5e294df Agent: Add a timeout to notify disconnect socket 2022-09-19 13:57:25 -04:00
Mike Salvatore 6563be8222 Agent: Remove unnecessary local variable 2022-09-19 12:16:20 -04:00
Mike Salvatore db75806a08 Agent: Rename _get_server() -> _connect_to_island_api() 2022-09-19 12:13:03 -04:00
Mike Salvatore 9a1b5b67b5 Agent: Default self._relay to None 2022-09-19 11:47:54 -04:00
Ilija Lazoroski bc19b5ea93 Agent: Modify find_server to return tuple of server and IIslandAPIClient 2022-09-19 17:24:00 +02:00
Ilija Lazoroski f4b47f8238 Agent: Use HTTPIslandAPIClient in find_server 2022-09-19 16:44:37 +02:00
Mike Salvatore 787af6ae1b Agent: Fix send relay disconnect to unneeded relays
Since `find_server()` is parallelized, the iterator was completely
exhausted when `send_remove_from_waitlist_control_message_to_relays()`
was called, making it effectively a NOOP.
2022-09-19 16:40:04 +02:00
Shreya Malviya 9456a30bd9 Agent: Remove unnecessary logic in _check_if_island_server() 2022-09-19 16:40:04 +02:00
Shreya Malviya 69b26287b6 UT: Fix Island API errors' import in network/relay/test_utils.py 2022-09-19 16:40:04 +02:00
Shreya Malviya 8a4666fba2 Agent: Fix Island API client import in network/relay/utils.py 2022-09-19 16:40:04 +02:00
Ilija Lazoroski 11da608fe6 Agent: Modify find_server to use IslandApiClient 2022-09-19 16:40:04 +02:00
Mike Salvatore 310b58392f
Merge pull request #2313 from guardicore/2292-island-api-client
2292 island api client
2022-09-19 10:25:29 -04:00
Mike Salvatore 9f697e57d2
Merge pull request #2317 from guardicore/fix-zerologon
Fix zerologon
2022-09-19 10:16:19 -04:00
Ilija Lazoroski 2857e70fa2 Island: Change credentials stolen event subscriber argument name 2022-09-19 15:52:44 +02:00
Ilija Lazoroski 0c6997c147 BB: Get the secret value from credentials in ZerologonAnalyzer 2022-09-19 15:52:04 +02:00
Shreya Malviya 9e79c7c6ef Project: Add IslandAPIRequestError to Vulture allowlist 2022-09-19 19:08:17 +05:30
Shreya Malviya 1b037c4b3a Agent: Add IslandAPIRequestError for errors that are the client's mistake 2022-09-19 19:08:15 +05:30
Mike Salvatore 04e82de641 Agent: Make language consistent in IIslandAPIClient docstrings 2022-09-19 09:25:56 -04:00
Mike Salvatore f4f9ca6317 Agent: Update island API client docstrings 2022-09-19 08:18:46 -04:00
Mike Salvatore 43d6ebcc15 Agent: Rename IslandAPIClient -> HTTPIslandAPIClient 2022-09-19 08:03:45 -04:00
Mike Salvatore 6d5503bd6e Agent: Move IslandAPIClient to island_api_client package 2022-09-19 08:00:00 -04:00
Mike Salvatore 184e54228d Agent: Use relative import for errors in IslandAPIClient 2022-09-19 07:56:34 -04:00
Mike Salvatore 0790952c47 Project: Fix IslandApiClient -> IslandAPIClient 2022-09-19 07:52:10 -04:00
Mike Salvatore ca1bc06c55 Agent: Add IIslandAPIClient 2022-09-19 07:51:50 -04:00
Shreya Malviya b432a9f567 Agent: Fix docstrings in IslandAPIClient 2022-09-19 17:16:10 +05:30
Shreya Malviya d53b3d5026 UT: Fix Island API errors' import 2022-09-19 17:11:14 +05:30
Shreya Malviya c3ecb1e2e8 Project: Fix Island API error import 2022-09-19 17:10:34 +05:30
Shreya Malviya f5279a6cb1 Agent: Import Island API errors in transport/__init__.py 2022-09-19 17:09:52 +05:30
Shreya Malviya 672fde0b94 UT: Change IslandApiClient -> IslandAPIClient 2022-09-19 17:06:41 +05:30
Shreya Malviya 94dc2288cd Project: Change IslandApiClient -> IslandAPIClient in Vulture allowlist 2022-09-19 17:06:27 +05:30
Shreya Malviya d217d30b2e Agent: Change IslandApiClient -> IslandAPIClient 2022-09-19 17:05:56 +05:30
ilija-lazoroski 8e88f81c36
Merge pull request #2304 from guardicore/fix-slow-ransomware-test
Agent: Make BatchingTelemetryMessenger sleep period configurable
2022-09-19 12:30:05 +02:00
vakarisz 8386a006d0 Agent: Implement IslandApiClient 2022-09-19 11:11:50 +02:00
Mike Salvatore 89b9e3cc2b
Merge pull request #2305 from guardicore/fix-bb-tests
Fix bb tests
2022-09-16 10:52:25 -04:00
Ilija Lazoroski 547c9f7028 BB: Fix tunneling ToC in documentation 2022-09-16 16:41:26 +02:00
vakarisz 0b0f039474 Agent: Add 4 IslandAPIErrors 2022-09-16 17:39:46 +03:00
Ilija Lazoroski 95741acdf4 BB: Shorten import of depth_4_a_test_configuration 2022-09-16 16:37:00 +02:00
Ilija Lazoroski ecbee6a3cb BB: Fix tunneling-13 ip address in the test_configuration 2022-09-16 16:36:26 +02:00
Ilija Lazoroski 8df35e0107 BB: Export depth_4_a_test_configuration from __init__ 2022-09-16 16:35:54 +02:00
Mike Salvatore f677096439 Agent: Make BatchingTelemetryMessenger sleep period configurable
The ransomware integration tests were sometimes painfully slow because
they were waiting for the BatchingTelemetryMessenger to stop its
internal thread. This commit surfaces the sleep period parameter to the
`build_ransomware()` function so that the unit tests can set it to a
very small value. This is somewhat of a hack, but
BatchingTelemetryMessenger is going away very soon, as Telemetry is
being replaced by Events.
2022-09-16 10:34:31 -04:00
Mike Salvatore 5233dfd2b5 Project: Run pytest with `--dist loadscope`
This option forces tests to be grouped by module and run by the same
worker. This avoids some race conditions that cause tests to fail when
they attempt to bind to the same port. This cannot be solved with any
kind of lock because the tests were being run by completely different
processes.
2022-09-16 10:13:40 -04:00