Island: Authenticate `api/island/version`

This commit is contained in:
Ilija Lazoroski 2022-08-04 11:56:01 +02:00
parent 4500d57edd
commit bfd0eb6fa5
1 changed files with 2 additions and 2 deletions

View File

@ -2,6 +2,7 @@ import logging
from monkey_island.cc import Version from monkey_island.cc import Version
from monkey_island.cc.resources.AbstractResource import AbstractResource from monkey_island.cc.resources.AbstractResource import AbstractResource
from monkey_island.cc.resources.request_authentication import jwt_required
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@ -12,8 +13,7 @@ class Version(AbstractResource):
def __init__(self, version: Version): def __init__(self, version: Version):
self._version = version self._version = version
# We don't secure this since it doesn't give out any private info and we want UI to know version @jwt_required
# even when not authenticated
def get(self): def get(self):
return { return {
"version_number": self._version.version_number, "version_number": self._version.version_number,