Commit Graph

8858 Commits

Author SHA1 Message Date
Mike Salvatore f973c9d6e9 UT: Extract MockFileRepository into its own module 2022-06-21 09:11:10 -04:00
Mike Salvatore bf2f58aace UT: Add __init__.py 2022-06-21 09:11:10 -04:00
Mike Salvatore bcc5265a99 UT: Add test_file_download_endpoint_500() for PBAFileDownload 2022-06-21 09:11:03 -04:00
Ilija Lazoroski 44795531b8 Island: Remove logging TODOs for pba_file upload/download
Resources should log the errors
2022-06-21 15:04:34 +02:00
Mike Salvatore cd34cd5eae Island: Add repository.FileNotFoundError 2022-06-21 08:49:36 -04:00
Mike Salvatore c424262f12 Island: Improve description of return value for get_configuration() 2022-06-21 08:22:47 -04:00
Ilija Lazoroski 3cb678ad32 Island: Raise distinct errors when openning a file
IFileRepository now distincts between file not found and a file that
could not be retrieved
2022-06-20 14:55:26 +02:00
vakarisz df77ca4f96 Agent: Change the logic of depth to represent current depth
Based on the previous logic the depth parameter represented hops remaining, not current depth.
2022-06-20 15:52:50 +03:00
VakarisZ b959763318
Merge pull request #2032 from guardicore/1960-flat-config-changes
Change config flattening logic to return new schema
2022-06-20 15:32:47 +03:00
vakarisz 3757e33180 UT: Use OperatingSystems enum instead of strings 2022-06-20 12:30:25 +03:00
vakarisz 0474e2a5f7 Island: Change json encoding to encode Enums to name string
Enum objects couldn't get encoded, so for each enum we had to decide whether the name or the value would be used to represent that enum value. Changing the encoding to name allows us to use enum object on the island without having to worry about encoding.
2022-06-20 12:27:01 +03:00
vakarisz c0f0d35f0b Island: Use OperatingSystems enum in config.py 2022-06-20 12:18:03 +03:00
Shreya Malviya 02dcee8bfc UT: Modify tests to pass with config flattening changes 2022-06-19 23:35:35 -07:00
Shreya Malviya ab23b3c9cb Island: Fix exploiters' `supported_os`'s capitalisation in config flattening 2022-06-19 23:13:14 -07:00
Shreya Malviya ba3af5a9c2 Island: Fix 'exploitation' field of config flattening 2022-06-19 23:13:14 -07:00
Shreya Malviya f9a7989f5e Island: Fix 'propagation' field of config flattening 2022-06-19 23:13:09 -07:00
Shreya Malviya 83dd4334b2 UT: Fix flat_config.json to match current config schema 2022-06-19 21:54:54 -07:00
vakarisz d393a0b3c6 Agent: Change credential collectors, payloads and pbas in flat config
Flat config changes are made in order for config object to be serializable
2022-06-19 20:22:42 -07:00
Mike Salvatore b99ad70774 Island: Add StorageError 2022-06-17 19:56:09 -04:00
Mike Salvatore cb7dae28bf Island: Add a docstring for RetrievalError 2022-06-17 19:55:47 -04:00
Mike Salvatore 58733f7572
Merge pull request #2031 from guardicore/1960-configuration-repository
1960 configuration repository
2022-06-17 19:44:09 -04:00
Mike Salvatore 58ea11ae9f Common: Move DEFAULT_AGENT_CONFIGURATION to its own file 2022-06-17 19:16:19 -04:00
Mike Salvatore e4a2a04765 UT: Remove duplicate SingleFileRepository
This was added by mistake. Remove it!
2022-06-17 19:14:38 -04:00
Mike Salvatore d3a03d2653 Agent: Remove disused constants 2022-06-17 13:11:47 -04:00
Mike Salvatore e730695407 Agent: Remove disused Configuration class 2022-06-17 13:11:30 -04:00
Mike Salvatore 764bc1559b Island: Add IAgentConfigurationRepository to the DIContainer 2022-06-17 13:08:22 -04:00
Mike Salvatore 45168b5ba7 Island: Return default configuration from get_configuration() 2022-06-17 12:56:55 -04:00
Mike Salvatore a3e3e3e324 Common: Add DEFAULT_AGENT_CONFIGURATION 2022-06-17 12:48:54 -04:00
Mike Salvatore 9a216e9c3d Island: Add "raises" to docstring in get_configuration() 2022-06-17 12:17:22 -04:00
Mike Salvatore 922cb8cea9 Island: Add RetrievalError 2022-06-17 12:17:21 -04:00
Mike Salvatore 30065952a5 Island: Add RetrievalError 2022-06-17 12:13:18 -04:00
Mike Salvatore 73ead3bb26 Island: Rename set_configuration() -> store_configuration() 2022-06-17 12:10:43 -04:00
Mike Salvatore bdce5f84a6 Island: Add FileAgentConfigurationRepository 2022-06-17 12:09:30 -04:00
Mike Salvatore 5ebdb60ea4 Island: Add @abstractmethod in IAgentConfigurationRepository 2022-06-17 11:41:29 -04:00
Mike Salvatore a75041e93f Island: Rename IConfigurationRepository IAgentConfigurationRepository 2022-06-17 11:36:50 -04:00
Mike Salvatore 7cb7f7ab5a UT: Extract agent configuration from test_agent_configuration.py 2022-06-17 11:33:01 -04:00
Mike Salvatore ace3eb8718 UT: Extract SingleFileRepository from test_pba_file_upload.py 2022-06-17 11:19:11 -04:00
Mike Salvatore 91476a7a06 Island: Protract config -> configuration in IConfigurationRepository 2022-06-17 11:11:14 -04:00
Mike Salvatore 59e29456c0 Island: Rename i_config_repository.py -> i_configuration_repository.py 2022-06-17 11:10:16 -04:00
Mike Salvatore ae0c440603 Island: Add documentation for IConfigRepository 2022-06-17 11:08:45 -04:00
Mike Salvatore 62056175a1 Island: Remove unneeded methods in IConfigRepository
Also remove stale comments. No encryption is needed here because
configuration does not contain anything sensitive.
2022-06-17 11:06:23 -04:00
Mike Salvatore 84db00b728 Island: Use AgentConfiguration in IConfigRepository 2022-06-17 11:05:10 -04:00
Mike Salvatore f25a81635c
Merge pull request #2030 from guardicore/1960-configuration-schema
1960 configuration schema
2022-06-17 10:31:56 -04:00
Mike Salvatore ed39d155bf Common: Remove sub-configuration and sub-schemas from configuration 2022-06-17 10:23:43 -04:00
Mike Salvatore 291b82c28d Common: Separate agent sub configurations and schemas 2022-06-17 10:20:49 -04:00
vakarisz f8855d290d Agent: Remove WormConfiguration and cleanup related infrastructure 2022-06-17 16:40:40 +03:00
Mike Salvatore e0ae109368 Common: Add AgentConfiguration 2022-06-17 09:27:51 -04:00
Mike Salvatore 7039ccf708 Common: Switch configuration timeouts from ms to floating-point seconds 2022-06-17 09:14:22 -04:00
Mike Salvatore bd7ea7fdb1 Common: Add maximum_depth to PropagationConfiguration 2022-06-17 09:07:13 -04:00
Mike Salvatore a41b2e3ea4 Common: Add PropagationConfiguration 2022-06-17 09:04:00 -04:00