better logging for Zoom Proctoring

This commit is contained in:
anhefti 2021-11-04 17:36:25 +01:00
parent 10d16d8af8
commit 3aa46b3241
3 changed files with 14 additions and 5 deletions

View file

@ -236,10 +236,6 @@ public class MockupLmsAPITemplate implements LmsAPITemplate {
this.webserviceInfo.getHttpScheme() + this.webserviceInfo.getHttpScheme() +
"://" + externalAddressAlias + "/api/"; "://" + externalAddressAlias + "/api/";
if (log.isTraceEnabled()) {
log.trace("Use external address for course access: {}", _externalStartURI);
}
return new QuizData( return new QuizData(
quizData.id, quizData.institutionId, quizData.lmsSetupId, quizData.lmsType, quizData.id, quizData.institutionId, quizData.lmsSetupId, quizData.lmsType,
quizData.name, quizData.description, quizData.startTime, quizData.name, quizData.description, quizData.startTime,

View file

@ -623,6 +623,10 @@ public class ZoomProctoringService implements ExamProctoringService {
credentials.clientIdAsString(), credentials.clientIdAsString(),
expTime); expTime);
if (log.isTraceEnabled()) {
log.trace("Zoom API Token payload: {}", jwtPayload);
}
final String jwtPayloadPart = urlEncoder final String jwtPayloadPart = urlEncoder
.encodeToString(jwtPayload.getBytes(StandardCharsets.UTF_8)); .encodeToString(jwtPayload.getBytes(StandardCharsets.UTF_8));
@ -675,6 +679,10 @@ public class ZoomProctoringService implements ExamProctoringService {
expTime, expTime,
expTime); expTime);
if (log.isTraceEnabled()) {
log.trace("Zoom SDK Token payload: {}", jwtPayload);
}
final String jwtPayloadPart = urlEncoder final String jwtPayloadPart = urlEncoder
.encodeToString(jwtPayload.getBytes(StandardCharsets.UTF_8)); .encodeToString(jwtPayload.getBytes(StandardCharsets.UTF_8));
@ -724,6 +732,10 @@ public class ZoomProctoringService implements ExamProctoringService {
final String tmpString = String.format("%s.%s.%s.%d.%s", apiKey, meetingId, ts, status, hashBase64Str); final String tmpString = String.format("%s.%s.%s.%d.%s", apiKey, meetingId, ts, status, hashBase64Str);
final String encodedString = Base64.getEncoder().encodeToString(tmpString.getBytes()); final String encodedString = Base64.getEncoder().encodeToString(tmpString.getBytes());
if (log.isTraceEnabled()) {
log.trace("Zoom Meeting signature payload: {}", tmpString);
}
return encodedString.replaceAll("\\=+$", ""); return encodedString.replaceAll("\\=+$", "");
} catch (final Exception e) { } catch (final Exception e) {

View file

@ -10,8 +10,9 @@ server.tomcat.uri-encoding=UTF-8
logging.level.ch=INFO logging.level.ch=INFO
logging.level.ch.ethz.seb.sebserver.webservice.datalayer=INFO logging.level.ch.ethz.seb.sebserver.webservice.datalayer=INFO
logging.level.org.springframework.cache=INFO logging.level.org.springframework.cache=INFO
logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl=DEBUG logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.lms.impl=TRACE
logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session=DEBUG logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session=DEBUG
logging.level.ch.ethz.seb.sebserver.webservice.servicelayer.session.impl.proctoring=TRACE
#logging.level.ch.ethz.seb.sebserver.webservice.weblayer.api.ExamAPI_V1_Controller=TRACE #logging.level.ch.ethz.seb.sebserver.webservice.weblayer.api.ExamAPI_V1_Controller=TRACE
sebserver.http.client.connect-timeout=150000 sebserver.http.client.connect-timeout=150000