Commit Graph

9744 Commits

Author SHA1 Message Date
Ilija Lazoroski 5f631a78f7 Agent: Remove IGUID from config 2022-08-16 11:58:53 +02:00
Ilija Lazoroski 39f07603a7 Agent: Define integer GUID and use it in ssh_handler 2022-08-16 11:58:53 +02:00
Ilija Lazoroski b22ccdb942 Agent: Publish CredentialsStolenEvent each time we find a SSHKeypair 2022-08-16 11:58:53 +02:00
Ilija Lazoroski e439a53bde UT: Fix SSHCredentialCollector test to accept IEventQueue 2022-08-16 11:58:53 +02:00
Ilija Lazoroski 2610666f93 Agent: Publish an CredentialsStolenEvent from SSHCredentialCollector 2022-08-16 11:58:53 +02:00
Ilija Lazoroski 4952a544c0 Agent: Accept IEventQueue in SSHCollector constructor 2022-08-16 11:58:53 +02:00
Mike Salvatore d09c1a689e
Merge pull request #2200 from guardicore/2191-fix-credentials-repository-get
2191 fix credentials repository get
2022-08-15 15:45:03 -04:00
Kekoa Kaaikala e4f7707b66 Agent: Return credentials when credentials propagation fails 2022-08-15 19:25:54 +00:00
Kekoa Kaaikala 9e6a569393 Agent: Update credentials repository to cache per-instance 2022-08-15 19:25:54 +00:00
Mike Salvatore 500eeeb582
Merge pull request #2194 from guardicore/2191-trailing-url-slashes
Island: Remove trailing slashes before registering a URL
2022-08-15 14:25:28 -04:00
Kekoa Kaaikala a67a4418c9 Island: Remove PropagationCredentials URL trailing slash 2022-08-15 18:04:56 +00:00
Mike Salvatore 96f794e192 UT: Mark TestEvent* classes with `__test__ = False` 2022-08-15 14:04:09 -04:00
Kekoa Kaaikala 19df4d9755 Island: Enforce "no trailing slash" rule for URLs 2022-08-15 18:01:32 +00:00
Mike Salvatore 4e9aa62c61
Merge pull request #2195 from guardicore/refactor-island-boot
Refactor island boot
2022-08-15 08:35:00 -04:00
Mike Salvatore 01e886f866 Project: Remove step in travis build to upgrade pipenv
It seems that every time a new version of pipenv is released it breaks
travis. For the moment, it seems that the magic combination is to
upgrade pip but not upgrade pipenv.

I've been unable to reproduce the issue outside of any environment other
than Travis CI.

