diff --git a/monkey/monkey_island/cc/resources/agents.py b/monkey/monkey_island/cc/resources/agents.py index 79d6fc872..b727bd9ae 100644 --- a/monkey/monkey_island/cc/resources/agents.py +++ b/monkey/monkey_island/cc/resources/agents.py @@ -1,4 +1,5 @@ import json +import logging from http import HTTPStatus from flask import make_response, request @@ -6,6 +7,8 @@ from flask import make_response, request from common import AgentRegistrationData from monkey_island.cc.resources.AbstractResource import AbstractResource +logger = logging.getLogger(__name__) + class Agents(AbstractResource): urls = ["/api/agents"] @@ -13,7 +16,10 @@ class Agents(AbstractResource): def post(self): try: # Just parse for now - AgentRegistrationData(**request.json) + agent_registration_data = AgentRegistrationData(**request.json) + + logger.debug(f"Agent registered: {agent_registration_data}") + return make_response({}, HTTPStatus.NO_CONTENT) except (TypeError, ValueError, json.JSONDecodeError) as err: return make_response(