Shreya Malviya
104c7ac210
Island: Fix function call to load config in new configuration resource
2022-06-22 09:10:47 -07:00
Shreya Malviya
e25eb194a1
UT: Remove `supported_os` for exploiters from all tests
2022-06-22 09:10:47 -07:00
Shreya Malviya
fd41d9179e
Agent: Add `SUPPORTED_OS` dict for exploiters and change checking logic in master
2022-06-22 09:10:41 -07:00
Shreya Malviya
26ece213a2
Island: Remove logic to add `supported_os` for exploiters to configuration
2022-06-22 09:07:02 -07:00
Shreya Malviya
03037b5662
Common: Remove `supported_os` field for exploiters in configuration
2022-06-22 09:06:35 -07:00
Shreya Malviya
142eed72ac
Island: Remove logic to remove/add config metadata in new configuration resource
2022-06-22 08:12:09 -07:00
Shreya Malviya
ec710d9e5f
Island: Get rid of ResponseContents and ImportStatuses in new configuration resource
2022-06-22 07:48:34 -07:00
Shreya Malviya
d861def86c
Island: Add logic to add metadata to config in new configuration resource's GET
2022-06-22 07:35:19 -07:00
Shreya Malviya
922495785c
Island: Create class variable for agent config schema in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
6b45d62d81
Island: Fix logic to remove metadata from config in new configuration resource's POST
2022-06-22 07:35:19 -07:00
Shreya Malviya
32fe7c6a4b
Island: Remove unneeded fields from `ResponseContents` in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
63d5330386
Island: Remove unneeded patch function in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
00e38391b4
Island: Catch appropriate `marshmallow` error when loading config which could be invalid, in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
15615e08c4
Island: Get rid of unsafe config options' check in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
8c14423c4e
Island: Prepend 'agent' to everything having 'configuration' in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
0d8cc713d2
Island: Rename `file_agent_configuration_repository` to `agent_configuration_repository` in new configuration resource
2022-06-22 07:35:19 -07:00
Shreya Malviya
74bc55e077
Island: Remove config type logic from new configuration resource
2022-06-22 07:35:19 -07:00
Ilija Lazoroski
5f253e79b3
Island: Init Configuration resource
2022-06-22 07:35:18 -07:00
Shreya Malviya
138480f021
Island: Roughly implement POST in new Configuration resource
...
+ lots of questions
2022-06-22 07:35:18 -07:00
Shreya Malviya
5dd27eeea5
Island: Add definition for GET in new Configuration resource
2022-06-22 07:35:18 -07:00
Shreya Malviya
7a28ba4c4d
Island: Create new resource `Configuration`
2022-06-22 07:35:18 -07:00
Mike Salvatore
1f00a13649
Island: Pass default agent configuration to repository constructor
2022-06-22 10:27:53 -04:00
Mike Salvatore
8e875143ac
Project: Add `monkey/` to PYTHONPATH when running pytest
...
Without explicitly setting the python path, conftest.py can not find
common.*, monkey_island.*, or infection_monkey.*.
2022-06-22 10:27:53 -04:00
Mike Salvatore
05abc22ac0
Merge pull request #2037 from guardicore/repository-errors
...
Repository errors
2022-06-21 19:46:08 -04:00
Mike Salvatore
f9775f5b54
Island: Improve directory traversal error message
2022-06-21 15:18:51 -04:00
Mike Salvatore
40b192accc
Island: Wrap directory traversal errors in repository errors
...
A given `IFileRepository` may have no concept of directories.
`LocalStorageFileRepository` should wrap the ValueErrors raised to
prevent directory traversal in repository errors.
2022-06-21 15:18:51 -04:00
Mike Salvatore
21be5fc2be
Island: raise RemovalError in Local...FileRepository.delete_all_files()
2022-06-21 15:18:51 -04:00
Mike Salvatore
da1339e410
Island: Raise RemovalError in LocalStorageFileRepository.delete_file()
2022-06-21 15:18:51 -04:00
Mike Salvatore
cd1481e4fe
Island: Add monkey_island.cc.repository.RemovalError
2022-06-21 15:18:51 -04:00
Mike Salvatore
63404c7bed
Island: Raise StorageError in LocalStorageFileRepository.save_file()
2022-06-21 15:18:51 -04:00
Mike Salvatore
3446dbf0aa
Island: Export StorageError from monkey_island.cc.repository
2022-06-21 15:18:51 -04:00
Mike Salvatore
f60c2f1dde
Island: Add ValueError to IFileRepository docstring
2022-06-21 15:18:51 -04:00
Mike Salvatore
5c97d6bdbf
UT: Add tests for AgentBinaryRepository
2022-06-21 15:18:17 -04:00
Mike Salvatore
185ac3dfa4
Merge pull request #2034 from guardicore/1960-file-retrieval-error-todo
...
1960 file retrieval error todo
2022-06-21 15:15:05 -04:00
Mike Salvatore
838a2e742c
Island: Change can -> could in get_configuration()
2022-06-21 10:36:56 -04:00
Mike Salvatore
3bd977ed55
Island: Improve IFileRepository.open_file() docstring
2022-06-21 10:34:27 -04:00
Mike Salvatore
c008db4cf2
Island: Raise RetrievalError in FileAgentConfigurationRepository
2022-06-21 09:40:00 -04:00
Mike Salvatore
4de9f3cb6d
UT: Move OpenErrorFileRepository into tests/monkey_island
2022-06-21 09:35:23 -04:00
Mike Salvatore
47df257545
Island: Raise RetrievalError from IAgentBinaryRepository
2022-06-21 09:22:38 -04:00
Mike Salvatore
22b22c5f0a
Island: Remove testing TODOs from PBAFile{Download,Upload}
2022-06-21 09:11:54 -04:00
Mike Salvatore
63a2527f3f
UT: Add test_file_download_endpoint_500() for PBAFileUpload
2022-06-21 09:11:10 -04:00
Mike Salvatore
8939ca2106
UT: Extract open_error_flask_client into conftest.py
2022-06-21 09:11:10 -04:00
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
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