Mike Salvatore
cb29c9ed88
Island: Add RemoteRun to resources/__init__.py
2022-05-11 09:51:49 -04:00
Mike Salvatore
c865bf3c15
UT: Remove unneeded tmp_path from test_pba_file_download.flask_client()
2022-05-11 09:49:44 -04:00
Mike Salvatore
7c0616eecd
Island: Add timeout parameter to start_infection_monkey_agent()
2022-05-11 08:20:48 -04:00
vakarisz
3702ecbc8c
UI: Fix AWSInstanceTable.js to show status of run commands
2022-05-11 15:15:15 +03:00
Mike Salvatore
d1d960abc2
UT: Fix faulty logic in test_multiple_status_queries
...
The test is checking that some calls return "in progress" and subsequent
calls return success. Using itertools.repeat allows all future calls to
return success.
2022-05-11 08:09:56 -04:00
Mike Salvatore
825c7b9ecf
Island: Refactor logic to start threads in AWSService
2022-05-11 08:04:25 -04:00
Mike Salvatore
680dbca574
UT: Use only Python3.7 features in test_aws_command_runner
2022-05-11 07:56:15 -04:00
vakarisz
b8006a6274
Island: Add instance ID to AWSCommandResults
...
Instance id tells us where the command was launched
2022-05-11 14:32:39 +03:00
Shreya Malviya
36faa9f5a3
Build: Update MongoDB links in install_mongo.sh
2022-05-11 16:21:32 +05:30
vakarisz
0b5a507f38
Island: Make AWSCommandStatus enum json serializable
2022-05-11 13:48:56 +03:00
VakarisZ
b9f71cd41c
Merge pull request #1936 from guardicore/1883-setup-docs-linux
...
Add documentation to run IM as service on boot
2022-05-11 12:26:34 +03:00
vakarisz
30fb57c37f
Island: Fix a bug where agent run threads won't start
2022-05-11 11:10:45 +03:00
Shreya Malviya
7e997b5403
Docs: Add instructions about root permissions for AppImage systemd unit installation
2022-05-11 13:32:35 +05:30
vakarisz
aa159a4240
Island: Improve aws_command_runner.py readability a bit
2022-05-11 10:20:27 +03:00
Mike Salvatore
94fd2a26d9
Island: Remove disused AwsCmdResult
...
This was replaced by monkey_island.services.aws.AWSCommandResults.
2022-05-10 13:37:44 -04:00
Mike Salvatore
60229f4a65
Island: Run multiple AWS commands concurrently
2022-05-10 13:31:14 -04:00
Mike Salvatore
487d1c55af
Common: Add queue_to_list()
2022-05-10 13:30:10 -04:00
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
Shreya Malviya
0c95f66782
Docs: Add instructions to run IM as service on boot through the AppImage
2022-05-10 18:56:34 +05:30
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
68d709c158
Deploy: Use `npm run dev` instead of `npm run dist`
...
`dev` is significantly faster than `dist`. `dist` uses a source mapping
algorithm that's good for production, but much slower than the one used
by `dev`. See https://github.com/guardicore/monkey/issues/1879 for more
details.
2022-05-10 08:15:22 -04:00
Mike Salvatore
c655aaffe9
UT: Move test_aws_service.py to services/aws/
2022-05-10 08:04:33 -04:00
Mike Salvatore
6b4e991fdc
Merge pull request #1935 from guardicore/1928-stateful-aws-service
...
1928 stateful aws service
2022-05-10 07:57:29 -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
Shreya Malviya
28f60d51ff
Island: Use lock when creating an edge in the db
...
Fixes #1917
PR #1932
2022-05-09 06:28:11 -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