Commit Graph

6293 Commits

Author SHA1 Message Date
Mike Salvatore 60a1e79179 Island: Remove config_passwords from report
Work being done in issue #1965 makes including config_passwords in the
report unnecessary.
2022-07-14 07:24:29 -04:00
Mike Salvatore 521396ff81 Island: Remove config_users from report
Work being done in issue #1965 makes including config_users in the
report unnecessary.
2022-07-14 07:22:24 -04:00
Mike Salvatore ac704471d3
Merge pull request #2087 from guardicore/1662-remove-configservice-from-pba-resource
1662 remove configservice from pba resource
2022-07-14 07:20:39 -04:00
Mike Salvatore d7a2a35c46 Island: Simplify a loop in get_config_exploits() 2022-07-14 07:12:08 -04:00
Mike Salvatore a979a372fc Island: Rename _is_target_os_supported -> _target_os_is_unsupported 2022-07-14 06:55:25 -04:00
Shreya Malviya 360b438f62 Island: Remove ConfigService (cc/services/config.py) 2022-07-14 15:09:08 +05:30
Shreya Malviya 68a7085ede UT: Add placeholder argument to function call in test_process_post_breach_telemetry 2022-07-14 14:49:11 +05:30
Shreya Malviya d6bd84ad66 Common: Remove unused config value path INACCESSIBLE_SUBNETS_PATH 2022-07-14 14:45:23 +05:30
Shreya Malviya 02a06787d0 Island: Remove monkey/monkey_island/cc/services/configuration/ 2022-07-14 14:45:17 +05:30
Shreya Malviya d534c64a3f Island: Use agent configuration in remaining ZT segmentation check function to get inaccessible subnets 2022-07-14 14:25:01 +05:30
Shreya Malviya 45151e7e19 Island: Modify scan telemetry processing function to accept agent configuration 2022-07-14 14:24:10 +05:30
Shreya Malviya df6296fc6b Island: Use agent configuration in ZT segmentation check to get inaccessible subnets 2022-07-14 14:20:40 +05:30
Shreya Malviya 8daa6db81f Island: Modify all telemetry processing functions to accept an extra agent configuration argument 2022-07-14 14:18:38 +05:30
Shreya Malviya c70627c74b Island: Pass agent configuration to telemetry processing function in Telemetry resource 2022-07-14 14:16:19 +05:30
Shreya Malviya 093e6fa3a6 Island: Add init and IAgentConfigurationRepository dependency to Telemetry resource 2022-07-14 14:14:33 +05:30
vakarisz e525fbe330 UI: Fix PropagationConfig.tsx to save state between tabs 2022-07-14 11:14:21 +03:00
Shreya Malviya b237d258e5 Island: Use AgentConfiguration to get inaccessible subnets in ReportService 2022-07-14 13:39:33 +05:30
VakarisZ c5dfd9c3e6
Merge pull request #2086 from guardicore/repository-service-clear-simulation-data
Repository service clear simulation data
2022-07-14 09:46:09 +03:00
Mike Salvatore 6e60722adc Island: Remove unlock() and reset_key() from RepositoryService
These two methods violate SRP and ISP.
2022-07-13 19:35:19 -04:00
Mike Salvatore e48e2cb9af UT: Add typehints to test_pba_file_upload.py 2022-07-13 15:08:34 -04:00
Mike Salvatore 9c7bf6c8b5 Island: Use HTTPStatus Enum in PBA FileUpload resource 2022-07-13 15:08:34 -04:00
Mike Salvatore 0d45c5fb3e Island: Add notes and comments to PBA FileUpload resource 2022-07-13 15:08:34 -04:00
Mike Salvatore 2e7bcd54df Island: Remove ConfigService from PBA FileUpload resource 2022-07-13 15:08:34 -04:00
Mike Salvatore b4ced896b6 UT: Improve formatting in test_pba_file_upload_endpoint() 2022-07-13 15:08:34 -04:00
Mike Salvatore 57b97d09f4 Common: Remove disused EXPLOITER_CLASSES_PATH 2022-07-13 15:05:47 -04:00
Mike Salvatore 4fd5f0a8a5 Island: Use ICredentialsRepository to get configured passwords 2022-07-13 15:04:49 -04:00
Mike Salvatore e349a78334 Island: Fix string/bytes bug in StringListEncryptor
For some reason, bytes objects do not come out of mongo the same way
they go in. This class will be removed when reporting is reworked, so
rather than spend the time on figuring out exactly what's going on, just
use strings.
2022-07-13 14:59:27 -04:00
Mike Salvatore e1c5972ccc Island: Use ICredentialsRepository to get configured usernames 2022-07-13 14:02:30 -04:00
Mike Salvatore 65686190dd Island: Use AgentConfiguration to get configured exploiters 2022-07-13 13:20:42 -04:00
Mike Salvatore 46a71ff8f1 Island: Remove "default" exploits display in report
I'm not sure why this decision was made. It seems to me you'd always
want to display which exploiters were enabled during the simulation.
Telling me it was "default" means I need to go look up what the defaults
are in order to understand the report.
2022-07-13 13:20:42 -04:00
Mike Salvatore db4520af50 Common: Remove disused network scan paths from config_value_paths.py 2022-07-13 13:20:42 -04:00
Mike Salvatore 91a65ee58c Island: Use AgentConfiguration to get network scan settings 2022-07-13 13:20:41 -04:00
Mike Salvatore 16c95e05ec UT: Remove unused conftest.py 2022-07-13 12:42:02 -04:00
Mike Salvatore b30112562a UT: Remove unused conftest.py 2022-07-13 12:39:30 -04:00
Mike Salvatore 2074c37081 Merge branch '1662-repository-service' into develop
PR #2085
2022-07-13 11:58:42 -04:00
Mike Salvatore 6ca09d5c94 Island: Use RepositoryService in ClearSimulationData resource 2022-07-13 11:25:18 -04:00
Mike Salvatore fcff724eaa Island: Implement RepositoryService.clear_simulation_data() 2022-07-13 11:25:00 -04:00
Mike Salvatore 37885b786f UT: Add missing type hints to test_repository_service 2022-07-13 11:09:46 -04:00
Mike Salvatore 28b01a0d0e UI: Remove superseded calls to remove PBA files
These calls were made unnecessary by 826d409d.
2022-07-13 10:48:50 -04:00
Mike Salvatore 33e68979d9 UT: Fix copy/paste error
Co-authored-by: VakarisZ <36815064+VakarisZ@users.noreply.github.com>
2022-07-13 10:38:50 -04:00
Mike Salvatore 45a52077a0 Island: Remove disused ConfigService.init_config() 2022-07-13 10:33:55 -04:00
Mike Salvatore fe9cc86d8b Island: Remove disused PostBreachFilesService 2022-07-13 10:33:15 -04:00
Mike Salvatore 70b404b9f5 Island: Remove the Database service's dependency on ConfigService 2022-07-13 10:33:13 -04:00
Mike Salvatore 2940cc51e8
Merge pull request #2084 from guardicore/1965-delete-configured-creds-on-config-reset
Use DELETE /api/propagation-credentials/configured-credentials
2022-07-13 09:46:42 -04:00
Shreya Malviya cc17a57e20 UI: Extract URL to constant in ConfigurePage.js 2022-07-13 19:06:48 +05:30
Mike Salvatore 738d4ef3e1 Island: Register the RepositoryService with the DI container 2022-07-13 09:36:06 -04:00
Mike Salvatore 826d409dd2 Island: Use RepositoryService in ResetAgentConfiguration resource 2022-07-13 09:36:06 -04:00
Mike Salvatore 5283864c09 Island: Raise NotImplementedError in RepositoryService
This class is still under development.
2022-07-13 09:36:06 -04:00
Mike Salvatore 726f2bbaa2 Island: Implement RepositoryService.reset_agent_configuration() 2022-07-13 09:36:06 -04:00
Mike Salvatore a4b8c94480 Island: Add empty RepositoryService 2022-07-13 09:36:06 -04:00
Mike Salvatore a1b617cda3 UT: Remove disused monkey_configs/flat_config.json 2022-07-13 09:36:06 -04:00
Mike Salvatore dbb8a5535a UT: Remove disused load_monkey_config() fixture 2022-07-13 09:36:06 -04:00
Mike Salvatore 3f428b1555 UT: Remove disused flat_monkey_config() fixture 2022-07-13 09:36:03 -04:00
Shreya Malviya 060250e021 UI: Fix formatting in ConfigurePage.js for consistency 2022-07-13 19:04:57 +05:30
Ilija Lazoroski 891041d15b TEMP 2022-07-13 15:33:34 +02:00
Shreya Malviya 6eed07dd36 UI: Clear configured credentials on configuration reset 2022-07-13 19:00:11 +05:30
Shreya Malviya 1e9d193a6d UI: Clear configured credentials on Island reset 2022-07-13 18:54:13 +05:30
Mike Salvatore c90c8654dd Island: Remote T1216_random_executable.exe
This file should have been removed in 8b39a789.
2022-07-13 09:22:57 -04:00
Mike Salvatore ef25dd936b Island: Remove {to,from}_json_array()
It turns out nothing needs these functions. VakarisZ was right.
2022-07-13 06:50:21 -04:00
Mike Salvatore a9799de1ba Island: Remove extra ')' from strings 2022-07-13 06:07:08 -04:00
Mike Salvatore fe7188798f Island: Add note about encryption decorator in
MongoCredentialsRepository
2022-07-13 06:04:12 -04:00
Mike Salvatore cee52ab12c Island: Encrypt credentials in MongoCredentialsRepository 2022-07-13 06:04:10 -04:00
Ilija Lazoroski 4240ea02ef Island: Add credentials to the UiSchema 2022-07-12 18:27:23 +02:00
Ilija Lazoroski 457a70390c UI: Render PropagationConfig on Propagation tab 2022-07-12 18:26:17 +02:00
Ilija Lazoroski f8e4c5cddc UI: Add credentials json schema 2022-07-12 18:25:42 +02:00
Ilija Lazoroski f5e026ff85 UI: Add PropagationConfig component 2022-07-12 18:25:05 +02:00
Mike Salvatore bdee3b9d8a UT: Improve formatting of test_mongo_credentials_repository.py 2022-07-12 11:57:30 -04:00
Mike Salvatore eac318ada0 Island: Rename _user_datastore -> user_repository 2022-07-12 11:26:48 -04:00
Mike Salvatore e8ebe845bf Island: Register RepositoryEncryptor with the DIContainer 2022-07-12 11:25:48 -04:00
Mike Salvatore eaddcdcf13 Island: Unlock RepositoryEncryptor in AuthenticationService 2022-07-12 11:25:00 -04:00
Mike Salvatore a20a7710aa Island: Use HTTPStatus Enum in registration resource 2022-07-12 09:55:33 -04:00
Mike Salvatore 6f2a750a13 Island: Use HTTPStatus Enum in Authenticate resource 2022-07-12 09:55:11 -04:00
Mike Salvatore 93deaebff3
Merge pull request #2080 from guardicore/1965-stateful-authentication-service
1965 stateful authentication service
2022-07-12 09:50:12 -04:00
Mike Salvatore 5fe232aaa1
Merge pull request #2079 from guardicore/1965-credential-serialization
1965 credential serialization
2022-07-12 09:40:24 -04:00
vakarisz 897221e47a Island: Add return type to the APIEncoder.default 2022-07-12 16:32:47 +03:00
Mike Salvatore 82d894f0c9 Island: Remove unnecessary services.authentication subpackage 2022-07-12 09:14:52 -04:00
Mike Salvatore c1a9ad1e6f Island: Move JSONFileUserRepository to the repository package 2022-07-12 09:14:52 -04:00
Mike Salvatore 735514d61f Island: Rename UserCreds -> UserCredentials 2022-07-12 09:14:52 -04:00
Mike Salvatore 8608b05c46 Island: Move UserCreds to models package 2022-07-12 09:14:49 -04:00
vakarisz 88c331d932 UT: Rename BogusClass to BogusSerializableClass 2022-07-12 16:13:18 +03:00
vakarisz 18a7a4ec1a Island: Add typehints to APIEncoder 2022-07-12 16:12:13 +03:00
vakarisz ba9dda8d10 UT: Add IJSONSerializable to representations test 2022-07-12 16:11:21 +03:00
vakarisz d84382c7ac UI: Fix bugs in ImportConfigModal and ImportConfigModal 2022-07-12 15:50:06 +03:00
Mike Salvatore 292887baf8 Island: Move IUserRepository to repository/ package 2022-07-12 08:14:41 -04:00
Mike Salvatore 7c98ca0004 Island: Rename JsonFileUserDatastore -> JSONFileUserRepository 2022-07-12 08:09:01 -04:00
Mike Salvatore 50d08c3aef Island: Rename IUserDatastore -> IUserRepository 2022-07-12 08:07:00 -04:00
Mike Salvatore 96a7968565 Island: Make AuthenticationService explicitly stateful 2022-07-12 08:04:01 -04:00
vakarisz 4357251394 Island: Fix representations to not do nested json 2022-07-12 14:59:31 +03:00
Mike Salvatore fb1a3bcd74 Island: Use HTTPStatus enum in new endpoints 2022-07-12 06:52:44 -04:00
vakarisz f1e00dd3ee Island: Simplify propagation credentials get return 2022-07-12 13:48:20 +03:00
vakarisz 43387dc1a5 Common: Use IJSONSerializable interface for credentials 2022-07-12 13:48:20 +03:00
vakarisz 4bbcffabd3 Island: Refactor representations.py to extend JSON encoder 2022-07-12 13:48:20 +03:00
vakarisz 3958ad3e92 Common: Add IJSONSerializable interface 2022-07-12 13:48:20 +03:00
Mike Salvatore 774b2c0116
Merge pull request #2073 from guardicore/1965-credential-endpoints
1965 credential endpoints
2022-07-12 06:45:39 -04:00
Mike Salvatore d2e4fe6136 UT: Break up large unit test into smaller tests 2022-07-12 06:44:16 -04:00
vakarisz bcd94773a0 Island: Add a check for unimplemented credential collections 2022-07-12 13:33:37 +03:00
Mike Salvatore 69d513b136
Merge pull request #2078 from guardicore/1965-repository-encryptor
1965 repository encryptor
2022-07-12 06:31:18 -04:00
vakarisz a9e2dd2d3d Island: Use collection url placeholder for propagation credentials 2022-07-12 12:39:16 +03:00
Mike Salvatore 75f3fb02ee Island: Remove dependency from ILockableEncryptor -> IEncryptor
ILockableEncryptor adds additional constraints on when encrypt() or
decrypt() can be used. If ILockableEncryptor inherits from IEncryptor,
it will violate the Liskov Substitution Principle
2022-07-11 15:07:16 -04:00
Mike Salvatore 037e6619dd UT: Remove disused StubPropagationCredentialsRepository 2022-07-11 14:58:22 -04:00
Mike Salvatore db74ea013d Island: Remove unnecessary resources/credentials subpackage 2022-07-11 14:58:21 -04:00
Mike Salvatore 7b1b9053e4 Island: Combine PropCredentials and ConfiguredPropagationCredentials 2022-07-11 14:53:36 -04:00
Mike Salvatore a684b12dc3 Island: Combine PropagationCredentials and StolenPropagationCredentials 2022-07-11 14:31:04 -04:00
Mike Salvatore 4a4c4324fb UT: Add more propagation credentials 2022-07-11 14:13:24 -04:00
Mike Salvatore 1af21b372c UT: Move PROPAGATION_CREDENTIALS into data_for_tests 2022-07-11 14:10:42 -04:00
Mike Salvatore aaf1009504 UT: Add InMemoryCredentialsRepository 2022-07-11 13:54:06 -04:00
Mike Salvatore 2a2ab52da1 Island: Remove monkey_guid from StubPropagationCredentialsRepository 2022-07-11 13:30:14 -04:00
vakarisz d437f02544 UT: Add stolen and configured credentials endpoint tests 2022-07-11 13:14:41 -04:00
vakarisz c5ba5d444d Island: Add returns to the post and get credential resources 2022-07-11 13:09:06 -04:00
vakarisz 872d062649 Island: Move propagation_credentials.py to credentials dir 2022-07-11 13:09:06 -04:00
vakarisz 0d06f8fd00 Island: Remove unnecessary comments in credentials 2022-07-11 13:09:06 -04:00
vakarisz 90b8b3fc4e Island: Add StolenPropagationCredentials resource 2022-07-11 13:09:06 -04:00
vakarisz e8cd88420b Island: Add ConfiguredPropagationCredentials resource 2022-07-11 13:09:06 -04:00
Mike Salvatore bda661c7ae
Merge pull request #2077 from guardicore/1965-modify-telemetry-processor
1965 modify telemetry processor
2022-07-11 12:30:28 -04:00
Mike Salvatore d6655a8e2c UT: Mark RepositoryEncryptor tests as slow 2022-07-11 12:27:19 -04:00
Mike Salvatore 1dba0639c5
Merge pull request #2076 from guardicore/fix-json-representations
Fix json representations
2022-07-11 12:22:50 -04:00
Ilija Lazoroski 9f060a2dd9 Island: Remove config credentials adders 2022-07-11 17:54:08 +02:00
Mike Salvatore faf9cba182 Island: Add ResetKeyError 2022-07-11 11:53:07 -04:00
Ilija Lazoroski d477dc0197 Island: Remove separate credentials telemetry parser 2022-07-11 17:50:23 +02:00
Mike Salvatore e362875201 Island: Fix incomplete logic in RepositoryEncrypto.reset_key() 2022-07-11 11:38:23 -04:00
Ilija Lazoroski e816f80846 Island: Resolve CredentialsParser in DI
* It also changes telemetry processing functions to use
CredentialsParser object. This will be refactored!
2022-07-11 17:25:21 +02:00
Ilija Lazoroski 9d904fa981 Island: Add None as telemetry processing func for Credentials 2022-07-11 17:24:20 +02:00
Ilija Lazoroski 2ad2d94746 Island: Remove from_credentials in StolenCredentials model 2022-07-11 17:22:55 +02:00
Mike Salvatore 5c65d581b5 Island: Add UnlockError 2022-07-11 11:21:43 -04:00
Ilija Lazoroski e5702032d9 Island: Use ICredentialsRepository in credentials telemetry processing 2022-07-11 17:21:39 +02:00
Mike Salvatore 0356596a41 Island: Add ILockableEncryptor.reset_key() 2022-07-11 11:05:47 -04:00
Mike Salvatore 92c9ad3c71 Island: Add note to DataStoreEncryptor 2022-07-11 10:53:49 -04:00
Mike Salvatore c7257cf000 Island: Add RepositoryEncryptor 2022-07-11 10:53:49 -04:00
Mike Salvatore bd2d79fd43 Island: Add ILockableEncryptor 2022-07-11 10:53:47 -04:00
Mike Salvatore 54c1eef309 Island: Make IEncryptor interface consistent
An IEncryptor could take Any type and encrypt it, returning Any other
type. This is a poorly defined interface and, IIRC, it was defined this
way so some encryptors could take strings and others could take bytes.