Once we split our project up into multiple repos, we should strongly
consider switching to poetry.
2022-08-15 08:23:17 -04:00
Mike Salvatore 879f809aa4 Project: Use the latest pip in travis build 2022-08-15 07:37:36 -04:00
Mike Salvatore fae4247505 Project: Add special `fix-travis` branch to travis build list
When attempting to fix an issue with travis, it's important to actually
run travis. In order to do this without a pull request, I've added a
special `fix-travis` branch to the list of branches travis is allowed to
build.
2022-08-15 07:34:39 -04:00
Mike Salvatore 9f89d3f508
Merge pull request #2193 from guardicore/2176-stolen-credentials-subscriber
2176 stolen credentials subscriber
2022-08-15 07:26:18 -04:00
Ilija Lazoroski f6712c5f84 Agent: Subscribe CredentialsStolenEvent to the EventQueue 2022-08-15 10:02:00 +02:00
Ilija Lazoroski b3ac7a6538 UT: Add tests for adding credentials from event to repository 2022-08-15 09:30:04 +02:00
Ilija Lazoroski db8e1e50da Agent: Add add_credentials_from_event_to_propagation_credentials_repository
Callable class that adds credentials to the propagation credentials
repository
2022-08-15 09:30:04 +02:00
Mike Salvatore d6e0b03a64 Island: Move island log file registration to setup_server.py 2022-08-12 12:02:23 -04:00
Mike Salvatore fdc041ead6 Island: Only call get_ip_addresses() once in server_setup.py 2022-08-12 11:57:31 -04:00
Mike Salvatore 315c17eb48 Island: Remove unneeded ANALYTICS_URL constant 2022-08-12 11:53:33 -04:00
Mike Salvatore 6da38e341f Island: Run analytics request asynchronously 2022-08-12 11:49:16 -04:00
Mike Salvatore 0c39268668 Island: Reorder function calls in run_monkey_island()
Configuration options should be validated before they are used.
2022-08-12 11:46:16 -04:00
Mike Salvatore 09f6cce6de Island: Collect system info in server_setup.py
Information about the system (host machine, island, etc.) should be
collected early on and passed to the components that require it.
2022-08-12 11:45:52 -04:00
Mike Salvatore 1873ce3bfe Island: Rename ex -> err in server_setup.py 2022-08-12 10:55:25 -04:00
vakaris_zilius 5d36b7a981 Island: Remove trailing slashes before registering a URL
Strict slashes seems to not handle a case when URL is defined with a trailing slash, but request is sent without one. Removing trailing slashes before registering a URL will solve the burden of remembering to register URLS without slashes
2022-08-12 14:54:28 +00:00
Mike Salvatore dd30b61658 Island: Add missing type hint to _configure_gevent_exception_handling() 2022-08-12 10:50:23 -04:00
Mike Salvatore 2379271c13 Island: Call _configure_gevent_ex_handling from _start_island_server 2022-08-12 10:49:45 -04:00
Mike Salvatore 61cb14d628 Island: Wrap mongo start in _initialize_mongodb_connection() 2022-08-12 10:47:23 -04:00
Mike Salvatore 82c7782ff0
Merge pull request #2188 from guardicore/2165-labda-decoupling
2165 lambda decoupling
2022-08-12 10:33:51 -04:00
Mike Salvatore af7eb23bef Island: Reword warning in Version 2022-08-12 10:31:30 -04:00
Mike Salvatore 8788b258dd Docs: Change "launch" to "starts" 2022-08-12 10:29:42 -04:00
Mike Salvatore 658607de25 UT: Remove unnecessary wait() from test_version
Unit tests should not be exposed to the internals of what they are
testing. Furthermore, the `latest_version` and `download` properties
wait for the event to be set, making the extra `wait()` redundant.
2022-08-12 10:27:53 -04:00
Mike Salvatore 94a25b07b2 Island: Simplify error messages in Version 2022-08-12 10:24:29 -04:00
Mike Salvatore df1b9f0f9c Island: Fix return type hint for Version._get_version_info() 2022-08-12 10:22:22 -04:00
Mike Salvatore 617d101af2 Island: Fix string formatting in _send_analytics() 2022-08-12 10:20:30 -04:00
Mike Salvatore 6dc29e36e2 UT: Fix test_version__request_failed() 2022-08-12 10:16:46 -04:00
Mike Salvatore 2e70b87ee9 Revert "Island, UI: Handle the case when version couldn't be fetched"
This reverts commit 737070f956.
2022-08-12 10:15:44 -04:00
Mike Salvatore dc0f865f9b
Merge pull request #2192 from guardicore/2176-initialize-event-queue
Initialize IEventQueue
2022-08-12 10:14:20 -04:00
Mike Salvatore 23b96c2a36 Agent: Convert _event_queue from member to local variable 2022-08-12 10:13:36 -04:00
Ilija Lazoroski 21c9ea9d44 Agent: Initialize IEventQueue 2022-08-12 15:31:55 +02:00
Mike Salvatore 74ca26657e
Merge pull request #2189 from guardicore/2176-define-stolen-credentials-event
2176 define stolen credentials event
2022-08-12 06:48:16 -04:00
Mike Salvatore b0b0874be9 Common: Modify stolen_credentials description in docstring 2022-08-12 06:47:08 -04:00
Ilija Lazoroski 743d40abab Common: Rename StolenCredentialsEvent to CredentialsStolenEvent 2022-08-12 09:39:04 +02:00
vakarisz 737070f956 Island, UI: Handle the case when version couldn't be fetched 2022-08-12 09:50:28 +03:00
vakarisz c61737abc0 Island: Send analytics on island startup instead of object creation
This change makes the logic more evident, because sending the analytics is not done during the initialization of an object
2022-08-12 09:32:50 +03:00
Ilija Lazoroski f06d53368a Common: Export StolenCredentialsEvent from __init__ 2022-08-11 19:36:58 +02:00