Mike Salvatore
2804ba9b07
Island: Return AWSCommandResults from start_infection_monkey_agent()
2022-05-10 13:09:56 -04:00
vakarisz
e5285f2f78
Island: Add custom error and sketch out AWS command results
2022-05-10 16:57:36 +03:00
Mike Salvatore
109ea87196
Island: Fix negative sleep time bug in aws_command_runner
2022-05-10 09:47:58 -04:00
Mike Salvatore
27f8195be5
UT: Add unit tests for aws_command_runner
2022-05-10 09:47:46 -04:00
Mike Salvatore
79eb584c5d
Island: Skip try_add_aws_exporter_to_manager()
...
This is causing the island to crash at the moment and will be completely
removed later in #1928 .
2022-05-10 08:50:47 -04:00
Mike Salvatore
bfeea19c88
Island: Fix broken AWS queries in aws_command_runner
2022-05-10 08:50:45 -04:00
Mike Salvatore
c655aaffe9
UT: Move test_aws_service.py to services/aws/
2022-05-10 08:04:33 -04:00
Mike Salvatore
4f3a150f5a
Common: Remove disused common.cmd.*
2022-05-09 16:30:24 -04:00
Mike Salvatore
fe1e8ccb75
Island: Remove disused RemoteRunAwsService
2022-05-09 16:27:07 -04:00
Mike Salvatore
68f31db03a
UT: Add StubDIContainer
2022-05-09 16:23:35 -04:00
Mike Salvatore
528ca76c32
Island: Use AWSService in RemoteRun resource
2022-05-09 15:52:01 -04:00
Mike Salvatore
144506c32d
Island: Implement AWSService._run_agent_on_managed_instance()
2022-05-09 15:43:52 -04:00
Mike Salvatore
653bfbd24b
Island: Replace AWSCommandRunner with start_infection_monkey_agent()
...
The AWSCommandRunner is a subclass of CmdRunner, which attempts to make
it easy to run commands on AWS nodes asynchronously. There are some
issues with the implementation, including unnecessary complexity and a
circular dependency between the CmdRunner and Cmd classes. A simple
function that runs a single command on a single instance is a simpler
solution. It can be run with a thread worker pool if asynchronicity is
required.
2022-05-09 15:25:56 -04:00
Mike Salvatore
c24bb1024e
Agent: Move Timer to common/
2022-05-09 13:26:42 -04:00
Mike Salvatore
a7dcc73a3d
Island: Rename AwsCmdRunner -> AWSCommandRunner
2022-05-09 13:26:36 -04:00
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