This commit modifies the interface so that it accepts and returns bytes
in all cases. If a string encryptor is needed for convenience, we can
add IStringEncryptor and write a decorator that wraps IEncryptors.
2022-07-11 10:01:37 -04:00
vakarisz 33f15ff297 UT: Rename mock to bogus in test_representations.py 2022-07-11 16:55:13 +03:00
vakarisz fe6e3d75b5 Island, UT: Handle tuples in representations.py 2022-07-11 16:53:43 +03:00
Mike Salvatore f7e632025f Island: Reformat IEncryptor docstrings 2022-07-11 09:29:02 -04:00
Mike Salvatore a733886365
Merge pull request #2075 from guardicore/1965-mongo-credentials-repository
1965 mongo credentials repository
2022-07-11 09:28:00 -04:00
Ilija Lazoroski ae3357a1b6 UT: Remove removal of collection in MongoCredentialsRepository 2022-07-11 15:09:10 +02:00
Ilija Lazoroski 4dd4b38fc9 UT: Use Credentials object instead of dict in MongoCredentialsRepository 2022-07-11 15:04:29 +02:00
Mike Salvatore 14cbf07a21 Island: Register mongo client as instance, not convention 2022-07-11 09:02:57 -04:00
vakarisz da9f3c97ed Island: Fix representations.py to encode lists and objects
Previously lists and objects didn't get encoded. This forced explicit encoding on the endpoints, which is not necessary
2022-07-11 15:44:27 +03:00
Ilija Lazoroski b7786e2d0a Island: Register mongo client in DI container 2022-07-11 14:24:57 +02:00
Mike Salvatore 0bddef7078 Island: Add pymongo as an explicit dependency 2022-07-11 08:10:58 -04:00
Mike Salvatore 088ec94269 Island: Rename _delete_collection -> _remove_credentials_fom_collection 2022-07-11 08:02:20 -04:00
Mike Salvatore 8a7e89e733 Common: Fix minor grammar mistake 2022-07-11 07:58:18 -04:00
Ilija Lazoroski efb12df483 Island: Build MongoCredentialsRepository with a mongo connection 2022-07-11 12:41:23 +02:00
Ilija Lazoroski 1b1bd7fcc2 UT: Use mongomock in MongoCredentialsRepository 2022-07-11 12:26:00 +02:00
Ilija Lazoroski 4226cb5b9e Island: Move error handling to private methods in
MongoCredentialsRepository
2022-07-11 12:25:08 +02:00
Ilija Lazoroski c48b38fb01 Island: Refactor MongoCredentialsRepository
* Remove code duplication
* Init with PyMongo object
2022-07-08 19:20:25 +02:00
Ilija Lazoroski c808d50948 Island: Add note to fix duplication of Credentials in database 2022-07-08 17:50:18 +02:00
Ilija Lazoroski 45a6693263 Island: Register MongoCredentialsRepository in DI container 2022-07-08 17:34:45 +02:00
Ilija Lazoroski 8ff8ad1f17 Island: Modify MongoCredentialsRepository 2022-07-08 17:32:28 +02:00
Ilija Lazoroski 7062aaf261 Common: Add to_mapping in Credentials 2022-07-08 17:26:23 +02:00
Mike Salvatore cd839884eb
Merge pull request #2070 from guardicore/2003-remove-unused-endpoints
2003 remove unused endpoints
2022-07-08 09:12:12 -04:00
Mike Salvatore 3f04aaa383
Merge pull request #2068 from guardicore/1965-deserialize-credentials-array
1965 deserialize credentials array
2022-07-08 08:33:14 -04:00
vakarisz 475f6bc567 Island: Remove outdated "island_configuration" endpoints 2022-07-08 15:16:59 +03:00
VakarisZ 62f6a7a1a8
Merge pull request #2069 from guardicore/2003-retrieve-submit-config
2003 retrieve submit config
2022-07-08 15:10:38 +03:00
Mike Salvatore cec2962fe3 Island: Remove unused import in ClearSimulationData 2022-07-08 07:52:45 -04:00
vakarisz fde719ce94 UI: Remove last unused method, improve style 2022-07-08 14:41:24 +03:00
vakarisz 50540da780 UI: Remove renderUnsafeAttackOptionsWarningModal from ConfigurePage
Nothing was using this function
2022-07-08 12:16:30 +03:00
vakarisz bac091f185 UI: Remove renderAttackAlertModal from ConfigurePage.js
Nothing was using this function
2022-07-08 12:14:22 +03:00
vakarisz efe77e2150 UI: Remove userChangedConfig from ConfigurePage.js
Nothing was using this function
2022-07-08 12:12:24 +03:00
vakarisz ef8d52b96f UI: Fix error in ConfigurePage.js after refresh of the page 2022-07-08 12:04:43 +03:00
vakarisz 5a52ceaa4c UI: Reset last action on in ConfigurePage.js
Last action, like "Configuration was reset successfully" shouldn't linger in the page for long. It should reset upon modifying the configuration or changing the tab
2022-07-08 12:04:43 +03:00
vakarisz 6725b01342 UI: Adjust config page to use new reset endpoint 2022-07-08 12:04:43 +03:00
vakarisz d1b586d260 UI: Adjust config to interact with new agent-configuration endpoint
Submit, export and import were adjusted to match and reformat config.
2022-07-08 12:04:43 +03:00
vakarisz 30f122dfc3 UI: Use updated configuration endpoint in ConfigurePage.js 2022-07-08 12:04:43 +03:00
vakarisz c8ed409e9e Island: Change agent_configuration.py POST to parse from json 2022-07-08 12:04:43 +03:00
Mike Salvatore 77143ee765 Island: Use common.credentials.Credentials in resource 2022-07-07 15:35:56 -04:00
Mike Salvatore 938aec9d49 Island: Reorder repository/__init.py
Group the interfaces and implementations together to make it easier to
understand what functionality has been implemented so far.
2022-07-07 15:27:38 -04:00
Mike Salvatore d0cb0d63cc Island: Export MongoCredentialsRepository from repository package 2022-07-07 15:27:38 -04:00
Mike Salvatore 7bcf49daf9 Island: Modify ICredentialsRepository to save a Sequence of Credentials 2022-07-07 15:27:38 -04:00
Ilija Lazoroski 68fe2edd08 Island: Init MongoCredentialsRepository 2022-07-07 15:27:38 -04:00
Mike Salvatore 4edb4f6971 Common: Add Credentials.to_json_array() 2022-07-07 15:26:17 -04:00
Mike Salvatore 6bd0e7dc3a Common: Add doctrings for Credential serialization 2022-07-07 15:08:17 -04:00
Mike Salvatore 4d753a808b Common: Add Credentials.from_json_array() 2022-07-07 14:58:07 -04:00
Mike Salvatore 1ab190cd2a
Merge pull request #2065 from guardicore/1965-modify-clear-simulation-data
Modify /api/clear-simulation-data to clear stolen credentials
2022-07-07 12:56:50 -04:00
Mike Salvatore bd810440af Island: Remove unnecessary error handling
Flask automatically catches exceptions and returns a 500 response, so
there's no need to add extra code to do this.
2022-07-07 12:55:46 -04:00
Mike Salvatore 402a5f5860
Merge pull request #2067 from guardicore/1965-credentials-serialization
1965 credentials serialization
2022-07-07 11:31:41 -04:00
Mike Salvatore 5211045194 Common: Reformat docstring for del_key() 2022-07-07 11:30:05 -04:00
Mike Salvatore d0fa9a7dcf Common: Use the imperative in del_key() docstring 2022-07-07 11:29:08 -04:00
Mike Salvatore 08bb49af0f Common: Add ssh-key-regex note to TODO 2022-07-07 11:25:33 -04:00
Shreya Malviya d16b3e6bef Island: Update HTTP status code when RemovalError is encountered in ClearSimulationData 2022-07-07 08:22:52 -07:00
Mike Salvatore e921f90e00 Agent: Use Credentials.to_json() for CredentialsTelem serialization 2022-07-07 09:15:01 -04:00
Mike Salvatore 9ea0fb87ea Common: Raise InvalidCredentialComponentError from Credentials 2022-07-07 08:52:33 -04:00
Mike Salvatore 06fc4aaad6 Common: Catch MarshmallowError instead of Exception 2022-07-07 08:47:41 -04:00
Mike Salvatore 6bb6aa5250 Common: Remove INVALID_CONFIGURATION_ERROR_MESSAGE 2022-07-07 08:39:46 -04:00
Mike Salvatore a18eb1cb73 Common: Add error trapping to Credentials deserialization 2022-07-07 08:31:53 -04:00
Mike Salvatore 3f61ddd584 Common: Fix type hints in credentials.py 2022-07-07 07:48:54 -04:00
Mike Salvatore e76d72e07e Common: Remove NOOP assignment 2022-07-07 07:45:44 -04:00
Mike Salvatore 907b35990d Common: Fix COMPINENT -> COMPONENT 2022-07-07 07:45:28 -04:00
Mike Salvatore 008428e318 Common: Fix type hints in credentials.py 2022-07-07 07:43:12 -04:00
Mike Salvatore c58d26a5e4 Common: Clean up credentials.py 2022-07-07 07:35:34 -04:00
Ilija Lazoroski f806f848fa UT: Return a list in Propagation Credentials
* Add TODOs to change to Credentials from common.credentials
2022-07-07 10:48:13 +02:00
Ilija Lazoroski af1ab34aa3 Island: Return a list in Propagation Credentials endpoint 2022-07-07 10:48:12 +02:00
Ilija Lazoroski 777897cb74 UT: Compare actual propagation credentials vs expected 2022-07-07 10:48:12 +02:00
Ilija Lazoroski 794277797b UT: Rename PropagationCredentialsRepository to
StubPropagationCredentialsRepository
2022-07-07 10:48:12 +02:00
Ilija Lazoroski a27edfa94b UT: Add test for GET propagation credentials 2022-07-07 10:48:12 +02:00
Ilija Lazoroski dda5e37764 Island: Remove unneeded function from ConfigService
* get_flat_config
* get_config_propagation_credentials_from_flat_config
2022-07-07 10:47:54 +02:00
Ilija Lazoroski dc1eb5f12c Island: Use ICredentialsRepository to retrieve propagation credentials 2022-07-07 10:39:47 +02:00
Ilija Lazoroski 45b2558ddd Island: Import ICredentialsRepository from __init__ 2022-07-07 10:39:47 +02:00
Shreya Malviya e34bb760e3 Island: Remove stolen credentials when clearing simulation data 2022-07-06 22:14:44 -07:00
Mike Salvatore e4d38631b8 Common: Serialize/Deserialize Credentials 2022-07-06 20:45:49 -04:00