From b962b24492f91badda20ebc91e6b502ccbf0eba9 Mon Sep 17 00:00:00 2001 From: Nadim Ritter Date: Thu, 8 Aug 2024 16:25:07 +0200 Subject: [PATCH 1/4] change screen proctoring url to ps-webservice --- src/main/resources/config/application-ws.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-ws.properties b/src/main/resources/config/application-ws.properties index 5d98a08b..5046ce86 100644 --- a/src/main/resources/config/application-ws.properties +++ b/src/main/resources/config/application-ws.properties @@ -116,7 +116,7 @@ sebserver.feature.exam.noLMS.enabled=true sebserver.feature.exam.seb.liveProctoring.enabled=false sebserver.feature.exam.seb.screenProctoring.enabled=true sebserver.feature.exam.seb.screenProctoring.bundled=true -sebserver.feature.exam.seb.screenProctoring.bundled.url=sps-service:8090 +sebserver.feature.exam.seb.screenProctoring.bundled.url=sps-webservice:8090 sebserver.feature.exam.seb.screenProctoring.bundled.clientId=sebserverClient sebserver.feature.exam.seb.screenProctoring.bundled.clientPassword=${sps.sebserver.client.secret} sebserver.feature.exam.seb.screenProctoring.bundled.sebserveraccount.username=SEBServerAPIAccount From f88335b17ccf67943d57341b3bb95ae1e674cb08 Mon Sep 17 00:00:00 2001 From: Nadim Ritter Date: Thu, 8 Aug 2024 16:52:06 +0200 Subject: [PATCH 2/4] add http to screen proctoring url --- src/main/resources/config/application-ws.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/resources/config/application-ws.properties b/src/main/resources/config/application-ws.properties index 5046ce86..128748dd 100644 --- a/src/main/resources/config/application-ws.properties +++ b/src/main/resources/config/application-ws.properties @@ -116,7 +116,7 @@ sebserver.feature.exam.noLMS.enabled=true sebserver.feature.exam.seb.liveProctoring.enabled=false sebserver.feature.exam.seb.screenProctoring.enabled=true sebserver.feature.exam.seb.screenProctoring.bundled=true -sebserver.feature.exam.seb.screenProctoring.bundled.url=sps-webservice:8090 +sebserver.feature.exam.seb.screenProctoring.bundled.url=http://sps-webservice:8090 sebserver.feature.exam.seb.screenProctoring.bundled.clientId=sebserverClient sebserver.feature.exam.seb.screenProctoring.bundled.clientPassword=${sps.sebserver.client.secret} sebserver.feature.exam.seb.screenProctoring.bundled.sebserveraccount.username=SEBServerAPIAccount From d5ccc0f0930d1e2a99b26ef9680f6109877077c7 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 13 Aug 2024 08:34:25 +0200 Subject: [PATCH 3/4] SEBSERV-572 fixed, added new property setting sebserver.webservice.autologin.url --- .../seb/sebserver/webservice/WebserviceInfo.java | 14 ++++++++++++-- .../seb/sebserver/webservice/WebserviceInit.java | 1 + .../weblayer/api/LmsIntegrationController.java | 2 +- .../resources/config/application-ws.properties | 1 + 4 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java b/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java index 4688f8c3..75023d3c 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInfo.java @@ -51,6 +51,7 @@ public class WebserviceInfo { private static final String WEB_SERVICE_EXTERNAL_ADDRESS_ALIAS = "sebserver.webservice.lms.address.alias"; private static final String WEB_SERVICE_CONTEXT_PATH = "server.servlet.context-path"; public static final String SEBSERVER_WEBSERVICE_AUTOLOGIN_ENDPOINT = "sebserver.webservice.autologin.endpoint"; + public static final String WEB_SERVICE_GUI_AUTOLOGIN_URL_KEY = "sebserver.webservice.autologin.url"; private final String sebServerVersion; private final String testProperty; @@ -69,6 +70,8 @@ public class WebserviceInfo { private final boolean isDistributed; private final String webserviceUUID; + private final String guiAutologinURL; + private final long distributedUpdateInterval; private Map lmsExternalAddressAlias; @@ -135,6 +138,11 @@ public class WebserviceInfo { builder.path(this.contextPath); } this.serverURLPrefix = builder.toUriString(); + String guiAutologinURL = environment.getProperty(WEB_SERVICE_GUI_AUTOLOGIN_URL_KEY, builder.toUriString()); + if (StringUtils.isBlank(guiAutologinURL)) { + guiAutologinURL = builder.toUriString(); + } + this.guiAutologinURL = guiAutologinURL; this.isLightSetup = BooleanUtils.toBoolean(environment.getProperty( "sebserver.webservice.light.setup", @@ -295,6 +303,10 @@ public class WebserviceInfo { return this.serverURLPrefix; } + public String getGUIAutologinURL() { + return this.guiAutologinURL; + } + public String getOAuthTokenURI() { return getExternalServerURL() + API.OAUTH_TOKEN_ENDPOINT; } @@ -359,8 +371,6 @@ public class WebserviceInfo { return builder.toString(); } - - public static final class ScreenProctoringServiceBundle implements SPSAPIAccessData { public final boolean bundled; diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInit.java b/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInit.java index e12b5bff..cb8309f9 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInit.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/WebserviceInit.java @@ -158,6 +158,7 @@ public class WebserviceInit implements ApplicationListener"); SEBServerInit.INIT_LOGGER.info("----> Context Path: {}", this.webserviceInfo.getContextPath()); SEBServerInit.INIT_LOGGER.info("----> External-Host URL: {}", this.webserviceInfo.getExternalServerURL()); + SEBServerInit.INIT_LOGGER.info("----> Autologin URL: {}", this.webserviceInfo.getGUIAutologinURL()); SEBServerInit.INIT_LOGGER.info("----> LMS-External-Address-Alias: {}", this.webserviceInfo.getLmsExternalAddressAlias()); SEBServerInit.INIT_LOGGER.info("---->"); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/LmsIntegrationController.java b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/LmsIntegrationController.java index 9124be8e..95441f0a 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/LmsIntegrationController.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/weblayer/api/LmsIntegrationController.java @@ -207,6 +207,6 @@ public class LmsIntegrationController { return new FullLmsIntegrationService.TokenLoginResponse( lmsUUId, - webserviceInfo.getExternalServerURL() + API.LMS_FULL_INTEGRATION_LOGIN_TOKEN_ENDPOINT + "?jwt=" + token); + webserviceInfo.getGUIAutologinURL() + API.LMS_FULL_INTEGRATION_LOGIN_TOKEN_ENDPOINT + "?jwt=" + token); } } diff --git a/src/main/resources/config/application-ws.properties b/src/main/resources/config/application-ws.properties index 128748dd..c2a86c05 100644 --- a/src/main/resources/config/application-ws.properties +++ b/src/main/resources/config/application-ws.properties @@ -48,6 +48,7 @@ sebserver.webservice.http.external.port= sebserver.webservice.http.redirect.gui=/gui sebserver.webservice.ping.service.strategy=BLOCKING sebserver.webservice.autologin.endpoint=/auto_login +sebserver.webservice.autologin.url= ### webservice API From f632cc97500ecbcf338c908e68147124f6cf7006 Mon Sep 17 00:00:00 2001 From: anhefti Date: Tue, 13 Aug 2024 09:43:52 +0200 Subject: [PATCH 4/4] SEBSERV-570 fixed, skip full integration test for plugin version 1 --- .../servicelayer/lms/impl/LmsTestServiceImpl.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsTestServiceImpl.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsTestServiceImpl.java index 62356884..0cc67b27 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsTestServiceImpl.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/lms/impl/LmsTestServiceImpl.java @@ -93,12 +93,17 @@ public class LmsTestServiceImpl implements LmsTestService { } final LmsSetupTestResult lmsSetupTestResult = fullIntegrationTest(lmsSetupTemplate); - if (lmsSetupTestResult != null) return lmsSetupTestResult; + if (lmsSetupTestResult != null) { + return lmsSetupTestResult; + } return LmsSetupTestResult.ofOkay(lmsSetupTemplate.lmsSetup().getLmsType()); } private LmsSetupTestResult fullIntegrationTest(final LmsAPITemplate template) { + if (!template.fullIntegrationActive()) { + return null; + } if (template.lmsSetup().getLmsType().features.contains(LmsSetup.Features.LMS_FULL_INTEGRATION)) { final Long lmsSetupId = template.lmsSetup().id; final LmsSetupTestResult lmsSetupTestResult = template.testFullIntegrationAPI();