Publish a slim Maven artifact so consumers can manage bundled third-party versions
Summary
The published com.hazelcast:hazelcast jar bundles around nine third-party libraries (Jackson 2 + Jackson 3, SnakeYAML, JCTools, ClassGraph, everit-json-schema, org.json, Objenesis, HikariCP) with their packages relocated under com.hazelcast.shaded.*. This is good for avoiding classpath conflicts, but for CE (community edition) consumers, there is no straightforward way to override the version of any bundled library when a CVE is flagged against it.
It would be useful to have an additional, un-relocated ("slim") Maven artifact published alongside the existing shaded one. The shaded jar would stay the default; the slim jar would declare its third-party dependencies in its POM so consumers who need to could manage them. This is primarily for remediating CVEs for bundled libraries until the next minor release.
Concrete example
hazelcast-5.7.0.jar bundles com.fasterxml.jackson.core:jackson-databind / jackson-core (relocated to com.hazelcast.shaded.com.fasterxml.jackson). Several jackson-databind CVEs are currently being flagged by SCA scanners against these bundled classes https://github.com/hazelcast/hazelcast/issues/26597.
The relevant point here is not whether each CVE is exploitable in Hazelcast's usage — it's that a downstream consumer seems to have no remediation path, even for the cases where a dependency bump might be warranted.
- The classes ship inside the jar under a relocated package, so
com.fasterxml.jackson.core:jackson-databindcannot be overridden via . - Community Edition has no patch line (https://hazelcast.com/blog/changes-to-community-edition/, https://github.com/hazelcast/hazelcast/issues/26597#issuecomment-4859599809), so a fixed version isn't available until the next release (nearly ~12 months since last release).
So a consumer on a shipped release seems to have no way to pull in a patched transitive Jackson on their classpath.
Configuration (source links)
Config per master branch at the time,
- Shade plugin + Jackson relocations (defined in the parent, inherited via
combine.children="append"): https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast-parent/pom.xml#L831 https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast-parent/pom.xml#L855-L900 relocation.root property: https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast-parent/pom.xml#L69-L69- Jackson version properties (
jackson.version= 3.x,jackson2.version= 2.x): https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast-parent/pom.xml#L105-L106 - Shade goal bound to the package phase: https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast/pom.xml#L196-L204
- Module-level relocations (snakeyaml, jctools, classgraph, everit-json-schema, org.json, objenesis, hikari): https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast/pom.xml#L215-L248
- Bundled Jackson compile dependencies (both 3.x and 2.x lines): https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast/pom.xml#L664-L683
This request generalizes to all shaded dependencies, because
Jackson is just the dependency being flagged this time. The same bundling + relocation would apply to all the shaded libraries, so that no need for any maintenance/bump/mitigation related discussions if CVEs for any of the shaded libraries get surfaced in future.
From the shade configuration + the relocated packages appear to include (non-exhaustive, and likely to drift release to release):
com.fasterxml.jackson -> com.hazelcast.shaded.com.fasterxml.jackson
tools.jackson -> com.hazelcast.shaded.tools.jackson
org.snakeyaml -> com.hazelcast.shaded.org.snakeyaml
org.jctools -> com.hazelcast.shaded.org.jctools
io.github.classgraph -> com.hazelcast.shaded.io.github.classgraph
org.everit.json.schema -> com.hazelcast.shaded.org.everit.json.schema
org.json -> com.hazelcast.shaded.org.json
org.objenesis -> com.hazelcast.shaded.org.objenesis
com.zaxxer.hikari -> com.hazelcast.shaded.com.zaxxer.hikariA single slim artifact would solve this problem, and let consumers update their own dependency tree.
Some example past issues:
- Jackson vulnerabilities are more:
- SnakeYaml: https://github.com/hazelcast/hazelcast/issues/17425 etc.
Proposal
Perhaps a slim variant of the hazelcast artifact whose classes are not relocated and whose POM declares the third-party dependencies transitively — keeping the current shaded jar exactly as-is and as the default.
Consumer side, this would then reduce to normal dependency management, e.g.:
<dependency>
<groupId>com.hazelcast</groupId>
<artifactId>hazelcast-slim</artifactId> <!-- or a classifier -->
<version>5.7.0</version>
</dependency>
<!-- consumer pins a patched transitive dependency -->
<dependencyManagement>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version><patched></version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>May not be a lot of maintenance:
The relocation seems to be applied at package time by maven-shade-plugin - https://github.com/hazelcast/hazelcast/blob/89a9c425ea60415469a0cb3c1b4f039c46a915ac/hazelcast/pom.xml#L197-L204
The source appears to reference the original coordinates (tools.jackson.*, com.fasterxml.jackson.*, etc.), with no source reference to the relocated com.hazelcast.shaded.* packages that we could find outside of a couple of serialization block-list string literals. So, the un-relocated classes are already the compiler output that the shade step consumes as input — so the slim artifact would essentially be that pre-shade jar plus a POM listing the deps already declared in the module.
Solution could be,
Separate artifact with its own POM (e.g. hazelcast-slim): It could declare the third-party dependencies transitively, so consumers would get correct resolution and could override any single dependency. This seems to most directly address the remediation problem.
Note: there's already a slim distribution assembly https://github.com/hazelcast/hazelcast/blob/master/distribution/src/assembly/assembly-descriptor-slim.xml — but that's a trimmed zip of the components that still contains the shaded jar, not an un-relocated Maven artifact, so it doesn't address this. Worth calling out to avoid mixing the two.
Scope / support expectations
To be explicit about what is not being requested here:
- No change to the shaded jar or its status as the supported default.
- No commitment to test the slim jar against arbitrary versions of its transitive dependencies — consumers who opt into managing versions accept that responsibility. Marking it explicitly community-supported / best-effort is fine.
- No backport or CE patch release requested here — this is purely a packaging addition.
The main maintenance surface would be keeping the slim POM's dependency list in sync per release. That set already appears to be determined by the shade configuration (the artifacts being bundled and relocated), so it's likely derivable rather than hand-maintained, and seems to be the only ongoing cost.
Alternatives considered (and why they fall short)
- Override the version downstream — doesn't seem possible; the classes are relocated and internal, so there's nothing external to override.
- Wait for the next minor with a bumped dependency — leaves consumers exposed in the interim.
Some examples to mention, Following example projects also publish a slim/thin version along with shaded,
- snowflake-jdbc - https://github.com/snowflakedb/snowflake-jdbc/blob/d822abdf6360987f762e9a88d9ee2cb12546ba9c/pom.xml#L642, https://mvnrepository.com/artifact/net.snowflake/snowflake-jdbc-thin, https://mvnrepository.com/artifact/net.snowflake/snowflake-jdbc
- clickhouse-jdbc - https://github.com/ClickHouse/clickhouse-java/blob/main/clickhouse-jdbc/pom.xml, https://github.com/ClickHouse/clickhouse-java/blob/main/packages/clickhouse-jdbc-all/pom.xml, https://mvnrepository.com/artifact/com.clickhouse/clickhouse-jdbc, https://mvnrepository.com/artifact/com.clickhouse/clickhouse-jdbc-all
- https://central.sonatype.com/artifact/com.amazonaws/aws-java-sdk-bundle
- https://mvnrepository.com/artifact/io.netty/netty-all
Source: hazelcast/hazelcast