From 67d22089b2601ddea8de0eaaac7c71b9dc9cd45c Mon Sep 17 00:00:00 2001 From: Wojciech Baszczyk Date: Wed, 31 Jul 2024 08:46:40 +0200 Subject: [PATCH] fix: Revert do not use 4.1.4 with version lower or equal to 4.3.x => 4.1.x --- pom.xml | 30 ++++--------------- .../jwk/source/VertxResourceRetriever.java | 4 +-- .../retriever/VertxResourceRetriever.java | 5 ++-- .../policy/jwt/jwk/AbstractJWKTest.java | 2 +- 4 files changed, 12 insertions(+), 29 deletions(-) diff --git a/pom.xml b/pom.xml index aac32385..8799ee80 100644 --- a/pom.xml +++ b/pom.xml @@ -30,17 +30,16 @@ io.gravitee gravitee-parent - 22.1.0 + 22.0.2 - 7.0.23 - 4.4.0 - 3.5.0 - 5.18.3 - 4.4.0 - + 6.0.3 + 3.0.0 1.11.0 + 3.1.0 + 3.3.3 + 4.1.0-SNAPSHOT 9.15.2 0.35.0 @@ -78,13 +77,6 @@ gravitee-common ${gravitee-common.version} - - io.gravitee.node - gravitee-node - ${gravitee-node.version} - import - pom - @@ -105,16 +97,6 @@ gravitee-common provided - - io.gravitee.node - gravitee-node-api - provided - - - io.gravitee.node - gravitee-node-vertx - provided - com.nimbusds diff --git a/src/main/java/io/gravitee/policy/jwt/jwk/source/VertxResourceRetriever.java b/src/main/java/io/gravitee/policy/jwt/jwk/source/VertxResourceRetriever.java index 2523e386..b1714791 100644 --- a/src/main/java/io/gravitee/policy/jwt/jwk/source/VertxResourceRetriever.java +++ b/src/main/java/io/gravitee/policy/jwt/jwk/source/VertxResourceRetriever.java @@ -16,8 +16,8 @@ package io.gravitee.policy.jwt.jwk.source; import com.nimbusds.jose.util.Resource; +import io.gravitee.common.util.VertxProxyOptionsUtils; import io.gravitee.node.api.configuration.Configuration; -import io.gravitee.node.vertx.proxy.VertxProxyOptionsUtils; import io.reactivex.rxjava3.core.Single; import io.vertx.core.http.HttpClientOptions; import io.vertx.core.http.HttpHeaders; @@ -84,7 +84,7 @@ private HttpClient buildHttpClient(URL url) { if (useSystemProxy) { try { - options.setProxyOptions(VertxProxyOptionsUtils.buildProxyOptions(configuration)); + VertxProxyOptionsUtils.setSystemProxy(options, configuration); } catch (Exception e) { log.warn( "JWTPlugin requires a system proxy to be defined to retrieve resource [{}] but some configurations are missing or not well defined: {}", diff --git a/src/main/java/io/gravitee/policy/v3/jwt/jwks/retriever/VertxResourceRetriever.java b/src/main/java/io/gravitee/policy/v3/jwt/jwks/retriever/VertxResourceRetriever.java index 67138f68..b434e6db 100644 --- a/src/main/java/io/gravitee/policy/v3/jwt/jwks/retriever/VertxResourceRetriever.java +++ b/src/main/java/io/gravitee/policy/v3/jwt/jwks/retriever/VertxResourceRetriever.java @@ -15,9 +15,10 @@ */ package io.gravitee.policy.v3.jwt.jwks.retriever; +import static io.gravitee.common.util.VertxProxyOptionsUtils.setSystemProxy; + import com.nimbusds.jose.util.Resource; import io.gravitee.node.api.configuration.Configuration; -import io.gravitee.node.vertx.proxy.VertxProxyOptionsUtils; import io.vertx.core.Future; import io.vertx.core.Promise; import io.vertx.core.Vertx; @@ -57,7 +58,7 @@ public CompletableFuture retrieve(URL url) { if (useSystemProxy) { try { - options.setProxyOptions(VertxProxyOptionsUtils.buildProxyOptions(configuration)); + setSystemProxy(options, configuration); } catch (Exception e) { LOGGER.warn( "JWTPlugin requires a system proxy to be defined to retrieve resource [{}] but some configurations are missing or not well defined: {}", diff --git a/src/test/java/io/gravitee/policy/jwt/jwk/AbstractJWKTest.java b/src/test/java/io/gravitee/policy/jwt/jwk/AbstractJWKTest.java index 41c35677..355fd896 100644 --- a/src/test/java/io/gravitee/policy/jwt/jwk/AbstractJWKTest.java +++ b/src/test/java/io/gravitee/policy/jwt/jwk/AbstractJWKTest.java @@ -36,8 +36,8 @@ import java.util.Date; import java.util.stream.Stream; import net.schmizz.sshj.common.Buffer; +import org.apache.commons.lang3.RandomStringUtils; import org.junit.jupiter.params.provider.Arguments; -import wiremock.org.apache.commons.lang3.RandomStringUtils; /** * @author Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com)