[java-idp-integration-tests] branch main updated: Fix tests for Jetty Plugin with Jetty 12.0
Codeberg
noreply at shibboleth.net
Tue Apr 28 01:27:11 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-idp-integration-tests.
View the commit online:
https://codeberg.org/Shibboleth/java-idp-integration-tests/commit/2dda450df153fc38940c4dc932d02cbca1e4ae9b
The following commit(s) were added to refs/heads/main by this push:
new 2dda450 Fix tests for Jetty Plugin with Jetty 12.0
2dda450 is described below
commit 2dda450df153fc38940c4dc932d02cbca1e4ae9b
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Mon Apr 27 13:26:07 2026 -0500
Fix tests for Jetty Plugin with Jetty 12.0
Next up : Jetty 12.1
---
pom.xml | 6 ++--
.../shibboleth/idp/integration/tests/BaseTest.java | 41 +++++++---------------
.../tests/consent/BasePostgresConsentTest.java | 2 +-
.../idp/integration/tests/oidc/RPTest.java | 19 ++--------
src/test/jetty-base/webapps/testbed.xml | 5 ++-
5 files changed, 21 insertions(+), 52 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7a81eab..8478e7e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -24,8 +24,8 @@
<idp-to-be-tested.version>${idp.version}</idp-to-be-tested.version>
<!-- Jetty -->
- <jetty.version>12.0.29</jetty.version>
- <idp-jetty-base.version>12.0.0-SNAPSHOT</idp-jetty-base.version>
+ <jetty.version>12.0.34</jetty.version>
+ <idp-jetty-base.version>12.1.0</idp-jetty-base.version>
<!-- Tomcat -->
<tomcat.version>10.1.48</tomcat.version>
@@ -565,7 +565,7 @@
verbose="true" />
<!-- Replace p12 password -->
<replace
- file="${test-distributions.directory}/jetty-base/start.d/idp.ini"
+ file="${test-distributions.directory}/jetty-base/start.d/shibboleth.ini"
token="changeit"
value="${env.SHIB_TESTS_OP_TLS_PWD}"
summary="true" />
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/BaseTest.java b/src/test/java/net/shibboleth/idp/integration/tests/BaseTest.java
index e3eb9b0..a2a8a4d 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/BaseTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/BaseTest.java
@@ -648,35 +648,18 @@ public abstract class BaseTest {
// set tmp directory system property
serverCommands.add("-Djava.io.tmpdir=" + pathToJettyBase.resolve("tmp").toAbsolutePath());
- // Adjust package name for Jetty 12
- if (jettyVersion.startsWith("12")) {
- final Path pathToTestbedXML = pathToJettyBase.resolve(Paths.get("webapps", "testbed.xml"));
- replaceFile(pathToTestbedXML, "org.eclipse.jetty.webapp.WebAppContext",
- "org.eclipse.jetty.ee9.webapp.WebAppContext");
- }
-
// Adjust path to credentials
- final Path idpIni = pathToJettyBase.resolve(Paths.get("start.d", "idp.ini"));
+ final Path idpIni = pathToJettyBase.resolve(Paths.get("start.d", "shibboleth.ini"));
Assert.assertTrue(idpIni.toFile().exists());
replaceFile(idpIni, "../credentials", "credentials");
- }
-
- /**
- * Disable SNI host check by adding jetty.ssl.sniHostCheck=false to idp.ini for Jetty after version 9.
- *
- * @throws IOException
- */
- @BeforeClass(enabled = true, dependsOnMethods = {"setUpJettyPaths"})
- public void setUpJettySNI() throws IOException {
- if (Boolean.getBoolean("tomcat")) {
- log.debug("Not setting up Jetty WebInfIncludeJarPattern because system property 'tomcat' is true");
- return;
- }
- final Path idpIni = pathToJettyBase.resolve(Paths.get("start.d", "idp.ini"));
- log.debug("Path to start.d/idp.ini '{}'", idpIni.toAbsolutePath());
- Assert.assertTrue(idpIni.toFile().exists());
- log.debug("Disabling Jetty SNI host check for version '{}'", jettyVersion);
- replaceFile(idpIni, "\\z", System.lineSeparator() + "jetty.ssl.sniHostCheck=false");
+
+ // Downgrade to ee9 for Jetty 12.0
+ final Path shibbolethMod = pathToJettyBase.resolve(Paths.get("modules", "shibboleth.mod"));
+ replaceFile(shibbolethMod, "ee11", "ee9");
+ final Path idpXML = pathToJettyBase.resolve(Paths.get("webapps", "idp.xml"));
+ replaceFile(idpXML, "ee11", "ee9");
+ final Path testbedXML = pathToJettyBase.resolve(Paths.get("webapps", "testbed.xml"));
+ replaceFile(testbedXML, "ee11", "ee9");
}
/**
@@ -833,7 +816,7 @@ public abstract class BaseTest {
* <ul>
* <li>Configure access in conf/access-control.xml</li>
* <li>Configure LDAP port in conf/ldap.properties</li>
- * <li>Configure Jetty endpoints in jetty-base/start.d/idp.ini</li>
+ * <li>Configure Jetty endpoints in jetty-base/start.d/shibboleth.ini</li>
* <li>Configure metadata endpoints in metadata/example-metadata.xml</li>
* </ul>
*
@@ -880,7 +863,7 @@ public abstract class BaseTest {
// Jetty endpoints.
if (pathToJettyBase != null) {
- final Path pathToJettyIdPIni = pathToJettyBase.resolve(Paths.get("start.d", "idp.ini"));
+ final Path pathToJettyIdPIni = pathToJettyBase.resolve(Paths.get("start.d", "shibboleth.ini"));
// Jetty with jetty-base 9.4+ listens on all addresses by default
replaceProperty(pathToJettyIdPIni, "jetty.http.host", privateSecureAddress);
@@ -927,7 +910,7 @@ public abstract class BaseTest {
replaceFile(pathToIdPMod, "https", "http\nhttps");
// Set HTTP port used by Jetty
- final Path pathToIdpIni = pathToJettyBase.resolve(Paths.get("start.d", "idp.ini"));
+ final Path pathToIdpIni = pathToJettyBase.resolve(Paths.get("start.d", "shibboleth.ini"));
replaceFile(pathToIdpIni, "\\z", System.lineSeparator() + "jetty.http.port=" + port);
// Set secure container session cookie to false
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/consent/BasePostgresConsentTest.java b/src/test/java/net/shibboleth/idp/integration/tests/consent/BasePostgresConsentTest.java
index 58e7905..46f768e 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/consent/BasePostgresConsentTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/consent/BasePostgresConsentTest.java
@@ -196,7 +196,7 @@ public abstract class BasePostgresConsentTest extends AbstractSAML2IntegrationTe
final Path pathToServerXML = pathToTomcatBase.resolve(Paths.get("conf", "server.xml"));
replaceFile(pathToServerXML, "secure=\"true\">", "secure=\"true\" encodedSolidusHandling=\"decode\">");
} else {
- final Path idpIni = pathToJettyBase.resolve(Paths.get("start.d", "idp.ini"));
+ final Path idpIni = pathToJettyBase.resolve(Paths.get("start.d", "shibboleth.ini"));
replaceFile(idpIni, "\\z",
System.lineSeparator() + "jetty.httpConfig.uriCompliance=DEFAULT,AMBIGUOUS_PATH_SEPARATOR");
}
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/oidc/RPTest.java b/src/test/java/net/shibboleth/idp/integration/tests/oidc/RPTest.java
index 9385c5a..df2062c 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/oidc/RPTest.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/oidc/RPTest.java
@@ -252,7 +252,7 @@ public class RPTest extends BaseOPTest {
// Run installer
final Process installerProcess = installerBuilder.start();
- logProcess(installerProcess, "install :");
+ logProcess(installerProcess, "Install OP :");
}
/**
@@ -321,8 +321,6 @@ public class RPTest extends BaseOPTest {
setUpOPTomcatPorts();
- setUpJettySNI();
-
copyFromIdPDistToIdPHome("credentials");
setUpOPPlugin();
@@ -442,18 +440,12 @@ public class RPTest extends BaseOPTest {
return;
}
- // Path to the project build directory.
- final Path buildPath = Paths.get(TEST_DISTRIBUTIONS_DIRECTORY);
- log.debug("Path to build directory '{}'", buildPath.toAbsolutePath());
- Assert.assertTrue(buildPath.toAbsolutePath().toFile().exists(), "Path to build directory not found");
-
// Path to jetty.base for the OP
pathToOpJettyBase = pathToIdPHome.getParent().resolve(Paths.get("jetty-base-op"));
log.debug("Path to jetty.base for OP '{}'", pathToOpJettyBase.toAbsolutePath());
// Copy jetty-base
- final Path pathToJettyBaseDist = buildPath.resolve("jetty-base");
- FileSystemUtils.copyRecursively(pathToJettyBaseDist, pathToOpJettyBase);
+ FileSystemUtils.copyRecursively(pathToJettyBase, pathToOpJettyBase);
Assert.assertNotNull(pathToOpJettyBase, "Path to jetty.base for OP not found");
Assert.assertTrue(pathToOpJettyBase.toAbsolutePath().toFile().exists(), "Path to jetty.base for OP not found");
@@ -469,11 +461,6 @@ public class RPTest extends BaseOPTest {
// Remove testbed webapp
final Path pathToTestbedXML = pathToOpJettyBase.resolve(Paths.get("webapps", "testbed.xml"));
pathToTestbedXML.toFile().delete();
-
- // Adjust path to credentials
- final Path idpIni = pathToOpJettyBase.resolve(Paths.get("start.d", "idp.ini"));
- Assert.assertTrue(idpIni.toFile().exists());
- replaceFile(idpIni, "../credentials", "credentials");
}
/**
@@ -491,7 +478,7 @@ public class RPTest extends BaseOPTest {
return;
}
- final Path pathToJettyIdPIni = pathToOpJettyBase.resolve(Paths.get("start.d", "idp.ini"));
+ final Path pathToJettyIdPIni = pathToOpJettyBase.resolve(Paths.get("start.d", "shibboleth.ini"));
replaceProperty(pathToJettyIdPIni, "jetty.http.host", privateSecureAddress);
replaceProperty(pathToJettyIdPIni, "jetty.http.port", Integer.toString(opPort));
diff --git a/src/test/jetty-base/webapps/testbed.xml b/src/test/jetty-base/webapps/testbed.xml
index 63fb6e0..00e123d 100644
--- a/src/test/jetty-base/webapps/testbed.xml
+++ b/src/test/jetty-base/webapps/testbed.xml
@@ -1,15 +1,14 @@
<?xml version="1.0"?>
<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "https://www.eclipse.org/jetty/configure_10_0.dtd">
<!-- =============================================================== -->
-<!-- Configure the Shibboleth IdP Testbed webapp -->
+<!-- Configure the Shibboleth IdP Testbed webapp -->
<!-- =============================================================== -->
-<Configure class="org.eclipse.jetty.webapp.WebAppContext">
+<Configure class="org.eclipse.jetty.ee11.webapp.WebAppContext">
<Set name="war"><SystemProperty name="idp.home" default="/opt/shibboleth-idp" />/testbed-war/idp-testbed.war</Set>
<Set name="contextPath">/</Set>
<Set name="extractWAR">false</Set>
<Set name="copyWebDir">false</Set>
<Set name="copyWebInf">true</Set>
- <Set name="persistTempDirectory">false</Set>
<Call name="setAttribute">
<Arg>org.eclipse.jetty.server.webapp.WebInfIncludeJarPattern</Arg>
<Arg>none</Arg>
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list