diff --git a/CHANGELOG.md b/CHANGELOG.md index eb5f05a03..5aa8eb98f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ Changelog](https://keepachangelog.com/en/1.0.0/). - Agent configuration structure. #1996, #1998, #1961, #1997, #1994, #1741, #1761, #1695, #1605, #2028, #2003 - `/api/island-mode` to accept and return new "unset" mode. #2036 +- `/api/version-update` to `api/island/version`. #2109 ### Removed - VSFTPD exploiter. #1533 diff --git a/monkey/monkey_island/cc/app.py b/monkey/monkey_island/cc/app.py index 37cae6cdb..56c3283e9 100644 --- a/monkey/monkey_island/cc/app.py +++ b/monkey/monkey_island/cc/app.py @@ -47,7 +47,7 @@ from monkey_island.cc.resources.root import Root from monkey_island.cc.resources.security_report import SecurityReport from monkey_island.cc.resources.telemetry import Telemetry from monkey_island.cc.resources.telemetry_feed import TelemetryFeed -from monkey_island.cc.resources.version_update import VersionUpdate +from monkey_island.cc.resources.version import Version from monkey_island.cc.resources.zero_trust.finding_event import ZeroTrustFindingEvent from monkey_island.cc.resources.zero_trust.zero_trust_report import ZeroTrustReport from monkey_island.cc.server_utils.consts import MONKEY_ISLAND_ABS_PATH @@ -185,7 +185,7 @@ def init_restful_endpoints(api: FlaskDIWrapper): api.add_resource(PropagationCredentials) api.add_resource(RemoteRun) - api.add_resource(VersionUpdate) + api.add_resource(Version) api.add_resource(StopAgentCheck) api.add_resource(StopAllAgents) diff --git a/monkey/monkey_island/cc/resources/version_update.py b/monkey/monkey_island/cc/resources/version.py similarity index 79% rename from monkey/monkey_island/cc/resources/version_update.py rename to monkey/monkey_island/cc/resources/version.py index a2cd6abf6..961b1175d 100644 --- a/monkey/monkey_island/cc/resources/version_update.py +++ b/monkey/monkey_island/cc/resources/version.py @@ -7,12 +7,11 @@ from monkey_island.cc.services.version_update import VersionUpdateService logger = logging.getLogger(__name__) -class VersionUpdate(AbstractResource): - # API Spec: Rename to /version-info - urls = ["/api/version-update"] +class Version(AbstractResource): + urls = ["/api/island/version"] def __init__(self): - super(VersionUpdate, self).__init__() + super(Version, self).__init__() # We don't secure this since it doesn't give out any private info and we want UI to know version # even when not authenticated diff --git a/monkey/monkey_island/cc/ui/src/components/logo/VersionComponent.js b/monkey/monkey_island/cc/ui/src/components/logo/VersionComponent.js index cc0aea203..26733d579 100644 --- a/monkey/monkey_island/cc/ui/src/components/logo/VersionComponent.js +++ b/monkey/monkey_island/cc/ui/src/components/logo/VersionComponent.js @@ -14,7 +14,7 @@ class VersionComponent extends React.Component { } componentDidMount() { - fetch('/api/version-update') // This is not authenticated on purpose + fetch('/api/island/version') // This is not authenticated on purpose .then(res => res.json()) .then(res => { this.setState({