chore: bump Bouncy Castle FIPS deps to latest 2.1.x patch releases#637
Draft
chore: bump Bouncy Castle FIPS deps to latest 2.1.x patch releases#637
Conversation
…leases Agent-Logs-Url: https://github.com/OpenIdentityPlatform/OpenDJ/sessions/c22c1074-d0c9-4189-86a7-787beaa93431 Co-authored-by: vharseko <6818498+vharseko@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update Bouncy Castle dependencies to latest patch versions
chore: bump Bouncy Castle FIPS deps to latest 2.1.x patch releases
Apr 22, 2026
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.
Bouncy Castle issued CVEs against their FIPS libraries. This bumps the affected artifacts to the latest available patch releases within the
2.1.xline.Version changes (
pom.xml)bc-fipsstays at2.1.2— already the latest2.1.xrelease.Transitive non-FIPS artifacts
mvn dependency:treeconfirmsbcprov-jdk18onandbcpkix-jdk18onare not on the classpath (neither directly nor transitively). NodependencyManagementpins needed for those.Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
central.sonatype.com/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/OpenDJ/OpenDJ org.codehaus.plexus.classworlds.launcher.Launcher dependency:tree -pl opendj-core -Dincludes=org.bouncycastle(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/OpenDJ/OpenDJ org.codehaus.plexus.classworlds.launcher.Launcher dependency:tree -pl opendj-server-legacy -Dincludes=org.bouncycastle(dns block)/usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --enable-native-access=ALL-UNNAMED -classpath /usr/share/apache-maven-3.9.14/boot/plexus-classworlds-2.9.0.jar -Dclassworlds.conf=/usr/share/apache-maven-3.9.14/bin/m2.conf -Dmaven.home=/usr/share/apache-maven-3.9.14 -Dlibrary.jansi.path=/usr/share/apache-maven-3.9.14/lib/jansi-native -Dmaven.multiModuleProjectDirectory=/home/REDACTED/work/OpenDJ/OpenDJ org.codehaus.plexus.classworlds.launcher.Launcher dependency:tree -pl opendj-server-legacy -Dincludes=org.bouncycastle --no-transfer-progress(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
Summary
Bouncy Castle has issued CVEs against several of their products that are rated as severe. Bouncy Castle has published updated libraries for the following artifacts:
bcpkix-jdk18onbcprov-jdk18onbcpkix-fipsbctls-fipsWe should bump the Bouncy Castle dependency versions used in this repository to the latest available patch releases to pull in the security fixes.
Current state
The Bouncy Castle versions are managed centrally via Maven properties in the root
pom.xml:These properties are referenced from the
<dependencyManagement>section of the rootpom.xmlfororg.bouncycastle:bc-fips,org.bouncycastle:bctls-fipsandorg.bouncycastle:bcpkix-fips. Modules (e.g.opendj-core,opendj-server-legacy) consume the artifacts without a<version>element, so updating the properties is sufficient.The non-FIPS artifacts
bcprov-jdk18on/bcpkix-jdk18onare not declared directly in this repository — they may only appear transitively.Required changes
Update the version properties in the root
pom.xmlto the latest patch releases of the FIPS artifacts:(If newer patch versions of
bc-fips/bctls-fips/bcpkix-fipsare available on Maven Central at the time the PR is opened, please use those latest patch releases instead — but stay within the same2.1.xline to avoid API/behavioral changes.)Run
mvn dependency:treeand verify whether any transitive dependency onorg.bouncycastle:bcprov-jdk18onororg.bouncycastle:bcpkix-jdk18onexists. If they do appear transitively, pin them in the root<dependencyManagement>section to the latest1.xrelease (e.g.1.84or newer if available), for example:If they do not appear in the dependency tree, no additional declarations are needed.
Make sure the build still passes (
mvn -B -DskipTests=false verify). In particular:BCFKSkeystore generation logic in.github/workflows/build.ymlusingorg.bouncycastle.bc-fips.jarandorg.bouncycastle.bcpkix-fips.jarmust still succeed.opendj-core/src/main/java/com/forgerock/opendj/util/FipsStaticUtils.javaand the certificate generation inopendj-server-legacy/src/main/java/org/opends/server/util/Platform.javamust still work (loaded with-Dorg.openidentityplatform.opendj.fips.register=true).Acceptance criteria
pom.xmlreferences the newest available patch versions ofbc-fips,bctls-fipsandbcpkix-fipswithin the2.1.xline.bcprov-jdk18on/bcpkix-jdk18onis pinned to a current, non-vulnerable release (or it is confirmed in the PR description that they are not on the classpath)..github/workflows/build.yml) passes, including the BCFKS keystore setup steps.The following is the prior conversation context from the user's chat exploration (may be truncated):
User: предложи исправление Summary
Bouncy Castle has issued CVEs for the their products that are severe.
Details
Bouncy Castle has issued updated libraries for the following
bcpkix-jdk18on
bcprov-jdk18on
bcpkix-fips
bctls-fips
Assistant: ## Предлагаемое исправление
В репозитории Bouncy Castle подключён только в FIPS-варианте через свойства в корневом
pom.xml. Артефактыbcprov-jdk18on/bcpkix-jdk18onнапрямую не объявлены — они могут попадать только транзитивно (например черезbcpkix-fipsили тестовые зависимости), поэтому достаточно поднять версии FIPS-артефактов до последних патчей.Текущие версии
Предлагаемая правка (последние релизы на 2026‑04‑22)
Дополнител...
This pull request was created from Copilot chat.