Commit Graph

10240 Commits

Author SHA1 Message Date
Shreya Malviya aeda96db06 UT: Add test for AgentEventsToIslandSender 2022-09-14 15:45:40 +05:30
Shreya Malviya 37c4362b60 Agent: Add default argument and type hint in send_all_events_to_island.py 2022-09-14 15:43:38 +05:30
Shreya Malviya fe63b28ee1 Agent: Restructure SendAllAgentEventsToIsland and _AgentEventsToIslandSender 2022-09-14 14:31:55 +05:30
Shreya Malviya 404f6d954f Agent: Replace SendAllAgentEventsToIsland's __call__() with send_event() 2022-09-14 13:46:45 +05:30
Shreya Malviya 8256322a29 Agent: Rename _batch_and_send_events_thread -> _BatchAndSendEventsThread 2022-09-14 13:34:34 +05:30
Shreya Malviya 1ad13db758 Agent: Rename send_all_events_to_island -> SendAllAgentEventsToIsland 2022-09-14 13:33:34 +05:30
Shreya Malviya 5152b9a3cc Agent: Use threading.Event instead of flag in send_all_events_to_island.py 2022-09-14 12:29:07 +05:30
Shreya Malviya a561195508 Agent: Use `json` instead of `data` in POST request in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya 4381716e54 Agent: Remove unused variables in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya 39a7ae0964 Agent: Rename DEFAULT_TIME_PERIOD -> DEFAULT_TIME_PERIOD_SECONDS in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya 5ecc3e992a Agent: Remove send_all_events_to_island's dependency on pubsub 2022-09-14 12:14:25 +05:30
Shreya Malviya 83c7f10859 Agent: Simplify batching and sending logic in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya 1d60cb160b Agent: Clear event batches set and use correct variable name in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya 239b2e2550 Agent: Extract API URL to variable EVENTS_API_URL in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya 39f8bafd46 Agent: Add docstrings in send_all_events_to_island.py 2022-09-14 12:14:25 +05:30
Shreya Malviya de68f21fdf Agent: Subscribe `send_all_events_to_island` to all events 2022-09-14 12:14:25 +05:30
Shreya Malviya 1abf323b14 Agent: Add type annotation for `send_all_events_to_island._batch_and_send_events_thread._event_batch` 2022-09-14 12:14:25 +05:30
Shreya Malviya 8f4aefda74 Agent: Rename some variables in `send_all_events_to_island` 2022-09-14 12:14:25 +05:30
Shreya Malviya 6520fe2c90 Agent: Rename push_events_to_island.py -> send_all_events_to_island.py for consistency 2022-09-14 12:14:25 +05:30
Shreya Malviya 9475c86fba Agent: Rename `push_all_events_to_island` -> `send_all_events_to_island` for consistency 2022-09-14 12:14:25 +05:30
Shreya Malviya 5542f67ceb Agent: Finish implementing threading/batching in `push_all_events_to_island` 2022-09-14 12:14:25 +05:30
Shreya Malviya e51a717bdf Agent: Add a very crude outline of using a queue and threading in `push_all_events_to_island` 2022-09-14 12:14:25 +05:30
Shreya Malviya a06c6a622e Agent: Add log statements in class `push_all_events_to_island`'s `__call__()` 2022-09-14 12:14:25 +05:30
Shreya Malviya 1462e832b0 Agent: Add subscriber to push all events to the Island 2022-09-14 12:14:25 +05:30
Mike Salvatore ed0e8c4870 Common: Add event type to serialized agent events 2022-09-13 17:15:52 -04:00
Mike Salvatore 03989e1964 Common: Add EVENT_TYPE_FIELD 2022-09-13 17:04:44 -04:00
Mike Salvatore 010a630c4f
Merge pull request #2282 from guardicore/2179-register-credentials-stolen-event-serializer
2179 register credentials stolen event serializer
2022-09-13 17:02:25 -04:00
Mike Salvatore d30dfd3396 Agent: Setup EventSerializerRegistry 2022-09-13 15:16:27 -04:00
Mike Salvatore ca23c94c8e Island: Setup EventSerializerRegistry 2022-09-13 15:12:07 -04:00
Mike Salvatore 5905d3bf5b Common: Add register_common_agent_event_serializers() 2022-09-13 15:04:45 -04:00
Mike Salvatore ad01003480 Common: Rename i_event_serialize{,r}.py 2022-09-13 14:58:15 -04:00
Mike Salvatore 1c742c3f96
Merge pull request #2280 from guardicore/2179-credentialsstolenevent-pydantic
2179 credentialsstolenevent pydantic
2022-09-13 14:47:10 -04:00
Mike Salvatore 1503c3f0ba Common: Switch AbstractAgentEvent.source from int to AgentID 2022-09-13 13:25:47 -04:00
Mike Salvatore 80cd5a05a1 Common: Move AgentID definition to common 2022-09-13 13:25:45 -04:00
Mike Salvatore 1998d492eb Agent: Remove disused credential_collectors.credential_components pkg 2022-09-13 13:17:02 -04:00
Ilija Lazoroski 31f3c1a4d6 UT: Fix all unit tests that we creating events to use pydantic 2022-09-13 17:53:58 +02:00
Ilija Lazoroski 1799f1253c Common: Make AbstractAgentEvent to be a pydantic modell
In this way we are saying that every event needs to be a pydantic model
for which we may pay the price later on.
2022-09-13 17:45:48 +02:00
Ilija Lazoroski a68a765722 Common: Make CredentialsStolenEvent to be a class 2022-09-13 17:45:48 +02:00
Kekoa Kaaikala 1a96e9fd8d Common: Make CredentialsStolenEvent a pydantic model 2022-09-13 17:45:48 +02:00
Kekoa Kaaikala 78d5094f90 Common: Use int instead of UUID in AbstractAgentEvent 2022-09-13 17:45:48 +02:00
Mike Salvatore bde44f74f5
Merge pull request #2275 from guardicore/2179-implement-pydantic-event-serializer
2179 implement pydantic event serializer
2022-09-13 09:56:57 -04:00
Mike Salvatore 69e11d6b50 Common: Ignore mypy cyclical definition warning for JSONSerializable 2022-09-13 09:22:24 -04:00
Ilija Lazoroski d3a4f255f0 Common: Use isinstance in PydanticEventSerializer 2022-09-13 14:09:54 +02:00
Mike Salvatore ef2bac6de2
Merge pull request #2278 from guardicore/2234-remove-repository-service
Island: Remove RepositoryService
2022-09-13 08:01:36 -04:00
Mike Salvatore 6c0b63aa29 Common: Don't hide AttributeError from the caller 2022-09-13 07:55:15 -04:00
Mike Salvatore 780595cf19 Common: Use `simplify=True` in PydanticEventSerializer 2022-09-13 07:53:30 -04:00
Mike Salvatore 34e843f7f3 Common: Make PydanticEventSerializer generic 2022-09-13 07:50:38 -04:00
Ilija Lazoroski dcd9cab0f4 Project: Remove clear_simulation_data entry from vulture_allowlist 2022-09-13 13:40:54 +02:00
Ilija Lazoroski 62ab6e5a77 Common: Add generic events to PydanticEventSerializer 2022-09-13 13:38:41 +02:00
Ilija Lazoroski 88d65f40ae Project: Add PydanticEventSerializer to vulture_allowlist 2022-09-13 13:38:41 +02:00