Commit Graph

9593 Commits

Author SHA1 Message Date
Shreya Malviya 77ea3e554d UT: Replace PypubsubEventQueue -> EventQueue and test_pypubsub_event_queue.py -> test_event_queue.py 2022-08-09 00:06:24 +05:30
Shreya Malviya 23d3f179a2 Common: Rename PypubsubEventQueue -> EventQueue and pypubsub_event_queue.py -> event_queue.py 2022-08-09 00:05:07 +05:30
Shreya Malviya 1a2a4d165a Common: Add tests for PypubsubEventQueue
All the unsubscribing tests fails for some reason right now. The
subscriber is unsubscribed from the specified topics but the subscriber
is still called when an event with that topic is published.
2022-08-08 23:57:15 +05:30
Shreya Malviya b1017e2222 Common: Fix import in common/events/__init__.py 2022-08-08 23:54:29 +05:30
Shreya Malviya 9c5bbfe35c Common: Fix some logic in PypubsubEventQueue 2022-08-08 23:54:01 +05:30
Shreya Malviya b78282ef20 Common: Implement unsubscribing functions in PypubsubEventQueue 2022-08-08 13:42:55 +05:30
Shreya Malviya 0578a6fcc8 Common: Add unsubscribing functions to IEventQueue 2022-08-08 13:38:27 +05:30
Shreya Malviya 84c800b815 Common: Remove MRO logic from PypubsubEventQueue
This isn't needed. The Agent's responsibility is to just declare what it
did in the form of events.

For example, although CredentialsStolenEvent is a type of SecurityEvent
technically, the Agent doesn't care about this. The Island does, which
is why this should be handled on the pub/sub implementation on the
Island side. The Agent merely conveys the information that it stole
credentials. Whatever is to be done or however that information is to be
handled after that is the Island's responsibility.

