Ilija Lazoroski
2cb6c60866
UT: Fix credentials intercepting telemetry messenger tests
2022-07-18 11:47:49 +02:00
Ilija Lazoroski
0f2fc0902f
Agent: Simplify credentials object in aggregating credentials store
2022-07-18 11:32:12 +02:00
Ilija Lazoroski
f421f42604
Agent: Simplify credentials in ssh credentials collector
2022-07-18 11:32:12 +02:00
Mike Salvatore
213b161d1a
Common: Fix type hints in credentials.py
2022-07-15 12:34:42 -04:00
Mike Salvatore
62ce91b59b
Common: Prevent invalid Credentials objects from being constructed
2022-07-15 12:19:12 -04:00
Mike Salvatore
19a720898e
Island: Handle encryption/decryption of None credential components
2022-07-15 11:36:07 -04:00
Mike Salvatore
2af713dabd
Common: Allow identities or secrets to be None
...
It's possible that credentials are stolen and an identity/secret
association can not be made. For example, a list of usernames can be
acquired by `ls /home`, but no passwords will be retrieved this way.
Credentials(identity=Username("username"), secret=None) will represent
this case.
2022-07-15 10:50:25 -04:00
Mike Salvatore
e3b23993fa
Common: Add type hints to dicts in credentials.py
2022-07-15 10:44:14 -04:00
Mike Salvatore
63731b8334
UT: Test identity/password combos in test_credentials.py
2022-07-15 10:44:14 -04:00
Mike Salvatore
fb11c29208
UT: Use nested comprehension in get_all_collections_in_mongo()
2022-07-15 10:44:14 -04:00
Mike Salvatore
3f20b71d25
UT: Simplify Credentials tests
2022-07-15 10:44:14 -04:00
Mike Salvatore
bd0425beb8
UT: Add missing __init__.py to tests/data_for_tests/
2022-07-15 10:44:14 -04:00
Mike Salvatore
febec2ecef
UT: Use all caps for constants in propagation_credentials.py
2022-07-15 10:44:14 -04:00
Mike Salvatore
424022d58a
UT: Remove unused constants from test_mongo_credentials_repository
2022-07-15 10:44:14 -04:00
Mike Salvatore
7bf80946ba
UT: Rename test propagation credentials
2022-07-15 10:44:14 -04:00
Mike Salvatore
e9dc8d88e7
UT: Improve code quality of credentials encryption/decryption tests
2022-07-15 10:44:11 -04:00
Mike Salvatore
52f5e70812
Island: Add new locking test for RepositoryEncryptor
2022-07-15 07:52:36 -04:00
Mike Salvatore
3c4883b304
Merge pull request #2082 from guardicore/1965-add-credentials-ui-form
...
1965 add credentials UI form
2022-07-15 07:47:22 -04:00
vakarisz
ec9a654fdf
UI: Fix style problems in minor components
2022-07-15 11:20:14 +03:00
vakarisz
77b24ba7a6
UI: Fix a typo in credentials.js
2022-07-15 11:02:26 +03:00
Mike Salvatore
0687b010ff
Island: Improve code quality of credentials encryption/decryption
2022-07-14 14:29:06 -04:00
Mike Salvatore
add6ca3941
Island: Use new Credentials object in MongoCredentialsRepository
2022-07-14 13:32:16 -04:00
Mike Salvatore
04d72c0d36
UT: Use new Credentials object in test_credential_telem_send()
2022-07-14 13:11:45 -04:00
Mike Salvatore
2b245b34cb
Island: Simplify Credentials
...
Storing a sequence of identities and secrets in Credentials objects
added a lot of complication. From now on, a Credentials object consists
of one identity and one secret. See #2072 .
2022-07-14 13:10:24 -04:00
Mike Salvatore
3909dca4c9
Island: Pass special logger to WSGIServer
2022-07-14 11:19:17 -04:00
Mike Salvatore
52bc877f86
Island: Add PyWSGILoggingFilter
2022-07-14 11:19:16 -04:00
Mike Salvatore
bdd432fab6
Island: Reformat docstring for setup_logging()
2022-07-14 11:11:38 -04:00
Mike Salvatore
771b9e05c2
Island: Add type hints to setup_logging()
2022-07-14 11:11:38 -04:00
Mike Salvatore
12643706b1
Island: Treat data_dir like a path in setup_logging()
2022-07-14 11:11:35 -04:00
vakarisz
d2c8065163
UI: Adjust safe option validation to new schema
2022-07-14 17:37:57 +03:00
vakarisz
138a065d75
UI: Remove float format from schema
...
There is no such format and ui throws warnings
2022-07-14 17:20:26 +03:00
vakarisz
1445bcf4ad
UI: Reorganize and simplify configuration schema
2022-07-14 17:05:54 +03:00
vakarisz
efbc1d3860
UI: Change PropagationConfig.tsx to use more trivial config schema
2022-07-14 16:54:43 +03:00
vakarisz
a721508be2
UI: Remove unnecessary console log in ConfigurePage.js
2022-07-14 15:19:27 +03:00
vakarisz
c0ecaa0096
UI: Simplify AdvancedMultiSelect.js
...
AdvancedMultiSelect.js no longer needs to pull data from definitions since we no longer need the definitions in schema
2022-07-14 15:18:21 +03:00
Mike Salvatore
d11c8bfdbc
Island: Remove disused config_key in technique_reports
2022-07-14 08:03:27 -04:00
Mike Salvatore
792d1f2e4d
Island: Remove disused field_encryptors subpackage
2022-07-14 08:00:39 -04:00
Mike Salvatore
de0e604518
Island: Remove disused IFieldEncryptor
2022-07-14 07:59:59 -04:00
Mike Salvatore
9639acffa5
Island: Remove disused StringEncryptor
2022-07-14 07:59:13 -04:00
Mike Salvatore
86ce7f2cf9
Island: Remove disused dict_encryptor
2022-07-14 07:59:11 -04:00
Mike Salvatore
80f2dfd590
Island: Ignore unused is_island
2022-07-14 07:55:36 -04:00
Mike Salvatore
5209d6982a
Common: Remove disused config_value_paths.py
2022-07-14 07:53:34 -04:00
Mike Salvatore
c57672b9ae
Merge pull request #2090 from guardicore/1662-remove-configservice
...
Remove ConfigService
2022-07-14 07:52:06 -04:00
Mike Salvatore
6b94d5c04a
Merge pull request #2089 from guardicore/1662-remove-configservice-from-utils
...
Remove `services/configuration/utils.py`, use AgentConfiguration
2022-07-14 07:51:33 -04:00
Mike Salvatore
753970f644
Merge pull request #2088 from guardicore/1662-remove-configservice-from-reportservice
...
1662 remove configservice from reportservice
2022-07-14 07:51:04 -04:00
Mike Salvatore
dc73b11f6f
Merge pull request #2091 from guardicore/create-init-files
...
Create `__init__.py` files for proper code coverage
2022-07-14 07:36:42 -04:00
Mike Salvatore
ea1414d0b5
Island: Remove encryption from report_dal.py
...
Since passwords were removed from the report in 60a1e791
, there's no
need to encrypt any data in the report.
2022-07-14 07:28:53 -04:00
Mike Salvatore
7760520cc8
Island: Remove disused StringListEncryptor
2022-07-14 07:27:47 -04:00
Shreya Malviya
4bd90505c2
Island: Add __init__.py files to all source code directories for proper code coverage results
2022-07-14 16:56:04 +05:30
Shreya Malviya
a2677a1a0e
Agent: Add __init__.py files to all source code directories for proper code coverage results
2022-07-14 16:55:47 +05:30
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