Skip to content

fix for registration conflicts with BouncyCastleProvider #864

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

sreekanth-db
Copy link

Description

The core problem is from the static registration of the BouncyCastle Security Provider in Java's Security API. When multiple BouncyCastle library versions are on the classpath, each trying to register its "BC" provider, conflicts occur. This can arise from different versions being introduced by drivers, the application, or its dependencies. The first registered provider wins, leading to unpredictable behavior if an older or incompatible version is registered before the expected one. This causes difficult-to-diagnose runtime problems for customers, highlighting the need to isolate or control BouncyCastle registration.

Solution: We will no longer globally register BouncyCastleProvider in Java's security API. Instead, our driver will create a dedicated local BouncyCastleProvider instance for it usage.

Copy link

Please ensure that the NEXT_CHANGELOG.md file is updated with any relevant changes.
If this is not necessary for your PR, please include the following in your PR description:
NO_CHANGELOG=true
and rerun the job.

Copy link

github-actions bot commented Jun 25, 2025

📊 Code Coverage Report

Overall Project 86.16% -0.07% 🟢
Files changed 13.51% 🔴

File Coverage
JwtPrivateKeyClientCredentials.java 58.73% -6.57% 🔴

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant