From 63447b759a35597050764133b5d2aa58fd504132 Mon Sep 17 00:00:00 2001 From: Mike Salvatore Date: Fri, 30 Sep 2022 13:19:41 -0400 Subject: [PATCH] Island: Add missing @jwt_required to `GET /api/agents` --- monkey/monkey_island/cc/resources/agents.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monkey/monkey_island/cc/resources/agents.py b/monkey/monkey_island/cc/resources/agents.py index 84cb4f971..b0fb5ecb4 100644 --- a/monkey/monkey_island/cc/resources/agents.py +++ b/monkey/monkey_island/cc/resources/agents.py @@ -8,6 +8,7 @@ from common import AgentRegistrationData from monkey_island.cc.event_queue import IIslandEventQueue, IslandEventTopic from monkey_island.cc.repository import IAgentRepository from monkey_island.cc.resources.AbstractResource import AbstractResource +from monkey_island.cc.resources.request_authentication import jwt_required logger = logging.getLogger(__name__) @@ -19,6 +20,7 @@ class Agents(AbstractResource): self._island_event_queue = island_event_queue self._agent_repository = agent_repository + @jwt_required def get(self): return self._agent_repository.get_agents(), HTTPStatus.OK