-
Notifications
You must be signed in to change notification settings - Fork 21
v6: Custom TrustStore #427
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
Merged
Merged
Conversation
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Orca Security Scan Summary
Status | Check | Issues by priority | |
---|---|---|---|
![]() |
Secrets | ![]() ![]() ![]() ![]() |
View in Orca |
Test pipeline is failing because Weaviate instance running in DefaultGrpcTransportITest is does not have TLS enabled. I think. |
Config.WeaviateCloud and Config.Custom expose a trustManagerFactory() which essentially lets the user use any trust manager on their client
Remove grpc-netty to avoid version conflicts
Weaviate does not accepts TLS/SSL connections out of the box, and configuring it to do so is a huge hassle, so we for now let's just test empirically that it does
src/it directory is reserved for tests that interact with the actual Weaviate instance. They're usually slower and more expensive to set up.
90a79d6
to
e9b7c4b
Compare
bevzzz
commented
Jul 25, 2025
From our discussion with @Dabz:
These are powerful security mechanisms that advanced users will probably want to have. |
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.
Resolves #420
This PR allows users to pass their custom SSL certificates to WeaviateClient.
Technically, this can already be achieved by overriding the default TrustStore that Java uses by passing
-Djavax.net.ssl.trustStore=/path/to/custom/truststore.p12
, but that approach is rather crude, because it disregards default cacerts.The "supply chain" for SSL certificates goes something like this:
The simplest thing would be accepting an SSLContext from the user. But we need to send both HTTP and gRPC requests under the hood, which we do using 2 different libraries, and they both have their own "SSL context" abstraction.
So the next best thing is TrustManagerFactory. Both
javax.net.ssl.SSLContext
andio.netty.handler.ssl.SslContext
can be configured to use a custom TrustManagerFactory. It also offers the users quite a lot of flexibility in terms of how and where do they get the certificates from.The usage is pretty straightforward:
You may read the example above and think: "couldn't we just accept that file path and the password and do the rest ourselves"? I prefer not to because: