-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2261 move agent signals to common #2347
2261 move agent signals to common #2347
Conversation
monkey/infection_monkey/island_api_client/i_island_api_client.py
Outdated
Show resolved
Hide resolved
@@ -36,7 +36,8 @@ def should_agent_stop(self) -> bool: | |||
if not self._control_channel_server: | |||
logger.error("Agent should stop because it can't connect to the C&C server.") | |||
return True | |||
return self._island_api_client.get_agent_signals(self._agent_id) is not None | |||
agent_signals = self._island_api_client.get_agent_signals(self._agent_id) | |||
return agent_signals.terminate is not None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the agent do anything with the timestamp? Why send a timestamp if we're just using it as a bool?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For now the agent doesn't use it. We may in the future. For example, we can set a hard limit on how long we're willing to wait for the agent to shut down. The agent can compare current time to the signal time and decide whether or not to kill everything.
The other thing is that we don't want the Island to assume how the data will be used. The Island needs to know when a signal was sent so it makes that data available. We don't want the island to send a boolean because that's all the agent needs. The island should just make the data available.
Co-authored-by: Kekoa Kaaikala <[email protected]>
…ommon 2261 move agent signals to common
What does this PR do?
Fixes part of #2261 .
PR Checklist
Testing Checklist