Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
95d3c0d
Update gradle and dependencies
Sep 18, 2025
03c1cd1
Fix vulenarbilities related to Java dependencies
Oct 20, 2025
87afaec
Upgrade logback to 1.5.19
Nov 4, 2025
0de6d25
WIP: Jetty 12.0.15 upgrade - major API changes identified
Copilot Nov 8, 2025
fcc540f
Complete Jetty 12.0.15 upgrade with Unix socket support
Copilot Nov 8, 2025
3403148
Fix Spotless formatting in JerseyUnixSocketConnector
Copilot Nov 8, 2025
3f7c62e
Apply Google Java Format to JerseyUnixSocketConnector
Copilot Nov 8, 2025
4c66465
Apply Google Java Format to all modified files
Copilot Nov 8, 2025
1525be2
Fix header handling to use add() instead of put() in Jetty 12
Copilot Nov 8, 2025
5a53e15
Fix: Only apply Unix domain transport for Unix socket URLs
Copilot Nov 8, 2025
347ca7a
Fix: Explicitly specify TCP transport for regular HTTP requests
Copilot Nov 8, 2025
d0a85a1
CRITICAL FIX: Variable shadowing bug in constructor
Copilot Nov 8, 2025
da373ce
Fix Jetty 12 EE9 handler setup - explicitly set ServletContextHandler
Copilot Nov 10, 2025
ccfc5f4
Fix: Pass server to ServletContextHandler constructor in Jetty 12 EE9
Copilot Nov 10, 2025
f685304
Fix Jetty 12 EE9 ServletContextHandler - use official pattern from docs
Copilot Nov 10, 2025
aa29555
Fix Jetty 12 URI compliance - use LEGACY mode for backward compatibility
Copilot Nov 10, 2025
a7b3d26
Fix: Use HttpCompliance.LEGACY instead of UriCompliance.LEGACY
Copilot Nov 10, 2025
8465918
Fix Server Utility using legacy
Nov 11, 2025
70c49d4
Fix Connection Refuse error on integration test
Nov 11, 2025
13d6ed7
headers returned absulte http PATH that lost the unix scoket schema
Nov 11, 2025
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
84 changes: 62 additions & 22 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import java.time.Duration

plugins {
id "org.owasp.dependencycheck" version "7.1.0.1"
id "org.owasp.dependencycheck" version "11.1.0" apply false
id 'jacoco'
id 'com.diffplug.spotless' version '6.11.0'
id "io.github.gradle-nexus.publish-plugin" version "1.1.0"
id "org.javamodularity.moduleplugin" version "1.8.8"
id 'org.ec4j.editorconfig' version '0.0.3'
id "io.swagger.core.v3.swagger-gradle-plugin" version "2.2.0" apply false
id 'com.diffplug.spotless' version '6.25.0'
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "org.javamodularity.moduleplugin" version "1.8.15"
id 'org.ec4j.editorconfig' version '0.1.0'
id "io.swagger.core.v3.swagger-gradle-plugin" version "2.2.22" apply false
}

