diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index 48a56c99a..d58dfb70b 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -16,4 +16,4 @@ # under the License. wrapperVersion=3.3.2 distributionType=only-script -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/carapace-server/pom.xml b/carapace-server/pom.xml index dfd7ced41..3b343c07b 100644 --- a/carapace-server/pom.xml +++ b/carapace-server/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -15,6 +16,10 @@ Carapace :: Server + + io.projectreactor + reactor-tools + io.projectreactor.netty reactor-netty-core @@ -26,7 +31,6 @@ io.netty netty-tcnative-boringssl-static - ${libs.netty.ssl} org.shredzone.acme4j @@ -40,72 +44,39 @@ - org.shredzone.acme4j - acme4j-utils - ${libs.acme4j} - - - org.bouncycastle - * - - + org.bouncycastle + bcpkix-jdk18on org.bouncycastle - bcpkix-jdk15on - ${libs.bouncycastle} - jar + bcprov-jdk18on software.amazon.awssdk route53 ${libs.awssdk} - - - io.netty - * - - com.github.ben-manes.caffeine caffeine ${libs.caffeine} - - - org.antlr - ST4 - ${libs.antlr} - compile - - - - org.apache.zookeeper - zookeeper - ${libs.zookkeeper} + - org.slf4j - slf4j-log4j12 - - - log4j - log4j + org.checkerframework + checker-qual - commons-cli - commons-cli - - - org.apache.yetus - * - - - io.netty - * + com.google.errorprone + error_prone_annotations + + org.antlr + ST4 + ${libs.antlr} + org.apache.curator curator-recipes @@ -114,29 +85,19 @@ io.prometheus simpleclient - ${libs.prometheus} io.prometheus simpleclient_hotspot - ${libs.prometheus} io.prometheus simpleclient_servlet - ${libs.prometheus} org.apache.bookkeeper.stats prometheus-metrics-provider - ${libs.prometheus.metrics} - jar - - - io.netty - * - - + ${libs.bookkeeper} io.micrometer @@ -148,116 +109,87 @@ herddb-jdbc ${libs.herddb} + - io.netty - * + org.checkerframework + checker-qual + + + com.google.errorprone + error_prone_annotations + org.bouncycastle - * + bc-fips - org.apache.commons - commons-lang3 - ${libs.commons.lang3} - - - org.apache.commons - commons-pool2 - ${libs.commons-pool2} + commons-codec + commons-codec + test commons-io commons-io - ${libs.commons-io} commons-net commons-net - ${libs.commons-net} org.eclipse.jetty jetty-server - ${libs.jetty} org.eclipse.jetty jetty-webapp - ${libs.jetty} org.eclipse.jetty jetty-servlet - ${libs.jetty} org.eclipse.jetty jetty-util - ${libs.jetty} org.glassfish.jersey.core jersey-server - ${libs.jersey} org.glassfish.jersey.inject jersey-hk2 - ${libs.jersey} org.glassfish.jersey.containers jersey-container-servlet - ${libs.jersey} org.glassfish.jersey.containers jersey-container-jetty-http - ${libs.jersey} org.glassfish.jersey.media jersey-media-json-jackson - ${libs.jersey} runtime com.fasterxml.jackson.core jackson-databind - ${libs.jackson} com.fasterxml.jackson.core jackson-core - ${libs.jackson} com.fasterxml.jackson.core jackson-annotations - ${libs.jackson} - - - javax.xml.bind - jaxb-api - ${libs.jaxws.jaxb-api} - - - org.glassfish.jaxb - jaxb-runtime - ${libs.jaxws.jaxb-impl} - - - javax.activation - javax.activation-api - ${libs.javaxactivation-api} org.slf4j slf4j-api - ${libs.slf4j} org.slf4j @@ -268,7 +200,21 @@ com.google.guava guava - ${libs.guava} + + + + org.checkerframework + checker-qual + + + com.google.code.findbugs + jsr305 + + + com.google.errorprone + error_prone_annotations + + org.projectlombok @@ -301,20 +247,12 @@ junit junit - ${libs.junit} test - - - org.hamcrest - hamcrest-core - - pl.pragmatists JUnitParams ${libs.junitparams} - jar test @@ -323,6 +261,7 @@ ${libs.wiremock} test + org.hamcrest hamcrest-core @@ -335,6 +274,7 @@ ${libs.powermock} test + org.hamcrest hamcrest-core @@ -347,12 +287,6 @@ ${libs.powermock} test - - org.mockito - mockito-core - ${libs.mockito} - test - org.apache.curator curator-test @@ -368,6 +302,11 @@ org.junit.jupiter * + + + ch.qos.logback + * + diff --git a/carapace-server/src/main/java/org/carapaceproxy/server/certificates/ACMEClient.java b/carapace-server/src/main/java/org/carapaceproxy/server/certificates/ACMEClient.java index 03781d7c1..5cebe3e9c 100644 --- a/carapace-server/src/main/java/org/carapaceproxy/server/certificates/ACMEClient.java +++ b/carapace-server/src/main/java/org/carapaceproxy/server/certificates/ACMEClient.java @@ -66,10 +66,6 @@ public class ACMEClient { private final boolean testingModeOn; private final KeyPair userKey; - public enum ChallengeType { - HTTP - } - public ACMEClient(KeyPair userKey, boolean testingMode) { Security.addProvider(new BouncyCastleProvider()); this.userKey = userKey; @@ -140,10 +136,9 @@ public Map getChallengesForOrder(Order order) throws AcmeExce * @return {@link Http01Challenge} to verify */ private Http01Challenge httpChallenge(Authorization auth) throws AcmeException { - Http01Challenge challenge = auth.findChallenge(Http01Challenge.TYPE); - if (challenge == null) { - throw new AcmeException("Found no " + Http01Challenge.TYPE + " challenge, don't know what to do..."); - } + Http01Challenge challenge = auth.findChallenge(Http01Challenge.TYPE) + .map(Http01Challenge.class::cast) + .orElseThrow(() -> new AcmeException("Found no " + Http01Challenge.TYPE + " challenge, don't know what to do...")); LOG.debug("It must be reachable at: http://{}/.well-known/acme-challenge/{}", auth.getIdentifier().getDomain(), challenge.getToken() ); @@ -161,10 +156,10 @@ private Http01Challenge httpChallenge(Authorization auth) throws AcmeException { * @throws org.shredzone.acme4j.exception.AcmeException */ public Challenge dnsChallenge(Authorization auth) throws AcmeException { - Dns01Challenge challenge = auth.findChallenge(Dns01Challenge.TYPE); - if (challenge == null) { - throw new AcmeException("Found no " + Dns01Challenge.TYPE + " challenge, don't know what to do..."); - } + Dns01Challenge challenge = auth + .findChallenge(Dns01Challenge.TYPE) + .map(Dns01Challenge.class::cast) + .orElseThrow(() -> new AcmeException("Found no " + Dns01Challenge.TYPE + " challenge, don't know what to do...")); LOG.info("DNS-challenge _acme-challenge.{}. to save as TXT-record with content {}", auth.getIdentifier().getDomain(), challenge.getDigest()); return challenge; } diff --git a/carapace-server/src/test/java/org/carapaceproxy/RawClientTest.java b/carapace-server/src/test/java/org/carapaceproxy/RawClientTest.java index 435bfa6b7..405bd2c62 100644 --- a/carapace-server/src/test/java/org/carapaceproxy/RawClientTest.java +++ b/carapace-server/src/test/java/org/carapaceproxy/RawClientTest.java @@ -762,7 +762,7 @@ public void testClosedProxy(String scheme) throws Exception { .withHeader("Content-Type", "text/html") .withHeader("Content-Length", "it works !!".length() + "") .withBody("it works !!"))); - String s = client.executeRequest("GET " + scheme + "://yahoo.com/index.html?p1=v1&p2=https://localhost/index.html?p=1 HTTP/1.1 \r\nHost: localhost\r\n\r\n").getBodyString(); + String s = client.executeRequest("GET " + scheme + "://yahoo.com/index.html?p1=v1&p2=https://localhost/index.html?p=1 HTTP/1.1\r\nHost: localhost\r\n\r\n").getBodyString(); assertEquals("it works !!", s); s = client.get("/index.html?p1=v1&p2=https://localhost/index.html?p=1").getBodyString(); assertEquals("it works !!", s); @@ -773,7 +773,7 @@ public void testClosedProxy(String scheme) throws Exception { .withHeader("Content-Type", "text/html") .withHeader("Content-Length", "it works !!".length() + "") .withBody("it works !!"))); - s = client.executeRequest("GET " + scheme + "://yahoo.com/index.html HTTP/1.1 \r\nHost: localhost\r\n\r\n").getBodyString(); + s = client.executeRequest("GET " + scheme + "://yahoo.com/index.html HTTP/1.1\r\nHost: localhost\r\n\r\n").getBodyString(); assertEquals("it works !!", s); s = client.get("/index.html").getBodyString(); assertEquals("it works !!", s); @@ -785,11 +785,11 @@ public void testClosedProxy(String scheme) throws Exception { .withHeader("Content-Type", "text/html") .withHeader("Content-Length", "it works !!".length() + "") .withBody("it works !!"))); - s = client.executeRequest("GET " + scheme + "://yahoo.com/?p1=v1&p2=https://localhost/index.html?p=1 HTTP/1.1 \r\nHost: localhost\r\n\r\n").getBodyString(); + s = client.executeRequest("GET " + scheme + "://yahoo.com/?p1=v1&p2=https://localhost/index.html?p=1 HTTP/1.1\r\nHost: localhost\r\n\r\n").getBodyString(); assertEquals("it works !!", s); s = client.get("/?p1=v1&p2=https://localhost/index.html?p=1").getBodyString(); assertEquals("it works !!", s); - s = client.executeRequest("GET " + scheme + "://yahoo.com?p1=v1&p2=https://localhost/index.html?p=1 HTTP/1.1 \r\nHost: localhost\r\n\r\n").getBodyString(); + s = client.executeRequest("GET " + scheme + "://yahoo.com?p1=v1&p2=https://localhost/index.html?p=1 HTTP/1.1\r\nHost: localhost\r\n\r\n").getBodyString(); assertEquals("it works !!", s); s = client.get("?p1=v1&p2=https://localhost/index.html?p=1").getBodyString(); assertEquals("it works !!", s); @@ -800,11 +800,11 @@ public void testClosedProxy(String scheme) throws Exception { .withHeader("Content-Type", "text/html") .withHeader("Content-Length", "it works !!".length() + "") .withBody("it works !!"))); - s = client.executeRequest("GET " + scheme + "://yahoo.com/ HTTP/1.1 \r\nHost: localhost\r\n\r\n").getBodyString(); + s = client.executeRequest("GET " + scheme + "://yahoo.com/ HTTP/1.1\r\nHost: localhost\r\n\r\n").getBodyString(); assertEquals("it works !!", s); s = client.get("/").getBodyString(); assertEquals("it works !!", s); - s = client.executeRequest("GET " + scheme + "://yahoo.com HTTP/1.1 \r\nHost: localhost\r\n\r\n").getBodyString(); + s = client.executeRequest("GET " + scheme + "://yahoo.com HTTP/1.1\r\nHost: localhost\r\n\r\n").getBodyString(); assertEquals("it works !!", s); } } diff --git a/carapace-ui/pom.xml b/carapace-ui/pom.xml index cf637e3ef..c01ad4f7c 100644 --- a/carapace-ui/pom.xml +++ b/carapace-ui/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 @@ -23,27 +24,9 @@ src/main/webapp - - - javax - javaee-web-api - 7.0 - provided - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - ${endorsed.dir} - - - org.apache.maven.plugins maven-war-plugin @@ -52,30 +35,6 @@ false - - org.apache.maven.plugins - maven-dependency-plugin - - - validate - - copy - - - ${endorsed.dir} - true - - - javax - javaee-endorsed-api - 7.0 - jar - - - - - - diff --git a/pom.xml b/pom.xml index 4e98bdd9e..624af7eec 100644 --- a/pom.xml +++ b/pom.xml @@ -1,5 +1,6 @@ - + 4.0.0 org.carapaceproxy @@ -91,46 +92,45 @@ ${toolchain.java.version} 2.4 - 2022.0.7 - 2.0.61.Final - 2.12 - 1.70 + 2023.0.11 + 4.1.114.Final + 3.4.0 + 1.78.1 2.17.113 3.0.5 4.3.1 - 3.7.0 + 4.14.8 + 3.8.4 5.2.0 - 0.14.1 - 4.14.4 + 0.16.0 1.11.0 0.26.1 + 1.15 3.12.0 - 2.11.1 - 2.11.0 - 3.11.0 + 1.2 + 2.14.0 + 3.11.0 - 9.4.44.v20210927 + 9.4.52.v20230823 2.35 - 2.13.1 - 2.3.1 - 3.0.2 - 1.2.0 - 1.7.33 - 31.1-jre + 2.14.3 + 3.27.0-GA + 1.7.35 + 33.3.1-jre 1.18.32 4.5.3 + 3.17.1 4.13.2 1.1.1 - 2.35.0 + 2.35.2 2.0.9 - 3.12.4 + 3.0.1 2.2 - 4.5.3.0 9.2 @@ -153,18 +153,145 @@ + io.projectreactor reactor-bom ${libs.projectreactor} + import + pom + + + io.netty + netty-bom + ${libs.netty} + import + pom + + + org.eclipse.jetty + jetty-bom + ${libs.jetty} + import + pom + + + org.glassfish.jersey + jersey-bom + ${libs.jersey} + import + pom + + + com.fasterxml.jackson + jackson-bom + ${libs.jackson} + import + pom + + + com.google.guava + guava-bom + ${libs.guava} + import pom + + + io.prometheus + simpleclient_bom + ${libs.prometheus} import + pom + + + + org.slf4j + slf4j-api + ${libs.slf4j} + + + commons-codec + commons-codec + ${libs.commons.codec} + + + commons-io + commons-io + ${libs.commons.io} + + + commons-logging + commons-logging + ${libs.commons.logging} + + + commons-net + commons-net + ${libs.commons.net} + + + org.apache.commons + commons-lang3 + ${libs.commons.lang3} + + + org.apache.zookeeper + zookeeper + ${libs.zookkeeper} + + org.apache.zookeeper + zookeeper-jute + ${libs.zookkeeper} + + + org.bouncycastle + bcpkix-jdk18on + ${libs.bouncycastle} + + + org.bouncycastle + bcprov-jdk18on + ${libs.bouncycastle} + + + com.google.protobuf + protobuf-java + ${libs.protobuf} + + + org.apache.bookkeeper.stats + bookkeeper-stats-api + ${libs.bookkeeper} + + org.hamcrest hamcrest ${libs.hamcrest} + + junit + junit + ${libs.junit} + + + + org.hamcrest + hamcrest-core + + + + + org.objenesis + objenesis + ${libs.objenesis} + + + org.javassist + javassist + ${libs.javassist} + @@ -194,7 +321,7 @@ com.github.spotbugs spotbugs-maven-plugin - ${plugins.spotbugsmaven} + 4.8.6.4 Max 4096 @@ -211,7 +338,7 @@ org.apache.maven.plugins maven-surefire-plugin - 3.2.5 + 3.5.1 false false @@ -247,7 +374,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.6.1 + 3.8.0 org.codehaus.mojo @@ -257,7 +384,37 @@ org.apache.maven.plugins maven-assembly-plugin - 3.6.0 + 3.7.1 + + + org.apache.maven.plugins + maven-clean-plugin + 3.4.0 + + + org.apache.maven.plugins + maven-install-plugin + 3.1.3 + + + org.apache.maven.plugins + maven-site-plugin + 3.20.0 + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.3 + + + org.apache.maven.plugins + maven-resources-plugin + 3.3.1 + + + org.apache.maven.plugins + maven-jar-plugin + 3.4.2 @@ -270,7 +427,7 @@ org.apache.maven.plugins maven-release-plugin - 3.0.1 + 3.1.1 production production @@ -283,6 +440,47 @@ true + + org.apache.maven.plugins + maven-enforcer-plugin + 3.5.0 + + + enforce-dependency-convergence + + enforce + + + + + + + + ${project.groupId} + + + + + com.google.errorprone + com.google.code.findbugs + org.bouncycastle:* + org.checkerframework + org.hamcrest:hamcrest-core + + + org.bouncycastle:*-jdk18on + + + + + 3.9 + + + + + + +