From 8b1a82814eaeefd807a0515c9f095a6464cea0d6 Mon Sep 17 00:00:00 2001 From: Shreya Malviya Date: Fri, 27 May 2022 23:59:20 +0530 Subject: [PATCH] Island: Update API spec comments after rebase --- monkey/monkey_island/cc/app.py | 5 ----- monkey/monkey_island/cc/resources/monkey_download.py | 2 ++ monkey/monkey_island/cc/resources/version_update.py | 1 + 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/monkey/monkey_island/cc/app.py b/monkey/monkey_island/cc/app.py index a9305cfc9..138e73625 100644 --- a/monkey/monkey_island/cc/app.py +++ b/monkey/monkey_island/cc/app.py @@ -155,8 +155,6 @@ def init_api_resources(api: FlaskDIWrapper): api.add_resource(IslandConfiguration) api.add_resource(ConfigurationExport) api.add_resource(ConfigurationImport) - # API Spec: Rename to /api/agent-binaries, because information about agent runs - # and binary files are different resources api.add_resource(MonkeyDownload) api.add_resource(NetMap) api.add_resource(Edge) @@ -180,11 +178,8 @@ def init_api_resources(api: FlaskDIWrapper): api.add_resource(FileUpload) api.add_resource(PropagationCredentials) - # API Spec: Should use RPC convention api.add_resource(RemoteRun) - # API Spec: Rename to /version-info api.add_resource(VersionUpdate) - # API Spec: Fix endpoint (see comment in StopAgentCheck) api.add_resource(StopAgentCheck) api.add_resource(StopAllAgents) diff --git a/monkey/monkey_island/cc/resources/monkey_download.py b/monkey/monkey_island/cc/resources/monkey_download.py index 9c19b70dc..3ecceaf5c 100644 --- a/monkey/monkey_island/cc/resources/monkey_download.py +++ b/monkey/monkey_island/cc/resources/monkey_download.py @@ -20,6 +20,8 @@ class UnsupportedOSError(Exception): class MonkeyDownload(AbstractResource): + # API Spec: Rename to /api/agent-binaries, because information about agent runs + # and binary files are different resources urls = ["/api/agent/download/"] # Used by monkey. can't secure. diff --git a/monkey/monkey_island/cc/resources/version_update.py b/monkey/monkey_island/cc/resources/version_update.py index 0544cea4c..a2cd6abf6 100644 --- a/monkey/monkey_island/cc/resources/version_update.py +++ b/monkey/monkey_island/cc/resources/version_update.py @@ -8,6 +8,7 @@ logger = logging.getLogger(__name__) class VersionUpdate(AbstractResource): + # API Spec: Rename to /version-info urls = ["/api/version-update"] def __init__(self):