Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EDGLTI-11. Enhance HTTP Endpoint Security with TLS and FIPS-140-2 Compliant Cryptography #28

Merged
merged 16 commits into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ buildMvn {
doDocker = {
buildJavaDocker {
publishMaster = 'yes'
healthChk = 'yes'
healthChkCmd = 'wget --no-verbose --tries=1 --spider http://localhost:8081/admin/health || exit 1'
//healthChk for /admin/health in MainVerticleTest.java
}
}
}
115 changes: 88 additions & 27 deletions README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
<dependency>
<groupId>org.folio</groupId>
<artifactId>edge-common</artifactId>
<version>4.5.2</version>
<version>4.7.0-SNAPSHOT</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@

import org.folio.edge.core.ApiKeyHelper;
import org.folio.edge.core.security.SecureStore;
import org.folio.edge.core.utils.OkapiClientFactory;
import org.folio.edge.ltiCourses.cache.OidcStateCache;
import org.folio.edge.ltiCourses.model.Course;
import org.folio.edge.ltiCourses.model.LtiPlatform;
import org.folio.edge.ltiCourses.utils.LtiContextClaim;
import org.folio.edge.ltiCourses.utils.LtiCoursesOkapiClient;
import org.folio.edge.ltiCourses.utils.LtiCoursesOkapiClientFactory;

import static org.folio.edge.ltiCourses.Constants.LTI_MESSAGE_TYPE_RESOURCE_LINK_REQUEST;

Expand Down Expand Up @@ -45,7 +45,7 @@ public class LtiCoursesHandler extends org.folio.edge.core.Handler {

public LtiCoursesHandler(
SecureStore secureStore,
LtiCoursesOkapiClientFactory ocf,
OkapiClientFactory ocf,
ApiKeyHelper apiKeyHelper,
RSAPrivateKey privateKey,
JadeTemplateEngine jadeTemplateEngine,
Expand Down Expand Up @@ -75,7 +75,7 @@ protected void handleCommonLTI(
return;
}

LtiCoursesOkapiClient coursesOkapiClient = (LtiCoursesOkapiClient) client;
LtiCoursesOkapiClient coursesOkapiClient = new LtiCoursesOkapiClient(client);
coursesOkapiClient.getPlatform(
issuer,
response -> {
Expand Down
9 changes: 3 additions & 6 deletions src/main/java/org/folio/edge/ltiCourses/MainVerticle.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@

import org.folio.edge.core.ApiKeyHelper;
import org.folio.edge.core.EdgeVerticleHttp;
import org.folio.edge.core.utils.OkapiClientFactory;
import org.folio.edge.core.utils.OkapiClientFactoryInitializer;
import org.folio.edge.ltiCourses.cache.BoxFileCache;
import org.folio.edge.ltiCourses.cache.OidcStateCache;
import org.folio.edge.ltiCourses.utils.LtiCoursesOkapiClientFactory;

import io.vertx.core.http.HttpMethod;
import io.vertx.ext.web.Router;
Expand Down Expand Up @@ -95,11 +96,7 @@ public Router defineRoutes() {
JadeTemplateEngine jadeTemplateEngine = JadeTemplateEngine.create(vertx);

// Next, set up the common Edge module stuff.
final LtiCoursesOkapiClientFactory ocf = new LtiCoursesOkapiClientFactory(
vertx,
config().getString(org.folio.edge.core.Constants.SYS_OKAPI_URL),
config().getInteger(org.folio.edge.core.Constants.SYS_REQUEST_TIMEOUT_MS)
);
final OkapiClientFactory ocf = OkapiClientFactoryInitializer.createInstance(vertx, config());

final ApiKeyHelper apiKeyHelper = new ApiKeyHelper("PATH");

Expand Down

This file was deleted.