diff --git a/monkey/monkey_island/cc/app.py b/monkey/monkey_island/cc/app.py index b3254d7cb..0bc20852f 100644 --- a/monkey/monkey_island/cc/app.py +++ b/monkey/monkey_island/cc/app.py @@ -23,7 +23,6 @@ from monkey_island.cc.resources.client_run import ClientRun from monkey_island.cc.resources.configuration_export import ConfigurationExport from monkey_island.cc.resources.configuration_import import ConfigurationImport from monkey_island.cc.resources.edge import Edge -from monkey_island.cc.resources.environment import Environment from monkey_island.cc.resources.exploitations.manual_exploitation import ManualExploitation from monkey_island.cc.resources.exploitations.monkey_exploitation import MonkeyExploitation from monkey_island.cc.resources.island_configuration import IslandConfiguration @@ -125,7 +124,6 @@ def init_api_resources(api): api.add_resource(Root, "/api") api.add_resource(Registration, "/api/registration") api.add_resource(Authenticate, "/api/auth") - api.add_resource(Environment, "/api/environment") api.add_resource(Monkey, "/api/monkey", "/api/monkey/", "/api/monkey/") api.add_resource(Bootloader, "/api/bootloader/") api.add_resource(LocalRun, "/api/local-monkey", "/api/local-monkey/") diff --git a/monkey/monkey_island/cc/resources/environment.py b/monkey/monkey_island/cc/resources/environment.py deleted file mode 100644 index feb0c138c..000000000 --- a/monkey/monkey_island/cc/resources/environment.py +++ /dev/null @@ -1,22 +0,0 @@ -import json -import logging - -import flask_restful -from flask import request - -import monkey_island.cc.environment.environment_singleton as env_singleton - -logger = logging.getLogger(__name__) - - -class Environment(flask_restful.Resource): - def patch(self): - env_data = json.loads(request.data) - if env_data["server_config"] == "standard": - if env_singleton.env.needs_registration(): - env_singleton.set_to_standard() - logger.warning( - "No user registered, Island on standard mode - no credentials required to " - "access." - ) - return {} diff --git a/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js b/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js index 90927da44..55a5fcebf 100644 --- a/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js +++ b/monkey/monkey_island/cc/ui/src/components/pages/RegisterPage.js @@ -7,8 +7,6 @@ import ParticleBackground from '../ui-components/ParticleBackground'; class RegisterPageComponent extends React.Component { - NO_AUTH_API_ENDPOINT = '/api/environment'; - register = (event) => { event.preventDefault(); this.auth.register(this.username, this.password).then(res => {