From 3a008b26c097d455e4ec9d638794051851404ff1 Mon Sep 17 00:00:00 2001 From: allanmckenzie Date: Wed, 19 Oct 2022 09:38:46 +0100 Subject: [PATCH] Update wildfly to 26.1.2.Final --- CHANGELOG.md | 6 + .../example-service/example-it/pom.xml | 2 +- .../example/cakeshop/it/helpers/Querier.java | 16 +- .../it/helpers/RestEasyClientFactory.java | 8 +- .../{standalone-single.xml => standalone.xml} | 226 +++++++++--------- pom.xml | 10 +- 6 files changed, 142 insertions(+), 126 deletions(-) rename example-context/example-service/example-it/src/test/resources/wildfly-config/{standalone-single.xml => standalone.xml} (82%) diff --git a/CHANGELOG.md b/CHANGELOG.md index a76054ea..80173d15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -26,6 +26,12 @@ on [Keep a CHANGELOG](http://keepachangelog.com/). This project adheres to - Added support for feature toggling with an integration test showing it working - Added healthcheck integration test +### Security +- Updates to various libraries to address security alerts: + - wildfly to version 26.1.2.Final + - artemis to version 2.20.0 + - resteasy-client to version 4.7.7.Final + ## [2.0.0] - 2019-08-19 ### Added - Update to framework 6.0.6 diff --git a/example-context/example-service/example-it/pom.xml b/example-context/example-service/example-it/pom.xml index 4d8041ea..6cf6a5ca 100644 --- a/example-context/example-service/example-it/pom.xml +++ b/example-context/example-service/example-it/pom.xml @@ -466,7 +466,7 @@ - standalone-single.xml + standalone.xml diff --git a/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/Querier.java b/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/Querier.java index 9150e94c..07f9f1ae 100644 --- a/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/Querier.java +++ b/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/Querier.java @@ -34,19 +34,23 @@ public Querier(final Client client) { } public ApiResponse queryForRecipe(final String recipeId) { - final Response jaxrsResponse = client.target(RECIPES_RESOURCE_QUERY_URI + recipeId).request().accept(QUERY_RECIPE_MEDIA_TYPE).get(); - return ApiResponse.from(jaxrsResponse); + try(final Response jaxrsResponse = client.target(RECIPES_RESOURCE_QUERY_URI + recipeId).request().accept(QUERY_RECIPE_MEDIA_TYPE).get()) { + return ApiResponse.from(jaxrsResponse); + } } public ApiResponse queryForOrder(final String orderId) { - final Response jaxrsResponse = client.target(ORDERS_RESOURCE_QUERY_URI + orderId).request().accept(QUERY_ORDER_MEDIA_TYPE).get(); - return ApiResponse.from(jaxrsResponse); + try(final Response jaxrsResponse = client.target(ORDERS_RESOURCE_QUERY_URI + orderId).request().accept(QUERY_ORDER_MEDIA_TYPE).get()) { + return ApiResponse.from(jaxrsResponse); + } } public ApiResponse queryForIndex(final String recipeId) { - final Response jaxrsResponse = client.target(INDEXES_RESOURCE_QUERY_URI + recipeId).request().accept(QUERY_INDEX_MEDIA_TYPE).get(); - return ApiResponse.from(jaxrsResponse); + try (final Response jaxrsResponse = client.target(INDEXES_RESOURCE_QUERY_URI + recipeId).request().accept(QUERY_INDEX_MEDIA_TYPE).get()) { + return ApiResponse.from(jaxrsResponse); + } } + public ApiResponse recipesQueryResult() { return recipesQueryResult(singletonList(new BasicNameValuePair("pagesize", "50"))); } diff --git a/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/RestEasyClientFactory.java b/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/RestEasyClientFactory.java index e2ccb1b3..87aed414 100644 --- a/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/RestEasyClientFactory.java +++ b/example-context/example-service/example-it/src/test/java/uk/gov/justice/services/example/cakeshop/it/helpers/RestEasyClientFactory.java @@ -4,8 +4,8 @@ import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.jboss.resteasy.client.jaxrs.ResteasyClient; -import org.jboss.resteasy.client.jaxrs.ResteasyClientBuilder; -import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient4Engine; +import org.jboss.resteasy.client.jaxrs.engines.ApacheHttpClient43Engine; +import org.jboss.resteasy.client.jaxrs.internal.ResteasyClientBuilderImpl; public class RestEasyClientFactory { @@ -14,7 +14,7 @@ public ResteasyClient createResteasyClient() { final CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(cm).build(); cm.setMaxTotal(200); // Increase max total connection to 200 cm.setDefaultMaxPerRoute(20); // Increase default max connection per route to 20 - final ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpClient); - return new ResteasyClientBuilder().httpEngine(engine).build(); + final ApacheHttpClient43Engine engine = new ApacheHttpClient43Engine(httpClient); + return new ResteasyClientBuilderImpl().httpEngine(engine).build(); } } diff --git a/example-context/example-service/example-it/src/test/resources/wildfly-config/standalone-single.xml b/example-context/example-service/example-it/src/test/resources/wildfly-config/standalone.xml similarity index 82% rename from example-context/example-service/example-it/src/test/resources/wildfly-config/standalone-single.xml rename to example-context/example-service/example-it/src/test/resources/wildfly-config/standalone.xml index 14a31ba5..db0eb6d5 100644 --- a/example-context/example-service/example-it/src/test/resources/wildfly-config/standalone-single.xml +++ b/example-context/example-service/example-it/src/test/resources/wildfly-config/standalone.xml @@ -1,6 +1,6 @@ - + - + @@ -19,7 +19,6 @@ - @@ -30,12 +29,13 @@ + + + - - @@ -43,31 +43,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - @@ -82,8 +57,8 @@ - - + + @@ -100,6 +75,7 @@ + @@ -115,6 +91,9 @@ + + + @@ -128,7 +107,7 @@ - + @@ -141,7 +120,7 @@ - + @@ -154,7 +133,7 @@ - + jdbc:postgresql://localhost:5432/frameworkeventstore @@ -232,7 +211,14 @@ - + + + + + + + + false @@ -245,13 +231,13 @@ - + - + @@ -282,7 +268,7 @@ - + @@ -295,11 +281,14 @@ + + + - + @@ -312,14 +301,14 @@ - - - - + + + + @@ -367,28 +356,36 @@ + + + + + + + - + - + - + - + + @@ -398,38 +395,67 @@ + + + + + + + + + + + + + + + + + + + - + - - + + + - - - - - - + + + + + + + + + + - + - + - + - + + + + + + @@ -463,34 +489,39 @@ - + - + - + + - + - + + + - + + + @@ -503,10 +534,14 @@ - - - - + + + + + + + + @@ -519,43 +554,11 @@ - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -563,7 +566,7 @@ - + @@ -573,15 +576,15 @@ - + - + - + @@ -594,8 +597,11 @@ + + + - + ${jboss.bind.address:127.0.0.1} diff --git a/pom.xml b/pom.xml index 38620af6..7ff3337a 100644 --- a/pom.xml +++ b/pom.xml @@ -31,12 +31,12 @@ cake-shop - 20.0.1.Final - 2.0.2.Final + 26.1.2.Final + 3.2.0.Final - 11.0.0-M22 - 11.0.0-M21 - 11.0.0-M23 + 11.0.0-M23 + 11.0.0-M22 + 11.0.0-M24