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
Mike Salvatore
82ce091063
Common: Export InvalidCredentialComponent from common.credentials
2022-07-06 19:32:18 -04:00
Mike Salvatore
d3859debbe
UT: Use valid NTLM hashes in test_mimikatz_collector.py
2022-07-06 19:28:36 -04:00
Mike Salvatore
82fb693f06
Common: Simplify raising of InvalidConfigurationError
2022-07-06 16:03:12 -04:00
Mike Salvatore
92416cb079
Common: Add validation to LMHash and NTHash
2022-07-06 16:02:31 -04:00
Mike Salvatore
0d477cef7c
Common: Add SSHKeypairSchema
2022-07-06 12:32:11 -04:00
Mike Salvatore
e92de42da9
UT: Use dict for key,value in credential components tests
...
The SSHKeypair credential component has two fields (public, private),
not just a single value. This commit modifies the tests to be able to
support credential components with multiple fields.
2022-07-06 12:27:39 -04:00
Mike Salvatore
58fcc3761c
UT: Add NTHashSchema
2022-07-06 12:07:44 -04:00
Mike Salvatore
def2381da6
Common: Add LMHashSchema
2022-07-06 12:02:49 -04:00
Mike Salvatore
68e52eb512
Common: Add ntlm_hash_validator
2022-07-06 12:02:25 -04:00
Mike Salvatore
031fce9fd8
UT: Add test_invalid_values()
2022-07-06 11:50:54 -04:00
Mike Salvatore
be9889c9d1
UT: Use parametrization to remove duplicate credential component tests
2022-07-06 11:31:24 -04:00
Mike Salvatore
9a45d777ca
Common: Add CredentialTypeField
2022-07-06 11:07:46 -04:00
Mike Salvatore
a8747c9d5d
Common: Add CredentialComponentSchema
...
Extract common _strip_credential_type() post_load function from
PasswordSchema and UsernameSchema into a parent class.
2022-07-06 11:02:07 -04:00
Mike Salvatore
037b4ef8c5
Common: Add UsernameSchema
2022-07-06 10:52:13 -04:00
Mike Salvatore
0b887a2704
UT: Add unit_tests/common/credentials/__init__.py
2022-07-06 10:48:44 -04:00
Mike Salvatore
0be43157cf
Common: Add PasswordSchema
2022-07-06 10:46:05 -04:00
Ilija Lazoroski
439b4aca86
Island: Reformat ConfigService using black
2022-07-06 16:43:52 +02:00
Ilija Lazoroski
bbf40e446f
Island: Remove default_config and validator function from ConfigService
2022-07-06 16:05:42 +02:00
Ilija Lazoroski
0cb8cfb078
Island: Remove typographic symbols
2022-07-06 16:05:42 +02:00
Ilija Lazoroski
9f0029d040
Common: Remove credential collector names and validation formats
2022-07-06 16:05:42 +02:00
Ilija Lazoroski
16e8443134
Island: Add TODO to return default config in reporting
...
Notes in services for not fixing the failing tests until we remove
the ConfigService
2022-07-06 16:05:42 +02:00
Shreya Malviya
9b23cc0bef
UT: Remove tests related to config schema per attack technique
2022-07-06 16:05:42 +02:00
Shreya Malviya
98fbc7592c
Island: Hardcode unscanned message for ATT&CK techniques
...
Remove logic for config schema per attack technique which set the unscanned message previously
2022-07-06 16:05:42 +02:00
Shreya Malviya
cbc5e99140
Island: Add TODO to fix comment in Config model
2022-07-06 16:05:42 +02:00
Shreya Malviya
4eb7472977
Island: Remove functions from ConfigService that used the old config
...
schema
This breaks some stuff: the IslandConfiguration resource, the reset
config functionality, and probably some other things. However, this
isn't too much of a concern since all of this will be reimplemented in
the coming weeks. It's just really broken for now.
2022-07-06 16:05:42 +02:00
Shreya Malviya
b883f502ed
Island: Remove old configuration schema
2022-07-06 16:05:42 +02:00
Shreya Malviya
2d960fc4d2
Island: Remove old configuration schema's properties
2022-07-06 16:05:42 +02:00
Shreya Malviya
ff17237ea7
Island: Remove old configuration schema's definitions
2022-07-06 16:05:42 +02:00
Mike Salvatore
3f3494e5d4
Common: Move DIContainer._del_key() to code_utils
2022-07-06 10:01:26 -04:00
ilija-lazoroski
568a10e2f9
Merge pull request #2061 from guardicore/file-repository-decorators
...
File repository decorators
2022-07-06 15:18:45 +02:00
Mike Salvatore
e4edfd8ded
Agent: Remove shallow i_puppet.credential_collection subpackage
2022-07-05 14:41:59 -04:00
Mike Salvatore
33b04934aa
Island: Use common.credentials.Credentials in ICredentialsRepository
2022-07-05 13:30:55 -04:00
Mike Salvatore
7bc8ed649a
Common: Add common.credentials package
...
Migrate all objects that represent credentials from their present home
in the agent to their new home in common. This allows these classes to
be shared by the island. Furthermore, it will simplify
serialization/deserialization and clear a path to remove other redundant
classes in the Island.
2022-07-05 13:28:17 -04:00
Mike Salvatore
545f35710f
Island: Add class docstrings for IFileRepository decorators
2022-07-05 11:24:34 -04:00
Mike Salvatore
a8b54f69f9
Island: Use read/write lock in FileRepositoryLockingDecorator
2022-07-05 11:17:03 -04:00
Mike Salvatore
1efea21269
Merge pull request #2060 from guardicore/1965-modify-i-stolen-credentials-repository
...
Modify IStolenCredentialsRepository
2022-07-05 11:07:47 -04:00
Mike Salvatore
0ab30d02a2
Island: Add class docstring for ICredentialsRepository
2022-07-05 11:02:27 -04:00
Mike Salvatore
64e548957f
Island: Reorder methods in ICredentialsRepository
2022-07-05 10:59:28 -04:00
Mike Salvatore
cbed178549
Island: Reword docstrings in ICredentialsRepository
2022-07-05 10:57:36 -04:00
Mike Salvatore
035734992c
Island: Change parameter names in ICredentialsRepository.save_*()
2022-07-05 10:50:28 -04:00
Mike Salvatore
2736f058d7
Island: Fix docstring formatting in ICredentialsRepository
2022-07-05 10:50:07 -04:00
Mike Salvatore
48cc6d6dd2
Island: Add readerwriterlock as a dependency
2022-07-05 10:42:06 -04:00
Ilija Lazoroski
6695e5b4ac
Island: Modify IStolenCredentialsRepository
...
* Rename to ICredentialsRepository
* Add {get/remove/save}_{stolen/configured}_credentials
2022-07-05 16:25:39 +02:00
Mike Salvatore
4f6978c732
Island: Add TODO regarding gevent.lock()
2022-07-05 09:53:18 -04:00
ilija-lazoroski
8873ef891b
Merge pull request #2051 from guardicore/2003-define-new-json-schema
...
2003 define new json schema
2022-07-05 13:34:20 +02:00
vakarisz
d0612f06d8
UI: Fix incorrect allPluginNames in AdvancedMultiSelect.js
...
All plugin names were in fact only the initially selected values
2022-07-05 10:32:07 +03:00
Ilija Lazoroski
3bbbca783d
UI: Fix UiSchema manipulators to use payloads section
2022-07-04 15:33:23 +02:00
Ilija Lazoroski
a37157b086
UI: Rename custom PBA filename options
2022-07-04 14:47:19 +02:00
Ilija Lazoroski
66c2bc492c
UI: Fix custom pbas in the schema
2022-07-04 14:47:19 +02:00
vakarisz
a1f4a6978a
UI: Remove unneeded console logs from ConfigurePage.js
2022-07-04 15:23:38 +03:00
Ilija Lazoroski
51609e9491
UI: Fix missaligned items in propagation
2022-07-04 13:47:57 +02:00
vakarisz
df7e43d796
UI: Fix SafeOptionValidator.js for the new schema
2022-07-04 14:46:55 +03:00
Mike Salvatore
353605d672
Island: Reorder components in log statement
...
* Since file and function names differ wildly in length, moving the log
leve right after the timestamps makes the log easier for a human being
to parse.
* The length of function names can vary wildly. The 10 character padding
to attempt to align other parts of the log message just didn't achive
its goal. It made the log harder to read and added a lot of dead
space.
2022-07-04 07:23:21 -04:00
Mike Salvatore
df8132c86c
Island: Change the order of FileRepository decorators
...
The caching decorator was suppressing debug log messages. Reversing
their order resolves the issue.
2022-07-04 07:14:11 -04:00
Ilija Lazoroski
88663f5276
UI: Add defaults for the payloads section
2022-07-04 13:13:30 +02:00
Ilija Lazoroski
a4e66a0c9e
UI: Add ransomware to config schema
2022-07-04 13:13:30 +02:00
vakarisz
d527881770
UI: Fix info pane in AdvancedMultiSelect.js
2022-07-04 13:54:07 +03:00
vakarisz
20f091ff4e
UI: Fix reset button in AdvancedMultiSelect.js
...
Reset button will reset to all safe values
2022-07-04 13:00:36 +03:00
vakarisz
ed46538137
UI: Improve state contents in AdvancedMultiSelect.js
2022-07-04 12:37:35 +03:00
vakarisz
61eaa48988
UI: Fix formatting in UiSchema.js
2022-07-04 12:20:36 +03:00
vakarisz
7df10f7730
UI: Fix a bug in ConfigurePage.js responsible for lacking re-render
...
key property makes the component unique and causes a re-construction. This solves a bug where different configuration page tabs remain with the same data on switch
2022-07-04 12:20:36 +03:00
vakarisz
26f51d1540
UI: Fix a bug in ConfigurePage.js responsible for lacking re-render
...
key property makes the component unique and causes a re-construction. This solves a bug where different configuration page tabs remain with the same data on switch
2022-07-04 12:20:36 +03:00
vakarisz
ab720a5a55
UI: Refactor AdvancedMultiSelect.js to use props more
2022-07-04 12:20:36 +03:00
Mike Salvatore
18f995919d
Island: Add TODO about read/write lock
2022-07-03 09:38:31 -04:00
Mike Salvatore
9cb79c119c
Island: Decorate the FileRepository for AgentBinaryRepository
2022-07-03 09:35:19 -04:00
Mike Salvatore
3c85a89702
Island: Change log level in FileRepositoryLoggingDecorator to debug
...
Most log statements in repositories should probably be at debug.
Services and resources could potentially log at info.
2022-07-02 20:04:10 -04:00
Mike Salvatore
6cc3689ab4
Island: Remove unnecesary logging from LocalStorageFileRepository
...
Most logging is now handled by FileRepositoryLoggingDecorator, which
makes the logging reusable across different implementations of
`IFileRepository`.
2022-07-02 20:02:53 -04:00
Mike Salvatore
a329177b49
Island: Decorate LocalStorageFileRepository
2022-07-02 19:59:50 -04:00
Mike Salvatore
9affe10f67
Island: Add FileRepositoryCachingDecorator
2022-07-02 19:59:43 -04:00
Mike Salvatore
d4883c6e44
Island: Specify "read-only" in IFileRepository.open_file() docstring
2022-07-02 10:32:12 -04:00
Mike Salvatore
e3b5e0c01a
Island: Add FileRepositoryLockingDecorator
2022-07-02 09:53:18 -04:00
Mike Salvatore
bc0c4a1c8e
Island: Add FileRepositoryLoggingDecorator
2022-07-02 09:50:34 -04:00
Mike Salvatore
c00249fc17
Island: Change FileNotFoundError import in LocalStorageFileRepository
2022-07-02 09:38:28 -04:00
Mike Salvatore
48ccf467e0
Island: Remove repository.file_storage subpackage
2022-07-02 09:32:37 -04:00
Shreya Malviya
6b15889e7d
Island: Remove old logic for resetting config
2022-07-01 20:15:03 -04:00
Mike Salvatore
1421b5624c
Island: Add missing newline in ISimulationRepository
2022-07-01 16:31:55 -04:00
Mike Salvatore
410401a319
Island; Remove disused IslandMode mongo document
2022-07-01 13:11:05 -04:00
Mike Salvatore
f78fa73563
Island: Rename IslandModeEnum -> IslandMode
2022-07-01 13:11:05 -04:00
Mike Salvatore
d88fc86d90
Island: Remove disused mode subpackage
2022-07-01 13:11:05 -04:00
Mike Salvatore
63a69b047d
Island: Move IslandModeEnum to monkey_island.cc.models
2022-07-01 13:11:05 -04:00
Mike Salvatore
7ec558a5f4
Island: Move IslandModeService out of unnecessary subpackage
2022-07-01 13:11:05 -04:00
Mike Salvatore
77baf08ea3
Island: Remove disused MANIPULATOR_PER_MODE "service"
2022-07-01 13:11:05 -04:00
Mike Salvatore
6459da1d15
Island: Remove disused config_manipulator "service"
2022-07-01 13:11:05 -04:00
Mike Salvatore
c1994f5d60
Island: Extract registration methods from initialize_services()
2022-07-01 13:11:05 -04:00
Mike Salvatore
fc76bb2d83
Island: Set config on mode set in IslandModeService
2022-07-01 13:11:05 -04:00
Mike Salvatore
9990cdc6a8
UT: Parametrize test_save_simulation()
2022-07-01 13:11:05 -04:00
Mike Salvatore
4a91777019
Island: Add tests for IslandModeService
2022-07-01 13:11:05 -04:00
Mike Salvatore
8f7e7f98e7
Island: Use new IslandModeService in IslandMode resource
2022-07-01 13:11:03 -04:00
Mike Salvatore
50a982672e
Island: Chande method order in ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
bdc5b8fa7b
Island: Refactor IslandModeService to use ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
942e97cf18
Island: Decouple ConfigService.reset_config() from island_mode_service
2022-07-01 13:10:01 -04:00
Mike Salvatore
350ac6957f
Island: Register FileSimulationRepository with the DIContainer
2022-07-01 13:10:01 -04:00
Mike Salvatore
d2906ef23b
Island: Add docstrings to {get,save}_simulation()
2022-07-01 13:10:01 -04:00
Mike Salvatore
c58bbb3f8a
Island: Add FileSimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
a18b5ef9b7
Island: Add missing return typehint to get_simulation()
2022-07-01 13:10:01 -04:00
Mike Salvatore
55eb9b39a2
Island: Set default value for Simulation.mode
2022-07-01 13:10:01 -04:00
Mike Salvatore
c221a9810d
Island: Add missing newline in ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
28e75319b0
Island: Make ISimulationRepository methods abstract
2022-07-01 13:10:01 -04:00
Mike Salvatore
a24bf921c1
Island: Add {get,set}_mode() to ISimulationRepository
2022-07-01 13:10:01 -04:00
Mike Salvatore
8b10d81d48
Island: Use Simulation in ISimulationRepository
2022-07-01 13:10:01 -04:00