Repository navigation
Update mockserver to v9 - #131
Open
renovate[bot] wants to merge 1 commit into
Open
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
July 4, 2026 17:54
575fa38 to
8f2c921
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
2 times, most recently
from
August 1, 2026 08:28
fbd3ad5 to
e617d17
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
August 17, 2026 22:34
e617d17 to
2e276fb
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
September 1, 2026 11:56
2e276fb to
a7f14be
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
September 15, 2026 18:50
a7f14be to
151753e
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
October 1, 2026 17:09
151753e to
1d66c03
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
October 15, 2026 23:45
1d66c03 to
8fe2fda
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
2 times, most recently
from
October 27, 2026 02:02
b067a69 to
e1aa965
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
November 1, 2026 05:46
e1aa965 to
ac301c0
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
2 times, most recently
from
November 20, 2026 13:55
46aea4e to
3cf40a1
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
December 1, 2026 20:35
3cf40a1 to
e679ef1
Compare
renovate
Bot
force-pushed
the
renovate/major-mockserver
branch
from
December 2, 2026 11:52
e679ef1 to
0d60f0e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR body was truncated due to platform limits.
This PR contains the following updates:
6.1.0→9.4.16.1.0→9.4.1Release Notes
mock-server/mockserver-monorepo (org.mock-server:mockserver-client-java)
v9.4.1Added
Changed
initializationJsonPathandinitializationOpenAPIPathcan only be set at startup (BREAKING for anyone who changesinitializationJsonPathorinitializationOpenAPIPathwithPUT /mockserver/configurationor a client'supdateConfiguration; see upgrading to 9). These settings name the files MockServer loads expectations from, but aPUT /mockserver/configurationcould change them on a running server. MockServer kept watching the files it started with, yet when one of them changed it reloaded from whatever files the setting named by then, so a watched server could quietly load a different file from the one it was started with. They now behave like the other settings that name files the server reads or writes, such asstaticFilesDirectory,grpcProtocPathandcustomJsonUnitMatchersClass: aPUTthat sets a different value is still answered, but the value is ignored, a warning is logged andGET /mockserver/configurationreports the value in force; aPUTthat sends the value already in force logs nothing. Set them before the server starts with a system property, environment variable,mockserver.properties, the--initor--openapicommand-line option, orConfiguration. To load more expectations into a running server, send them withPUT /mockserver/expectationorPUT /mockserver/openapiinstead:snapshotDocker image tags, the Sonatype SNAPSHOT jars and the snapshot bundles) now publish once a week, on Monday at 02:00 UTC, instead of nightly, so a snapshot can be up to a week behindmasterFixed
TLS handshake failedwarning with Netty 4.2.21 or later; the failed forward is still reported once, with its reason-clusteredimage Temurin 21.0.13.1, the same Java builds as the x86-64 images, instead of 27.0.1.0.2 and 21.0.13. ARM64 was not affected by CVE-2026-114938; this keeps their Java up to date (#3059)v9.4.0Security
base64Bytesand gRPC-Web text bodies, before checking any credentials. On x86-64 the standard,-aot,-graaljs,-http3, snapshot and root images and themockserver-webhookimage run Eclipse Temurin 27.0.1.1, and the-clusteredimage runs Temurin 21.0.13.1; the ARM64 images, which the bug does not affect, run the newest Temurin ARM64 build (27.0.1.0.2, and 21.0.13 for-clustered). The images therefore do not set the-XX:-UseBASE64Intrinsicsworkaround. The binary bundle, which still carries its own Temurin 21 runtime, starts Java with-XX:-UseBASE64IntrinsicsafterMOCKSERVER_JAVA_OPTSinbin/mockserverandbin/mockserver.bat, andmockserver-nodeand the VS Code extension, which start the bundled Java themselves, put it in the same place. The Maven plugin'srunForkedgoal andmockserver-noderunning the jar on your own Java pass it too, before your JVM options. The option switches off the optimised Base64 encoder and decoder, and results are unchanged. Security researchers recommend it and the JDK vendors have not yet confirmed it, and remote code execution has not been demonstrated. If you run MockServer on your own Java (the executable JAR, the WAR, the Maven plugin, JUnit, Spring or the Java API), update to a fixed JDK (Oracle or Eclipse Temurin 17.0.21.1, 21.0.13.1, 25.0.5.1 or 27.0.1.1, Amazon Corretto 17.0.21.1.2, or a fixed Azul build) or add the option yourself; see the security noticecustomJsonUnitMatchersClasscan only be set at startup (BREAKING for anyone who changescustomJsonUnitMatchersClasswithPUT /mockserver/configurationor a client'supdateConfiguration; see upgrading to 9). This setting names the class MockServer loads and creates to supply custom json-unit matchers, but aPUT /mockserver/configurationcould change it on a running server, and MockServer created the named class before checking that it implementsCustomJsonUnitMatcherProvider. So anyone who could reach the control plane could make MockServer run the static initialiser and no-argument constructor of almost any class on its classpath. APUTthat sets a different value is now still answered, but the value is ignored, a warning is logged andGET /mockserver/configurationreports the value in force; aPUTthat sends the value already in force logs nothing. Set it before the server starts with a system property, environment variable,mockserver.propertiesorConfiguration. MockServer also now ignores, with the same warning as before, a named class that does not implementCustomJsonUnitMatcherProviderwithout running any of its code.dockerhub-credentialsno longer asks for the Docker Hub token in the chat or puts it on a command line; you now enter it at a hidden prompt in your own terminal, and it reaches AWS Secrets Manager through a private temporary file (#3027).pr-monitornow only reports when asked to monitor or watch PRs, and merges only when asked to merge (its script needs--merge), holds merges while a release is in progress, and no longer hides its status report (#3028)Added
Changed
-clusterednow runs Java 27: Eclipse Temurin from a checksum-pinned Adoptium download, trimmed with jlink and copied ontogcr.io/distroless/java-base-debian13. The standard and-aotimages move from Java 26 and 25. The root, snapshot,-graaljsandmockserver-webhookimages used the distroless Java 25 image and keep its Java modules except four that the Temurin 27 JDK no longer ships:jdk.graal.compiler,jdk.graal.compiler.management,jdk.internal.vm.ciandjdk.jsobject. The-clusteredimage moves from the distroless Java 21 image to a jlink-trimmed Temurin 21, because its Infinispan library cannot start on Java 24 or later, and dropsjdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.managementandjdk.jsobject. Every image uses the base image's Debian trust store (/etc/ssl/certs/java/cacerts), as the distroless Java images did, so a trust store mounted there is used. The library is still compiled for Java 17. Start-up figures for the new runtime have not been re-measured yet.-XX:+ZGenerationalnow stops the Java 27 images from starting (BREAKING for anyone who still passes it inJAVA_TOOL_OPTIONSor the Helm chart'sapp.jvmOptionsto any image except-clustered): Java 27 no longer recognises it and exits withUnrecognized VM option 'ZGenerational', where Java 25 and 26 ignored it with a warning. Drop it;-XX:+UseZGCalone already gives generational ZGC. The-clusteredimage, still on Java 21, keeps-XX:+UseZGC -XX:+ZGenerational./usr/lib/jvm/temurin-trimmed/bin/java, and on thePATH. The root, snapshot,-graaljs,-clusteredandmockserver-webhookimages keep/usr/bin/javaas a link to it, but their arch-specific Java home (such as/usr/lib/jvm/temurin-25-jre-amd64) and theJAVA_VERSIONenvironment variable are gone: usejavaon thePATHor the new path. The standard and-aotimages used/usr/lib/jvm/temurin25-trimmed/bin/java, which still works as a link to the new path, so an entrypoint override copied from an older image keeps starting; switch it to the new path.-sources.jarof each-no-dependenciesartifact on Maven Central (mockserver-netty-no-dependencies,mockserver-client-java-no-dependencies,mockserver-junit-jupiter-no-dependencies,mockserver-junit-rule-no-dependenciesandmockserver-spring-test-listener-no-dependencies) now holds only MockServer's own sources, so it is a few MB instead of 34 to 51 MB. It used to also hold the sources of every library those jars bundle. To read a bundled library's sources, use that library's own-sources.jar. The library is renamed undershaded_packagein the jar, but its sources keep the original package names.mockserver-junit-jupiter-no-dependencies,mockserver-junit-rule-no-dependenciesandmockserver-spring-test-listener-no-dependencieskeep their names but no longer each carry a full copy of the MockServer server (about 87 MB each). Each jar now holds only its own classes and brings inmockserver-netty-no-dependenciesas a dependency, which Maven and Gradle download for you, so build files need no change; if you also listedmockserver-netty-no-dependencies, you no longer get two copies of every MockServer class. Three things now matchmockserver-netty-no-dependencies: HTTPS uses Java's built-in TLS instead of bundled OpenSSL libraries; amodule-info.javathat usesClientAndServerorMockServerClientalso needsrequires org.mockserver.netty;; and a project with no SLF4J provider now gets MockServer's log output through java.util.logging. See Upgrading to 9.0.0.org/mock-server/mockserver/<version>/mockserver-<version>-cyclonedx.json(for examplehttps://repo1.maven.org/maven2/org/mock-server/mockserver/<version>/mockserver-<version>-cyclonedx.json). This applies from the release after 9.3.0. 9.3.0 published a separate<artifactId>-<version>-cyclonedx.jsonnext to each module, and itsmockserver-9.3.0-cyclonedx.jsoncovers only the parent POM. From the next release, fetch the single file instead. The single file covers the Maven plugin too.Fixed
maxLoggedMatchFailuresnow also limits requests served by a forward expectation. After the upstream answered, mock drift detection (on by default) checked the request against every expectation again and logged a "didn't match expectation" line for each one, with no limit and no "further did-not-match entries were not logged" summary, so one forwarded request could log a line per configured expectation, including a second "matched expectation" line. That check no longer logs match results; the request's own matching still logs them, within the limit. gRPC bidirectional-streaming requests, whose routing check logged every expectation it tried before the request's own matching logged them again, no longer log them twice either.PUT /mockserver/pact/verifyno longer writes a per-expectation match entry for each interaction either; its result reports the outcome (#3020)maxLoggedMatchFailuresnow also limits the "didn't match expectation" lines logged when MockServer checks an HTTP/1.1 request againstrespondBeforeBodyexpectations before its body arrives. That check logged a line for everyrespondBeforeBodyexpectation it tried, with no limit, and when none of them answered the request, the request's normal matching then logged them again. A request answered by arespondBeforeBodyexpectation now logs the expectations it was checked against within the limit, then the "matched expectation" line; any other request is logged once, by its normal matching (#3020)MockServerClientorMockServer.Testcontainers. nuget.org now limits API keys to 30 days, and an expired key failed both NuGet publish jobs in the 9.3.0 release. The publish-secrets runbook now gives the 30-day expiry and the rotation steps.mockserver-maven-pluginwas published in a second Central deployment after the other Maven artifacts, so when the first deployment used up Sonatype's monthly publishing limit the plugin was refused, which is why the 9.3.0 Maven plugin did not go live with the rest of 9.3.0. The plugin now ships in the same deployment as every other module, and before publishing the release checks Sonatype's validation warnings: if they say a publishing limit is exceeded or publishing is blocked, it drops the deployment and stops with nothing published. Warnings that only say a limit is being approached are printed and the release continues.v9.3.0Security
mockserver/mockserver-webhookimage on ECR Public is now signed tooalpine/helmandmaniator/ghimages, which receive the signing key and the GitHub token. The pins live inscripts/release/images/Dockerfile, which Dependabot keeps current in one PR that is never merged automatically and only refreshes digests or moves to a patch release on the same line. The VS Code extension is now packaged and published with the@vscode/vsceandovsxversions locked in itspackage-lock.json, instead of the latest versions installed globally in the container that holds the marketplace tokens, and the PyPI packages are built and uploaded withbuild,twineandsetuptoolsinstalled from a hash-pinned requirements file (scripts/release/requirements-publish.txt) rather than the latest versions. The npm release ofmockserver-nodeandmockserver-client-nodenow installs from their committed lockfiles (npm ci), updating only the entries the release itself changes, instead of deleting the lockfile, resolving every dependency afresh and runningnpm audit fixbefore publishing. The .NET client and Testcontainers packages are now restored in locked mode from committed NuGet lock files (packages.lock.json)proxyAuthenticationUsernameandproxyAuthenticationPasswordset, a client could use MockServer as a proxy without credentials by opening its connection the way MockServer's ownCONNECTand SOCKS tunnels open theirs internally. MockServer now accepts that opening only on its own internal tunnel connections. The forward allow, deny and private-network rules were not affected, andCONNECT, SOCKS and plain proxy requests sent with credentials work as before. Present since 5.11.0 (fixes GHSA-36c2-h3v8-7w6w)proxyAuthenticationUsernameandproxyAuthenticationPasswordset, SOCKS5 clients could proxy without credentials by offering "no authentication", SOCKS4 clients were never asked for credentials, and HTTP/3 CONNECT-UDP tunnels were opened without checking theProxy-Authorizationheader. SOCKS5 now selects username/password authentication whenever the client offers it and refuses a client that does not (replying0xFFand closing the connection), SOCKS4 is refused (it cannot carry a password) with a warning in the log, and HTTP/3 CONNECT-UDP now requires the proxy credentials, answering407without them. Without proxy credentials configured, SOCKS4, SOCKS5 and CONNECT-UDP behave as before, except that a SOCKS50xFFrefusal now also closes the connection. WithtransparentProxyEnabledalso set, MockServer now logs a warning at startup that connections handled as transparent proxying, including those whose destination comes from theHostheader or a PROXY protocol header, are not asked for proxy credentials (fixes GHSA-36c2-h3v8-7w6w)proxyAuthenticationUsernameandproxyAuthenticationPasswordset, a plain HTTP proxy request for another host (a request line holding a full URL, such asGET http://example.com/path) without the credentials was still answered by a matching expectation, and was asked for them only when nothing matched; a WebSocket upgrade for another host was relayed to it without them; and the proxy WAR (mockserver-proxy-war) never asked for them. Such a request to the standalone server now gets407before it is matched against any expectation, a WebSocket upgrade for another host is relayed only with the credentials, and the proxy WAR asks for them before matching a request whoseHostnames another host. A request sent to MockServer directly (a request line holding only a path, as every HTTP/2 and HTTP/3 request is) is still matched without proxy credentials whatever itsHostheader says, and needs them only when MockServer would forward it; requests for MockServer's own address never need them. A request refused this way is logged as a failed proxy authentication, as a refusedCONNECTis, not as a received request, so it does not count inverifyorretrieveRecordedRequests. The WAR (mockserver-war) cannot see whether a request line held a full URL, so there every request is handled like one sent to MockServer directly. Without proxy credentials configured nothing changesqs6.16.1 (GHSA-6pq8-jhm2-2vcw; it reaches the build only through@vscode/vsce→typed-rest-client), and the Rust client's lockfile resolvesrustls0.23.46 (GHSA-vp88-798v-h67f, GHSA-w44r-93j7-qv28, GHSA-c8m5-c952-6cm4, GHSA-h2v8-394m-p7vv; the client uses native TLS, sorustlsis listed in its lockfile but not compiled into it). The development lockfiles of the Node client,mockserver-node, the dashboard UI and the VS Code extension now resolveminimatch11.0.3 (GHSA-g3hv-75wg-m249) for every copy that contains the affected code: underc8→test-excludein the Node client, throughmockserver-node'sglobdevelopment dependency (now 14.0.3), foreslintand its plugins in the dashboard UI and under@vscode/vscein the VS Code extension. All butmockserver-nodeuse npmoverrides, because no release of those tools acceptsminimatch11 yet. Theminimatch3.x copies thatgruntandjshintstill pull in do not contain the affected code. The development lockfiles of the Node client andmockserver-nodenow also resolvelodash4.18.1 for the copy underjshint(GHSA-f23m-r3pf-42rh), through an npmoverridesentry becausejshintaccepts onlylodash4.17.x;jshintdoes not call the affected_.unset,_.omitor_.pullAtmockserver/mockserver, built fromdocker/local), the-aotimage and the referencedocker/Dockerfileimage now run ongcr.io/distroless/java-base-debian13:nonrootinstead ofjava-base-debian12. Distroless stopped buildingjava-base-debian12in February 2026 (GoogleContainerTools/distroless#2023), so its pinned digest could no longer pick up Debian security fixes; the new base shipslibbrotli11.1.0-2+deb13u1, fixing CVE-2026-111497 (DSA-6582-1), and is the same Debian release as the other image variants (#2927)glob14.0.3 andminimatch11.0.3 underarchiver, a runtime dependency of the published@mockserver/testcontainerspackage (GHSA-3g3m-2fjr-6pw4, GHSA-g3hv-75wg-m249). The fix uses npmoverrides, which npm does not apply when another project installs the package, so a project that depends on@mockserver/testcontainersresolves these from its own lockfile untilarchivermoves to the patched releases; it can add the sameoverridesitself. The module does not reach the affected code:archivercopies a directory without a glob pattern, and the affectedglobcopy is used only by anarchiver-utilshelper thatarchiverdoes not callforwardProxyBlockPrivateNetworks,forwardProxyAllowedHosts,forwardProxyDeniedHosts) could be sidestepped by a destination an upstream proxy reads differently from MockServer. ThroughforwardHttpProxythe proxy's request line was built from the rawHostheader and path, so aHostsuch as8.8.8.8:80@169.254.169.254orallowed?.example.com, a secondHostheader, or a path not starting with/could send the proxy to a host that was never checked. A plain HTTP request sent throughforwardHttpProxynow needs exactly oneHostheader (without one, the client address is used) that is a host name, IPv4 address or bracketed IPv6 address with an optional port, and is otherwise refused with502 Bad Gatewayeven when no check is set; its path always starts with/, spaces and control characters in it, Unicode ones included, are percent-encoded except CR and LF, which are still refused, andOPTIONS *is sent asOPTIONS http://<host>/rather than with*appended to the host. ThroughforwardHttpsProxyorforwardSocksProxy, a request whose tunnel destination is not a host of that form is refused before connecting, and so is a binary (non-HTTP) connection tunnelled through any of the three upstream proxies, whose destination previously reached the proxy as given (aforwardProxyAllowedHostsentry*.allowed.comletsecret.internal.example/.allowed.comthrough). A PROXY protocol v1 header whose destination is not an IP address of the family it declares (TCP4orTCP6), such as a host name, is now ignored as malformed, as the PROXY protocol requires. Where a check is set, a numeric IPv4 host that is not four decimal octets without leading zeros (0177.0.0.1,0x7f.1,2130706433), which resolvers may read as another address, is refused, as is a forwarded request whose destination host or port cannot be read, and an IPv6 address whose dotted IPv4 part has a leading zero ([::ffff:017.0.0.1]) is refused too.forwardProxyBlockPrivateNetworksand address entries inforwardProxyAllowedHosts/forwardProxyDeniedHostsnow check the IPv4 address inside an IPv4-compatible (::127.0.0.1), IPv4-translated (::ffff:0:a9fe:a9fe) or NAT64 (64:ff9b::a9fe:a9fe) IPv6 address. Within the local-use NAT64 prefix64:ff9b:1::/48, which an operator may divide into longer prefixes, and for a 6to4 address (2002::/16), an address is refused if any IPv4 address it may carry is blocked or denied, but never matches an allow-list entry through one; other operator-specific NAT64 prefixes and Teredo (2001::/32) addresses are not unwrapped, so egress control on the NAT64 gateway or proxy remains the real protection.forwardProxyBlockPrivateNetworksalso now blocks the "this network" range0.0.0.0/8(0.1.2.3,::0.0.0.2), not only0.0.0.0. A well-formedHostand path are sent as before. The checks use MockServer's own lookup of a name, which an upstream proxy resolves again, so restrict egress on the proxy tookafkaSecurity.sslTruststoreLocation,sslTruststorePassword,sslKeystoreLocation,sslKeystorePasswordorsslKeyPasswordtoPUT /mockserver/asyncapi; see upgrading to 9). A request could name any file as the Kafka keystore or truststore, so anyone who could reach MockServer's API could make the Kafka client read any keystore-format file the MockServer process can read. Those fields are now rejected with a400that names the startup property to use instead:asyncKafkaSslTruststoreLocation,asyncKafkaSslTruststorePassword,asyncKafkaSslKeystoreLocation,asyncKafkaSslKeystorePasswordandasyncKafkaSslKeyPassword(system property, environment variable such asMOCKSERVER_ASYNC_KAFKA_SSL_TRUSTSTORE_LOCATION, properties file orConfiguration). MockServer gives them to the Kafka client when a request'ssecurityProtocolisSSLorSASL_SSL. While any of them is set, anSSLrequest must leave outkafkaBootstrapServersor name the startupasyncKafkaBootstrapServers, as aSASL_*request must, so MockServer's client certificate is only presented to brokers chosen at startup.PUT /mockserver/configurationignores them with a warning, andGET /mockserver/configurationreturns the two locations but never the passwords. The samebrokerConfigkeys outsidekafkaSecurity, or spelt with dots or another case, are rejected too. APUT /mockserver/configurationthat supplies any startup-only secret (these passwords,asyncKafkaSaslJaasConfig,clusterFanInPeerAuthToken,forwardCredentialHeadersByHostorcontrolPlaneBasicAuthenticationCredentials) now always logs the warning, even when the value matches the one in force, so the warning can no longer be used to confirm a guessed secretmqttSecurity.sslPropertiestoPUT /mockserver/asyncapi, or, once anasyncMqttSsl*property or the JVM'sjavax.net.ssl.keyStoreis set, sends anssl:///wss://broker URL other thanasyncMqttBrokerUrlor changesasyncMqttBrokerUrlwithPUT /mockserver/configuration; see upgrading to 9). The request'ssslPropertieswent to the MQTT client unchanged, so anyone who could reach MockServer's API could name any file as the MQTT keystore or truststore, making the MQTT client read any keystore-format file the MockServer process can read, and could choose its TLS protocol, cipher suites, security provider and key and trust manager. EverysslPropertiesentry is now rejected with a400that never echoes the value. Forcom.ibm.ssl.keyStore,keyStorePassword,keyStoreType,trustStore,trustStorePasswordandtrustStoreTypeit names the startup property to use instead:asyncMqttSslKeystoreLocation,asyncMqttSslKeystorePassword,asyncMqttSslKeystoreType,asyncMqttSslTruststoreLocation,asyncMqttSslTruststorePasswordandasyncMqttSslTruststoreType(system property, environment variable such asMOCKSERVER_ASYNC_MQTT_SSL_TRUSTSTORE_LOCATION, properties file orConfiguration), which MockServer gives to the MQTT 3 and MQTT 5 clients when the broker URL uses any scheme other thantcp://orws://(such asssl://orwss://). The protocol, cipher suites, providers and key and trust manager now come from the JVM's own TLS settings (such asjdk.tls.client.protocols), andcom.ibm.ssl.clientAuthentication, which Paho reads only for a TLS server and so never affected the client, is rejected too. The same keys spelt in another case or with dots or underscores, placed directly inmqttSecurity, or placed at the top level ofbrokerConfig, are rejected the same way. While anyasyncMqttSsl*property, or the JVM'sjavax.net.ssl.keyStore(which Paho falls back to), is set, a request using any scheme other thantcp://orws://must leave outmqttBrokerUrlor name the startupasyncMqttBrokerUrl, so MockServer's client certificate is only presented to the broker chosen at startup, andPUT /mockserver/configurationthen ignores a newasyncMqttBrokerUrlwith a warning; with none of them set,asyncMqttBrokerUrlcan still be changed at runtime as before.PUT /mockserver/configurationalways ignores the sixasyncMqttSsl*properties with a warning, andGET /mockserver/configurationreturns the locations, types and broker URL but never the passwordsvelocityDisallowClassLoading,javascriptAllowedClassesorjavascriptDisallowedClasseswithPUT /mockserver/configurationor a client'supdateConfiguration; see upgrading to 9). These settings decide whether response and forward templates can load Java classes, but aPUT /mockserver/configurationcould change them on a running server, so anyone who could reach the control plane could let templates use any Java class. Before, they were fixed at startup only whileforwardCredentialHeadersByHostwas set. APUTthat sets a different value is now still answered, but the value is ignored, a warning is logged andGET /mockserver/configurationreports the value in force; aPUTthat sends the value already in force logs nothing. Set them before the server starts with a system property, environment variable,mockserver.propertiesorConfiguration.javascriptDisallowedText,velocityDisallowedTextandmustacheDisallowedTextcan still be changed at runtime (fixes GHSA-5xh7-f7gh-prcf)netty-buffer(GHSA-m77g-r4c7-3w77, GHSA-rx4g-qxm6-238r, GHSA-qhw9-p586-v948), control characters not neutralised in the HTTP/1.1 codec (GHSA-42mp-m8rq-6rgj) and several HTTP/2, HTTP/3 and QUIC issues. Two visible changes: withtlsMutualAuthenticationRequired, a client whose certificate MockServer does not trust is now refused with abad_certificateTLS alert instead ofinternal_errorwhen MockServer uses OpenSSL (the default when its native library loads); and Netty now decrypts TLS into buffers of at most 16 KiB, too small for a 16 KiB HTTP/2 DATA frame and its header, so MockServer's HTTP/2 server now joins the two pieces of such a frame into a buffer of their own size instead of one twice as large. An HTTP/2 upload over TLS sent in 16 KiB frames therefore holds about 1.0 to 1.3 times its size in memory while it arrives when the client sends each frame in TLS records of its own, and 1.3 to 1.7 times when frames share records (about 1.1 to 1.7 times before, for 1 and 4 MiB uploads); cleartext HTTP/2 uploads in 16 KiB frames hold slightly less too. Also upgraded jsoup to 1.24.1, Guava to 33.8.0-jre and Error Prone annotations to 2.52.0, and, in the optional blob-store modules, the AWS SDK to 2.57.8, Google Cloud Storage to 2.76.0 and Azure Storage Blob to 12.37.1PUT http://upstream/mockserver/clearor aPUT /clearinside aCONNECTor SOCKS tunnel to another host (this changes behaviour for anyone who sends MockServer API calls through MockServer's own proxy to an address it cannot recognise as its own, as described below, or relies on a MockServer reached as another MockServer'sproxyRemoteHostanswering API or liveness calls the front MockServer does not serve itself). MockServer used to answer such a request itself, so a proxied request could clear, reconfigure or stop the proxy instead of reaching its destination. Requests addressed to MockServer itself are served as before: sent directly, whatever the host name, or sent through its own proxy to a port it listens on (including ports added with/bind), tolocalhostor another loopback address at any port (whichkubectl port-forwardorssh -Lmay relay to MockServer), or by host name to one of its ports. No MockServer of this version or later serves an API call that a MockServer forwarded as a proxy (it answers404, MCP and WebSocket upgrades included), so a client that can only use the proxy cannot reach the API of a MockServer of this version or later with the forwarding MockServer's client certificate (upgrade every MockServer that trusts the proxy's certificate authority before relying on this). So an API call sent through the proxy to an address of MockServer's it cannot recognise as its own, such as a Kubernetes Service port or a Docker host or ClusterIP address, or to another MockServer, now gets404: send such calls to MockServer directly. Such a call carriesx-forwarded-by: MockServer_proxiedto its destination, and recorded expectations (and recordings promoted to mocks) no longer keep anx-forwarded-byheader, so they match a client calling MockServer directly. The proxy WAR does not classify proxied requests. Contributed by Matthew Hall (@megahall) in #2955proxyAuthenticationUsernameandproxyAuthenticationPasswordset, the client'sProxy-Authorizationheader, which holds the proxy password, was kept on the request after MockServer checked it: it was shown in the dashboard, returned byretrievefor requests and logs, written to recordings and recordings saved to disk, could be matched by expectations, and was relayed to the upstream server in a proxied WebSocket handshake. MockServer now removes the header once it has checked it, whether the credential was right or wrong, so it is never recorded, matched or forwarded; the log entries for a refusedCONNECTand for a request refused by data-plane authentication (dataPlaneAuthenticationRequired) or for lacking TLS (tlsMutualAuthenticationRequired) no longer hold it either. Without proxy credentials configured,Proxy-Authorizationis recorded and matched as before, but, as for every other forwarded request, it is no longer relayed in a proxied WebSocket handshake, and neither isProxy-Connection. Contributed by Matthew Hall (@megahall) in #2954 and #2955mockserver-testcontainers/go) now requiresgolang.org/x/cryptov0.59.0 andgithub.com/klauspost/compressv1.20.3 or later, so projects using it no longer resolve versions with known advisories (GO-2026-6303, GO-2026-6354, GO-2026-6355, GO-2026-5932, GO-2026-6865). Because thatx/cryptorelease needs Go 1.26, the module now requires Go 1.26 or laterMockServer.Testcontainers) now requires Testcontainers 4.16.0 or later, which depends on SSH.NET 2026.0.0, so projects using it no longer resolve an SSH.NET version with known advisories (GHSA-mggc-4xg6-vcxf, GHSA-q939-rpr3-3284). It still accepts anyMockServerClientfrom 7.1.0mockserver-proxy-war) forwarded a request that matched no expectation and whoseHostheader was the WAR's own address (localhost,127.0.0.1or the server's IP address, followed by its port, except on port 80, and on port 443 over HTTPS, where it is written without a port) back to that address, without asking for proxy credentials even whenproxyAuthenticationUsernameandproxyAuthenticationPasswordwere set. So a client that could reach the WAR could fetch any other application on the same servlet container, such as its management pages, as a request from the container itself. Such a request, and one with noHostheader, is now a request to MockServer itself, as on the JAR, Docker image and Helm chart: it is matched against expectations without credentials and, when nothing matches, answered404; it is never forwarded to the container, and an extension request filter or response transformer is told it was not a proxy request. WithproxyRemoteHostandproxyRemotePortset, an unmatched one is forwarded there, and needs the proxy credentials when they are configured; one whose path matches aproxyPassMappingsentry still goes to that entry's target. Requests whoseHostnames another host are proxied as beforenpm ci, the JetBrains plugin's Gradle wrapper pins its distribution checksum, and a new GitHub Actions workflow checks the committedgradle-wrapper.jarfiles against Gradle's published checksumsAdded
proxyProtocolTrustedSources(-Dmockserver.proxyProtocolTrustedSourcesorMOCKSERVER_PROXY_PROTOCOL_TRUSTED_SOURCES), lists the IP addresses and CIDR blocks (IPv4 or IPv6) a PROXY protocol v1 or v2 header is accepted from whentransparentProxyEnabledis on, normally the load balancer that adds it. A PROXY header names where a connection is forwarded and which client address is recorded for it, so until now any client that could reach a transparent-proxy port could choose both; with the property set, a connection from any other address that starts with a PROXY header is closed with a warning, as HAProxy does with a header from a source it does not trust, while connections without a header are unaffected. Empty (the default) keeps today's behaviour. An entry that is not a single IP address or CIDR block (a host name, a block with bits set after its prefix, a block covering every address or every IPv4 address, a zone ID, an IPv4 part with a leading zero, an IPv4 address written as::a.b.c.d) stops the server starting, each entry being checked on its own, the entries in force are logged at startup, the refusal warning is given at most once a minute, andPUT /mockserver/configurationcannot change it. The startup warning given when transparent proxying and proxy credentials are both set now says whether it is setmockserver/mockserverand its-graaljs,-clustered,-aotand-http3tags, andmockserver/mockserver-webhook) now carry an SPDX software bill of materials (SBOM) and SLSA build provenance as image attestations, readable withdocker buildx imagetools inspect <image> --format '{{ json .SBOM }}'(or.Provenance); they are covered by the image's cosign signature<artifactId>-<version>-cyclonedx.json), signed like the jarrecordTruncatedStreamTiming(-Dmockserver.recordTruncatedStreamTimingorMOCKSERVER_RECORD_TRUNCATED_STREAM_TIMING), keeps the chunk timing of a streamed forwarded response that is recorded as truncated: one the upstream closes or resets without ending it, that times out (streamIdleTimeoutSeconds), whose upstream fails, or that passesmaxStreamingCaptureBytes. Such a recording lost itsx-mockserver-chunk-delays-ms, so it could only be replayed as one static response. With the property on it keeps the timing of the chunks captured before the cut and stays markedx-mockserver-stream-truncated: true; nothing is timed after the cut. A fixture made from a truncatedtext/event-streamrecording with that timing (for example by therecord_llm_fixturesMCP tool) now replays the events captured before the cut with their delays, leaves out an event cut off part way, and carries anx-mockserver-fixture-warningheader; the replay then ends the stream normally rather than reproducing how it broke. Other content types keep the static fallback (#2929)recordOpenStreamsOnStop(-Dmockserver.recordOpenStreamsOnStoporMOCKSERVER_RECORD_OPEN_STREAMS_ON_STOP), records a streamed forwarded response that is still open when MockServer stops, such as a Server-Sent Events push stream the backend never ends. Such a stream was recorded only when it ended, so a stop (PUT /mockserver/stop, orSIGINT/SIGTERMto the command line) lost it: it was missing from the recorded expectations and frompersistedRecordedExpectationsPath. With the property on, the stop first ends each open recorded stream (the client gets the normal end of the stream), records it as complete with itsx-mockserver-chunk-delays-ms, marks itx-mockserver-stream-closed-by-mockserver-stop: true, and waits forpersistedRecordedExpectationsPathto be written; when the property is set at startup the command line also stops MockServer this way onSIGINT/SIGTERM(see the clean-stop entry under Changed for how long to letdocker stopwait). Nothing changes with the property off (#2945)forwardCredentialHeadersByHost(-Dmockserver.forwardCredentialHeadersByHostorMOCKSERVER_FORWARD_CREDENTIAL_HEADERS_BY_HOST), adds credential headers to requests MockServer forwards or proxies to a named upstream host, each valued from an environment variable read once at startup, for exampleglobal.example.com=Authorization:GLOBAL_CLUSTER_TOKEN. The value is added only to the copy of the request written to the upstream, so it never appears in expectations, the log, recordings, exports or the dashboard, even withredactSecretsInLogoff. Headers are sent only over TLS unless an entry is writtenhttp://host:port, and HTTPS entries needforwardProxyTLSX509CertificatesTrustManagerTypeset toJVMorCUSTOMandforwardProxyTLSHostnameVerificationEnabledset totrue; otherwise they are ignored with a warning. A TLS connection that carries a credential is always a new one, never pooled, and trusts only the JVM's root CAs or theCUSTOMfile as they were at startup, never MockServer's own CA or a certificate it signed, even when the JVM trust store or theCUSTOMfile holds them, and never uses TLS 1.0 or 1.1. A header is added only when the connection target and the request's singleHostheader name exactly the configured host and port, the path starts with/, and the method is notTRACEorCONNECT. The property can only be set at startup. Requests are no larger when the property is not set. The configuration properties page explains what it does not protect against (#2930)recordClientClosedStreamsComplete(-Dmockserver.recordClientClosedStreamsCompleteorMOCKSERVER_RECORD_CLIENT_CLOSED_STREAMS_COMPLETE), keeps the chunk timing when the client closes a streamed forwarded response part-way through. Since 9.0.0 MockServer then closes the upstream, and a chunked stream was recorded as incomplete (x-mockserver-stream-truncated) with nox-mockserver-chunk-delays-ms. With the property on, such a recording ends complete, keeps its chunk delays and is markedx-mockserver-stream-closed-by-client: true. A stream that the upstream ends or breaks, and one MockServer closes itself (a response write stall, an error or chaos action, an HTTP/2 or HTTP/3 connection error, a QUIC transport or TLS error, or a server stop), is recorded as before. ThemaxStreamingCaptureByteslimit still appliescomment(SseEvent.withComment(...)in Java,commentin JSON and in the Node, Python, Ruby, Go, .NET, Rust and PHP clients, and a Comment field for each event in the dashboard's expectation composer, whose generated code includes it). It is sent before the event's other fields as:followed by each line of the comment exactly as written (keep-aliveis sent as:keep-alive,keep-aliveas: keep-alive), so an event with only a comment sends a heartbeat and a blank line, which clients ignore. A line break in a comment cannot start a new field or event. WithtemplateTypeset the comment is rendered likedata, and for NDJSON, JSON array and AWS event-stream LLM responses a comment-only event sends nothing but still waits its delay. Events without a comment are sent exactly as before (#2946)record_llm_fixturesMCP tool takeskeepSseComments(defaultfalse). With it set, the comment lines of a recorded SSE stream, such as:heartbeat, are kept: each comment-only chunk becomes an event with only acomment, replayed exactly as recorded (the text after the colon, leading space included) with its recorded delay (#2946)x-mockserver-first-chunk-delay-ms, the time from the start of the forward to the first chunk, measured on the same clock asx-mockserver-response-time-ms.x-mockserver-chunk-delays-msis unchanged and its first value is still 0. Fixtures made byrecord_llm_fixturesnow replay the first event after that wait, so a backend that waited before its first event is no longer replayed as answering at once. The header is kept out of fixtures like the other recording headers (#2947)closeDelayonhttpSseResponse(HttpSseResponse.withCloseDelay(...)in Java, and in the Node, Python, Ruby, Go, .NET, Rust and PHP clients and the dashboard's generated code) is how long the stream stays open after its last event, andkeepStreamOpen: truekeeps it open until the client leaves or MockServer stops. Before, a stream always ended right after its last event, so SSE clients reconnected at once. Fixtures made byrecord_llm_fixturesfrom a stream the backend ended now get acloseDelay, the recorded total time less the tiConfiguration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR was generated by Mend Renovate. View the repository job log.