Commit Graph

8169 Commits

Author SHA1 Message Date
Mike Salvatore 4f023621d4
Merge pull request #1934 from guardicore/1928-lazy-load-aws-instance
1928 lazy load aws instance
2022-05-09 08:54:05 -04:00
Mike Salvatore 7864f48e3c Common: Make AWSInstance.is_instance() return boolean 2022-05-09 07:39:05 -04:00
Mike Salvatore 7af03a83f6 Common: Simplify attribute assignment in AWSInstance 2022-05-09 06:44:21 -04:00
Mike Salvatore d861328fbf Common: Use relative import for aws_metadata module 2022-05-06 04:36:50 -04:00
Mike Salvatore 73e7e31a63 UT: Fix names in test_aws_metadata.py 2022-05-06 04:31:10 -04:00
Mike Salvatore 8d24b913df Common: Raise exception if AWS metadata requests fail 2022-05-06 04:22:17 -04:00
Mike Salvatore ca38235b8e Common: Set AWSInstance.is_instance to False if empty string 2022-05-06 04:07:40 -04:00
Mike Salvatore 09218ef3d3 UT: Add tests for AWSInstance 2022-05-06 04:07:16 -04:00
Mike Salvatore 10136a325c Common: Import AWSInstance in common/aws/__init__.py 2022-05-06 03:56:47 -04:00
Mike Salvatore 07f57a83ad Common: Refactor aws_metadata to improve readablility 2022-05-05 15:14:47 -04:00
Mike Salvatore d977d19d9f Common: Lazy-load AWSInstance 2022-05-05 15:01:37 -04:00
Mike Salvatore ab136284dc Common: Remove disused AWSInstance.get_account_id() 2022-05-05 11:39:49 -04:00
Mike Salvatore 64f9bcacb5 Common: Rename AwsInstance -> AWSInstance 2022-05-05 11:29:08 -04:00
Mike Salvatore d5f93d21b7
Merge pull request #1927 from guardicore/1921-fix-flaky-bb-tests
1921 fix flaky bb tests
2022-05-04 13:28:04 -04:00
Mike Salvatore 61793d56cf BB: Add a note about clearing tomcat sessions 2022-05-04 10:32:23 -04:00
Mike Salvatore 2f3c08cb77 BB: Add a note about setting java.security.egd for tomcat 2022-05-04 10:32:21 -04:00
Mike Salvatore 17db25b00b Agent: Log MSSQL error when authentication fails 2022-05-03 13:58:13 -04:00
Mike Salvatore 2d685ef44a Agent: Log agent's GUID 2022-05-03 13:58:13 -04:00
Mike Salvatore 0fce4e88a5 Agent: Drop CREDENTIALS_POLL_PERIOD_SEC from 30 to 10 2022-05-03 13:58:13 -04:00
Ilija Lazoroski 86c6a55097 Island, UT: Fix file_utils paths 2022-05-03 10:45:12 -04:00
Mike Salvatore 8d65fa36f2
Merge pull request #1919 from guardicore/1636-long-aws-check
1636 long aws check
2022-05-02 09:53:46 -04:00
Mike Salvatore 3a98fdbf52 UT: Use MappingProxyType for defaults in get_test_aws_instance() 2022-05-02 09:50:56 -04:00
Mike Salvatore a466e97cb0 Island: Move AwsCmdRunner to monkey_island/cc/server_utils/ 2022-05-02 09:28:41 -04:00
Mike Salvatore ceebdea3a9 Island: Use aws_service.get_account_id() in AWSExporter 2022-05-02 09:21:02 -04:00
Mike Salvatore 56ea170808 Island: Add get_account_id() to aws_service 2022-05-02 09:20:41 -04:00
Mike Salvatore ae83c2e3e0 Island: Relocate aws_service from common to monkey_island 2022-05-02 09:16:59 -04:00
Mike Salvatore 2714617797 Agent: Use AwsInstance instead of aws_service 2022-05-02 09:10:37 -04:00
vakarisz e89589762e Common: Rever singleton from WeakValueDictionary to simple dictionary 2022-05-02 15:55:12 +03:00
vakarisz f3a5a7090b Agent, Island, Common: Refactor AwsService from class to package
This also changes AwsInstance from singleton and instead the aws_service package is used as one
2022-05-02 15:55:12 +03:00
vakarisz 7b2ff1e159 Common: Remove CloudInstance since aws is the only cloud supported
This change simplifies the codebase by removing unnecessary inheritance and nested directory structure
2022-05-02 15:55:12 +03:00
vakarisz c5a126ff13 UT: Fix AWS instance unit tests 2022-05-02 15:55:12 +03:00
vakarisz e51b760af0 Common: Improve singleton to use WeakValueDictionary 2022-05-02 15:55:12 +03:00
vakarisz cea49b6d50 Docs: Improve running on AWS ec2 documentation
Update the IAM role change screenshot and add a note about firewall rules
2022-05-02 15:55:12 +03:00
Mike Salvatore 797482a172 Common: Replace protected attributes with read-only properties 2022-05-02 15:55:12 +03:00
vakarisz b58d847e22 Island: Refactor lock to event in remote_run_aws.py 2022-05-02 15:55:12 +03:00
vakarisz fead7f602e Island, Common: Change AwsInstance properties to private, add getter 2022-05-02 15:55:12 +03:00
vakarisz f63bc77df0 Common: Fix aws_instance.py formatting 2022-05-02 15:55:12 +03:00
vakarisz 946c394c74 Changelog: Add entry about fixed long AWS check on island startup 2022-05-02 15:55:12 +03:00
vakarisz 8535118e4f Island: Add locks to remote_run_aws.py
Locks will avoid the situation where is_running_on_aws is called before this service finished initializing
2022-05-02 15:55:12 +03:00
vakarisz d3c1ff89e9 Island: Run AWS services on separate threads
AWS related services call AWS metadata service which might take a long time to timeout, that's why they are ran on a separate thread
2022-05-02 15:55:11 +03:00
vakarisz 0e1ffb4051 Common: Change AwsInstance to be a Singleton 2022-05-02 15:55:11 +03:00
vakarisz 65eb9b171b Island, Common: Move singleton to code_utils.py in common
Singleton is a common pattern, potentially usable in the Agent so it belongs in common
2022-05-02 15:55:11 +03:00
Mike Salvatore fdf8198e7f Build: Use `pipenv requirements` in appimage build
As of pipenv 2022.04.30, `pipenv lock -r` is deprecated in favor of the
new `pipenv requirements` command.
2022-05-02 08:52:17 -04:00
Ilija Lazoroski 0a145be25d Build: Change BUILD file to include commit hash on dev builds
Issue #1553
2022-04-29 10:52:52 -04:00
Mike Salvatore f65e009db6 Agent: Add comment about slow SMB transfer speeds 2022-04-29 06:58:48 -04:00
Mike Salvatore 9b1857a3d9
Merge pull request #1918 from guardicore/1904-pba-file-upload-resource-improvements
1904 pba file upload resource improvements
2022-04-27 19:08:46 -04:00
Mike Salvatore c4edec80a6
Common: Fix typo touples -> tuples
Co-authored-by: ilija-lazoroski <ilija.la@live.com>
2022-04-27 19:08:37 -04:00
Mike Salvatore 13ca4b6f8c Island: Add comment about seemingly duplicate endpoints 2022-04-27 13:19:16 -04:00
Mike Salvatore 3a5d28cc59 Island: Decouple FileUpload service from FilePond 2022-04-27 13:06:20 -04:00
Mike Salvatore 1476efa383 Island: Change unsafe -> untrusted in log message 2022-04-27 12:44:58 -04:00