ext {
jettyVersion = "11.0.20"
jettyVersion = "12.0.15"
eclipselinkVersion = "3.0.2"
swaggerVersion = "2.1.13"
swaggerVersion = "2.2.22"
jerseyVersion = "3.0.4"
slf4jVersion = "1.7.36"
logbackVersion = "1.2.13"
logbackVersion = "1.5.19"
hk2Version = "3.0.2"
jacksonVersion = "2.16.2"
jacksonDatabindVersion = "2.16.2"
Expand Down Expand Up @@ -71,9 +71,11 @@ allprojects {
implementation 'org.yaml:snakeyaml:2.0' // transitive dependency of jackson-databind:2.13.3

implementation "commons-cli:commons-cli:1.5.0"
implementation "net.minidev:json-smart:2.5.0"
implementation "com.nimbusds:nimbus-jose-jwt:9.40"
implementation "commons-codec:commons-codec:1.15"
implementation "commons-io:commons-io:2.11.0"
implementation "org.apache.commons:commons-lang3:3.12.0"
implementation "commons-io:commons-io:2.14.0"
implementation "org.apache.commons:commons-lang3:3.18.0"

implementation "com.github.jnr:jnr-unixsocket:0.38.15"
implementation "com.github.jnr:jffi:1.3.9"
Expand All @@ -97,12 +99,10 @@ allprojects {
implementation "org.glassfish.jersey.core:jersey-common:$jerseyVersion"
implementation "org.glassfish.jersey.core:jersey-client:$jerseyVersion"

implementation "org.eclipse.jetty:jetty-unixsocket-common:$jettyVersion"
implementation "org.eclipse.jetty:jetty-unixsocket-client:$jettyVersion"
implementation "org.eclipse.jetty:jetty-unixsocket-server:$jettyVersion"
implementation "org.eclipse.jetty:jetty-unixdomain-server:$jettyVersion"

implementation "org.eclipse.jetty:jetty-client:$jettyVersion"
implementation "org.eclipse.jetty:jetty-servlet:$jettyVersion"
implementation "org.eclipse.jetty.ee9:jetty-ee9-servlet:$jettyVersion"

implementation "org.eclipse.jetty:jetty-server:$jettyVersion"
implementation "org.eclipse.jetty:jetty-http:$jettyVersion"
Expand All @@ -113,7 +113,7 @@ allprojects {

implementation("io.swagger.core.v3:swagger-annotations-jakarta:$swaggerVersion")
implementation("io.swagger.core.v3:swagger-core-jakarta:$swaggerVersion") //implementation "io.swagger.parser.v3:swagger-parser-jakarta:$swaggerVersion"
implementation('io.swagger.parser.v3:swagger-parser-v3:2.0.27')
implementation('io.swagger.parser.v3:swagger-parser-v3:2.1.22')
implementation "io.swagger.core.v3:swagger-jaxrs2-jakarta:$swaggerVersion"

implementation "org.bouncycastle:bcpkix-jdk18on:1.78"
Expand Down Expand Up @@ -249,11 +249,50 @@ subprojects {
}

dependencyCheck {
// Always skip dependency check in CI environments to avoid database issues
if (System.getenv("CI") == "true" || System.getenv("GITHUB_ACTIONS") == "true") {
skip = true
skipConfigurations = ["runtimeClasspath", "testRuntimeClasspath"]
}

// Local development configuration (only used when not in CI)
nvd {
apiKey = System.getenv("NVD_API_KEY")
delay = 2000
maxRetryCount = 2
validForHours = 24
}

failBuildOnCVSS = 0
suppressionFile = project.getRootProject().file("cvss-suppressions.xml")
autoUpdate = false

data {
directory = "${gradle.gradleUserHomeDir}/dependency-check-data"
}

outputDirectory = "${project.buildDir}/reports/dependency-check"

analyzers {
assemblyEnabled = false
nodeEnabled = false
archiveEnabled = true
jarEnabled = true
centralEnabled = false // Disable to avoid network issues
nexusEnabled = false
pyDistributionEnabled = false
pyPackageEnabled = false
rubygemsEnabled = false
opensslEnabled = false
cmakeEnabled = false
autoconfEnabled = false
composerEnabled = false
nuspecEnabled = false
nugetconfEnabled = false
nodeAuditEnabled = false
ossIndexEnabled = false
}
formats = ['HTML', 'XML']
}

jacoco {
Expand All @@ -265,31 +304,32 @@ subprojects {
lineEndings = "unix"

java {
// target fileTree("**/*.java")

target fileTree('.') {
include "**/src/main/java/**/*.java"
include "**/src/test/java/**/*.java"
exclude "**/build/**"
}
removeUnusedImports()
googleJavaFormat("1.15.0")
googleJavaFormat("1.19.2")
trimTrailingWhitespace()
endWithNewline()
}
groovyGradle {
target files(
fileTree('.') {
include "*.gradle"
include "**/build.gradle"
exclude "**/build/**"
})
greclipse().configFile(rootProject.file("gradle/formatter.properties"))
endWithNewline()
}
}
jacocoTestReport {
reports {
xml.enabled false
csv.enabled false
html.enabled true
xml.required.set(false)
csv.required.set(false)
html.required.set(true)
}
}
jacocoTestCoverageVerification {
Expand Down
1 change: 0 additions & 1 deletion config/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ dependencies {

testImplementation "nl.jqno.equalsverifier:equalsverifier"
// testImplementation "jakarta.el:jakarta.el-api"

}

jar {
Expand Down
1 change: 0 additions & 1 deletion key-vault/aws-key-vault/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ dependencies {
because 'databind less than 2.13.2.2 has a bug'
}
}

}

publishing {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,10 @@ final class SSLKeyStoreLoader {
private SSLKeyStoreLoader() {}

static KeyManager[] fromJksKeyStore(Path keyStoreFile, char[] keyStorePassword)
throws NoSuchAlgorithmException, IOException, KeyStoreException, CertificateException,
throws NoSuchAlgorithmException,
IOException,
KeyStoreException,
CertificateException,
UnrecoverableKeyException {

final KeyStore keyStore = KeyStore.getInstance(KEYSTORE_TYPE);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,14 @@ public interface TlsUtils {

default void generateKeyStoreWithSelfSignedCertificate(
String address, Path privateKeyFile, char[] password)
throws NoSuchAlgorithmException, IOException, OperatorCreationException, CertificateException,
InvalidKeyException, NoSuchProviderException, SignatureException, KeyStoreException {
throws NoSuchAlgorithmException,
IOException,
OperatorCreationException,
CertificateException,
InvalidKeyException,
NoSuchProviderException,
SignatureException,
KeyStoreException {

final SecureRandom secureRandom = new SecureRandom();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,14 @@ public class SSLContextBuilderTest {

@Before
public void setUp()
throws NoSuchAlgorithmException, OperatorCreationException, InvalidKeyException, IOException,
KeyStoreException, SignatureException, NoSuchProviderException, CertificateException,
throws NoSuchAlgorithmException,
OperatorCreationException,
InvalidKeyException,
IOException,
KeyStoreException,
SignatureException,
NoSuchProviderException,
CertificateException,
URISyntaxException {
keyStoreFile = Paths.get(tmpDir.getRoot().getPath(), "keystore");
knownHostFile = Paths.get(tmpDir.getRoot().getPath(), "knownHosts");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ public class TlsUtilsTest {

@Test
public void testGenerateKeys()
throws OperatorCreationException, InvalidKeyException, NoSuchAlgorithmException, IOException,
SignatureException, NoSuchProviderException, CertificateException, KeyStoreException {
throws OperatorCreationException,
InvalidKeyException,
NoSuchAlgorithmException,
IOException,
SignatureException,
NoSuchProviderException,
CertificateException,
KeyStoreException {

final Path privateKeyFile = Files.createTempFile("privatekey", ".tmp");
Files.deleteIfExists(privateKeyFile);
Expand Down
4 changes: 1 addition & 3 deletions server/jaxrs-client-unixsocket/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ dependencies {
implementation "jakarta.ws.rs:jakarta.ws.rs-api"
implementation "jakarta.xml.bind:jakarta.xml.bind-api"

implementation "org.eclipse.jetty:jetty-unixsocket-common"
implementation "org.eclipse.jetty:jetty-unixsocket-client"
implementation "org.eclipse.jetty:jetty-unixsocket-server"
implementation "org.eclipse.jetty:jetty-unixdomain-server"

implementation "org.glassfish.jersey.core:jersey-client"
implementation "org.eclipse.jetty:jetty-client"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@
import java.util.Objects;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import org.eclipse.jetty.client.BytesRequestContent;
import org.eclipse.jetty.client.ContentResponse;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.api.ContentProvider;
import org.eclipse.jetty.client.api.ContentResponse;
import org.eclipse.jetty.client.api.Request;
import org.eclipse.jetty.client.util.BytesContentProvider;
import org.eclipse.jetty.client.Request;
import org.eclipse.jetty.client.transport.HttpClientTransportDynamic;
import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.unixsocket.client.HttpClientTransportOverUnixSockets;
import org.eclipse.jetty.io.ClientConnector;
import org.eclipse.jetty.io.Transport;
import org.glassfish.jersey.client.ClientRequest;
import org.glassfish.jersey.client.ClientResponse;
import org.glassfish.jersey.client.spi.AsyncConnectorCallback;
Expand All @@ -36,11 +37,20 @@ public class JerseyUnixSocketConnector implements Connector {

private URI unixfile;

private Transport transport;

public JerseyUnixSocketConnector(URI unixfile) {
this.unixfile = unixfile;
String unixFilePath = Paths.get(unixfile).toFile().getAbsolutePath();
Path unixFilePath = Paths.get(unixfile);

// Jetty 12 uses dynamic transport with per-request transport specification
ClientConnector clientConnector = new ClientConnector();
HttpClientTransportDynamic httpTransport = new HttpClientTransportDynamic(clientConnector);
httpClient = new HttpClient(httpTransport);

// Create the Unix domain transport for this socket path
this.transport = new Transport.TCPUnix(unixFilePath);

httpClient = new HttpClient(new HttpClientTransportOverUnixSockets(unixFilePath));
try {
httpClient.start();
} catch (Exception ex) {
Expand All @@ -65,7 +75,10 @@ private ClientResponse doApply(ClientRequest request) throws Exception {
final URI uri;
Path basePath = Paths.get(unixfile);

if (originalUri.getScheme().startsWith("unix")) {
boolean isUnixSocket =
originalUri.getScheme() != null && originalUri.getScheme().startsWith("unix");

if (isUnixSocket) {

String path = originalUri.getRawPath().replaceFirst(basePath.toString(), "");

Expand All @@ -84,20 +97,32 @@ private ClientResponse doApply(ClientRequest request) throws Exception {
uri = originalUri;
}

// Create request and specify Unix domain transport only for Unix socket requests
Request clientRequest = httpClient.newRequest(uri).method(httpMethod);

// Apply the appropriate transport based on URL scheme
if (isUnixSocket) {
clientRequest = clientRequest.transport(transport);
} else {
// For regular HTTP/HTTPS, explicitly use TCP transport
clientRequest = clientRequest.transport(Transport.TCP_IP);
}

MultivaluedMap<String, Object> headers = request.getHeaders();

headers.keySet().stream()
.forEach(
name -> {
headers
.get(name)
.forEach(
value -> {
clientRequest.header(name, Objects.toString(value));
});
});
clientRequest.headers(
h -> {
headers.keySet().stream()
.forEach(
name -> {
headers
.get(name)
.forEach(
value -> {
h.add(name, Objects.toString(value));
});
});
});

if (request.hasEntity()) {
final long length = request.getLengthLong();
Expand All @@ -107,8 +132,8 @@ private ClientResponse doApply(ClientRequest request) throws Exception {
request.setStreamProvider((int contentLength) -> bout);
request.writeEntity();

ContentProvider content = new BytesContentProvider(bout.toByteArray());
clientRequest.content(content);
BytesRequestContent content = new BytesRequestContent(bout.toByteArray());
clientRequest.body(content);
}
}
final ContentResponse contentResponse = clientRequest.send();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
requires jersey.common;
requires org.eclipse.jetty.client;
requires org.eclipse.jetty.http;
requires org.eclipse.jetty.io;
requires org.eclipse.jetty.util;
requires org.slf4j;
requires org.eclipse.jetty.unixsocket.client;
requires org.eclipse.jetty.unixdomain.server;

exports com.quorum.tessera.jaxrs.unixsocket;
}
2 changes: 1 addition & 1 deletion server/jersey-server/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ dependencies {
api "jakarta.mail:jakarta.mail-api"
implementation 'com.sun.mail:jakarta.mail'

implementation "org.eclipse.jetty:jetty-servlet"
implementation "org.eclipse.jetty.ee9:jetty-ee9-servlet"
implementation "org.glassfish.jersey.inject:jersey-hk2"
implementation("org.glassfish.jersey.core:jersey-common") {
exclude group: "jakarta.annotation", module: "jakarta.annotation-api"
Expand Down
Loading
Loading