question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Incompatible BouncyCastle FIPS changes in bookkeeper 4.14

See original GitHub issue

Describe the bug In bookkeeper # 2631, the default BouncyCastle was changed from non-fips into fips version. But the default version of BouncyCastle in Pulsar is the non-fips one(aimed to make it compatible with the old version of Pulsar).

Bouncy Castle provides both FIPS and non-FIPS version, but in a JVM, it can not include both of the 2 versions(non-Fips and Fips), and we have to exclude the current version before including the other. This make the backward compatible a little hard, and that’s why Pulsar has to involve individual module for Bouncy Castle.

Pulsar excluded the dependencies of bookkeeper-server’s BouncyCastle in Pulsar’s pom file, and Pulsar only includes the non-fips version, but the bookkeeper-server still wants to use the hard-coded fips version in bookkeeper # 2631

And if we want to start BookKeeper with TLS enabled through Pulsar’s binary, it will meet the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: org/bouncycastle/jcajce/provider/BouncyCastleFipsProvider
	at java.base/java.lang.Class.forName0(Native Method)
	at java.base/java.lang.Class.forName(Class.java:315)
	at org.apache.bookkeeper.common.util.ReflectionUtils.forName(ReflectionUtils.java:49)
	at org.apache.bookkeeper.tls.SecurityProviderFactoryFactory.getSecurityProviderFactory(SecurityProviderFactoryFactory.java:39)
	at org.apache.bookkeeper.proto.BookieServer.<init>(BookieServer.java:129)
	at org.apache.bookkeeper.server.service.BookieService.<init>(BookieService.java:52)
	at org.apache.bookkeeper.server.Main.buildBookieServer(Main.java:304)
	at org.apache.bookkeeper.server.Main.doMain(Main.java:226)
	at org.apache.bookkeeper.server.Main.main(Main.java:208)
Caused by: java.lang.ClassNotFoundException: org.bouncycastle.jcajce.provider.BouncyCastleFipsProvider
	at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
	at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
	at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
	... 9 more

To Reproduce Steps to reproduce the behavior:

  1. using pulsar 2.8.0,
  2. start bookkeeper through bin/pulsar bookie, with TLS enabled.

Expected behavior By using bin/pulsar bookie, BookKeeper server should able to start success. BK should not hard-coded fips version for Bouncy Castle, it should have an option to use non-fips version to make it compatible.

Additional context We may need to provide the fix in the BookKeeper side first, and then change the dependency of bookkeeper version in Pulsar.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
tisonkuncommented, Aug 17, 2022

@codelipenghui @hangc0276 is this ticket still relevant?

It’s weird when I filter release/blocker and see this issue targets to 2.8.1 and stale for a long time.

At least we should correct the metadata as @eolivelli mentioned https://github.com/apache/pulsar/issues/10937#issuecomment-926598889

0reactions
tisonkuncommented, Dec 6, 2022

Closed as completed. I don’t think it’s still relevant. For integration tests, a new issue is better.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix Bouncy Castle fips incompatible issue (#2740)
This is an automated email from the ASF dual-hosted git repository. zhaijia pushed a commit to branch branch-4.14 in repository ...
Read more >
API incompatible with BouncyCastle in FIPS mode #2086
Java Client 14.0.0 is incompatible with it. Please upgrade to BouncyCastle FIPs 1.0.2, its not a major change. It's a drop in replacement....
Read more >
8.6 Release Notes Red Hat Enterprise Linux 8
These enhancements could change the behavior of a command in an incompatible way. Users are now able to continue using existing tools and...
Read more >
Search Results - CVE
An issue was discovered in the FIPS Java API of Bouncy Castle BC-FJA before 1.0.2.4. Changes to the JVM garbage collector in Java...
Read more >
[fedora-arm] arm rawhide report: 20140712 changes
[fedora-arm] arm rawhide report: 20140712 changes ... requires libreoffice-filters [vdsm] vdsm-4.14.8.1-1.fc21.aarch64 requires ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found