Commit Graph

8178 Commits

Author SHA1 Message Date
Mike Salvatore 83f230c5a1 Island: Move aws_cmd_runner.py -> aws_command_runner.py 2022-05-09 13:00:55 -04:00
Mike Salvatore f11ac5cc2b Island: Move AWSService to service/aws/ 2022-05-09 12:59:28 -04:00
Mike Salvatore cfbe1e5656 Island: Add docstrings to AWSService 2022-05-09 12:45:40 -04:00
Mike Salvatore 2da6e023e1 Island: Construct and register AWSService in the composition root 2022-05-09 10:25:13 -04:00
Mike Salvatore a0660f12e9 Island: Rename _filter_instance_info_from_aws_response 2022-05-09 10:16:46 -04:00
Mike Salvatore 8995eb5d2f Island: Add get_managed_instances() to AWSService 2022-05-09 10:09:17 -04:00
Mike Salvatore acabc835d4 Island: Add run_agent_on_managed_instances() to AWSService 2022-05-09 09:23:35 -04:00
Mike Salvatore 0f4b69a6f7 Island: Add stateful AWSService 2022-05-09 09:13:03 -04:00
Mike Salvatore e83848c8a4 Island: Add AWSInstance to the DIContainer 2022-05-09 08:54:35 -04:00
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