Merge pull request #2144 from guardicore/2109-rename-versionupdate

Rename VersionUpdate to Version
This commit is contained in:
Mike Salvatore 2022-08-01 11:03:43 -04:00 committed by GitHub
commit e1a209a159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 7 additions and 7 deletions

View File

@ -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

View File

@ -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)

View File

@ -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

View File

@ -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({