I don't see a use case in the Agent where a concrete event is derived
from another concrete event. So, the MRO logic is removed in this
commit.
2022-08-08 13:33:52 +05:30
Shreya Malviya d773bac8c1 Common: Simplify logic in PypubsubEventQueue 2022-08-08 13:11:07 +05:30
Shreya Malviya 8ae451f240 Common: Implement publish() in PypubsubEventQueue 2022-08-08 12:49:21 +05:30
Shreya Malviya 1fbe9e5ad4 Common: Make methods static in PypubsubEventQueue 2022-08-08 12:07:45 +05:30
Shreya Malviya 414e8127ed Common: Implement subscribe_tags() in PypubsubEventQueue 2022-08-08 12:03:17 +05:30
Shreya Malviya bb76410bac Common: Create and partially implement PypubsubEventQueue 2022-08-05 19:11:33 +05:30
Shreya Malviya 40219aa5ff Common: Add TODO in IEventQueue 2022-08-05 19:05:07 +05:30
Shreya Malviya 924fc3f1e2 Common: Make all methods of IEventQueue static 2022-08-05 18:51:07 +05:30
Shreya Malviya ac62281c84 Agent: Add pypubsub as a dependency 2022-08-05 18:45:34 +05:30
Shreya Malviya b027686b2f Island: Add pypubsub as a dependency 2022-08-05 18:44:41 +05:30
Shreya Malviya 41ea4a901b Common: Add IEventQueue 2022-08-05 18:25:00 +05:30
Shreya Malviya 89b194d0ae
Merge pull request #2167 from guardicore/2109-refactor-ip-addresses-resource
Refactor IPAddresses resource
2022-08-05 13:54:33 +05:30
Shreya Malviya 2be0e088e0 Island: Fix all references to 'local' IPs which may not always be local 2022-08-05 13:52:41 +05:30
Shreya Malviya 4095e130f9 Island: Don't return IP addresses from Root resource's GET 2022-08-05 13:52:41 +05:30
Shreya Malviya 3f14b96b71 UI: Get IP addresses from /api/island/ip-addresses instead of /api in AWSRunOptions.js 2022-08-05 13:52:41 +05:30
Mike Salvatore 2e05987e7e Revert "UT: Hacky workaround in StubDIContainer to get the tests passing for now"
This reverts commit eb4f704597. This was
resolved by 5f91e39 instead.
2022-08-05 13:52:12 +05:30
Mike Salvatore 44c73db2af
Merge pull request #2164 from guardicore/2109-compare-versions-ui
2109 compare versions UI
2022-08-04 13:58:35 -04:00
Mike Salvatore 5f91e39b39 Common: Handle classes without __name__ in DIContainer 2022-08-04 10:50:53 -04:00
ilija-lazoroski 212d638af1
Merge pull request #2168 from guardicore/2109-auth-island-version
2109 auth island version
2022-08-04 16:12:40 +02:00
Ilija Lazoroski 85af7f0f39 UI: Remove leftovers in VersionComponent 2022-08-04 13:41:40 +02:00
Shreya Malviya 407bf892e5 Island: Fix import order in cc/services/initialize.py 2022-08-04 16:55:59 +05:30
Ilija Lazoroski efffde6321 Changelog: Added entry for authentication of `api/island/version` 2022-08-04 11:59:07 +02:00
Ilija Lazoroski aa8e020df6 UI: Use AuthComponent in VersionComponent 2022-08-04 11:57:09 +02:00
Ilija Lazoroski bfd0eb6fa5 Island: Authenticate `api/island/version` 2022-08-04 11:56:01 +02:00
Ilija Lazoroski 4500d57edd Island: Fix typo in Version object 2022-08-04 11:48:17 +02:00
Ilija Lazoroski ae468f9832 UI: Compare version numbers in VersionComponent 2022-08-04 11:48:17 +02:00
Ilija Lazoroski f13d55d89a UI: Install semver
Used for comparing version numbers
2022-08-04 11:48:17 +02:00
Ilija Lazoroski 805964d0e3 Island: Add Version to cc/__init__ 2022-08-04 11:48:17 +02:00
vakarisz 484773b782 Island: Fix import sequence in main.py
Gevent setup needs to go first, because it hooks other imports.
2022-08-04 12:43:13 +03:00
Shreya Malviya eb4f704597 UT: Hacky workaround in StubDIContainer to get the tests passing for now 2022-08-04 13:41:55 +05:30
Shreya Malviya 144268187f Island: Add IPAddresses to cc/resources/__init__.py and shorten imports 2022-08-04 13:06:08 +05:30
Shreya Malviya 4ee1450001 Island: Inject local_ip_addresses into Root resource's constructor 2022-08-04 13:03:04 +05:30
Shreya Malviya 80c6ee8805 Island: Inject local_ip_addresses into LocalMonkeyRunService's constructor 2022-08-04 12:59:18 +05:30
Shreya Malviya e4d7f36985 Island: Rename IpAddresses -> IPAddresses 2022-08-04 12:53:36 +05:30
Shreya Malviya 6b89f38f87 Island: Fix docstrings in IpAddresses resource 2022-08-04 12:52:25 +05:30
Shreya Malviya e2702ffacb UI: Modify RunOptions page to correctly display IPs in manual run option 2022-08-04 12:49:47 +05:30
Shreya Malviya 860eb1b65c Island: Simply return IPs list instead of mapping in IpAddresses resource 2022-08-04 12:47:32 +05:30
Shreya Malviya 637c466822 Island: Pass local_ip_addresses in IpAddresses resource constructor 2022-08-04 12:47:32 +05:30
Shreya Malviya 1466fccc5f Island: Register convention 'local_ip_addresses' 2022-08-04 12:47:29 +05:30
Shreya Malviya d189a94e9c Island: Rename local_ip_addresses() -> get_local_ip_addresses() 2022-08-04 12:31:21 +05:30
Mike Salvatore 867135b358 Docs: Update references to deployment types 2022-08-03 19:32:49 -04:00
Mike Salvatore c9e01f197c Changelog: Improve consistency in API entries 2022-08-03 19:18:40 -04:00
Mike Salvatore 3798fe0756
Merge pull request #2161 from guardicore/2109-remove-version-update-service
Island: Remove VersionUpdate service
2022-08-03 16:50:17 -04:00