-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Centralize SSL Context Handling and Client SSL Provider #17358
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
base: master
Are you sure you want to change the base?
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #17358 +/- ##
============================================
- Coverage 63.28% 63.24% -0.04%
- Complexity 1474 1475 +1
============================================
Files 3161 3164 +3
Lines 188588 188808 +220
Branches 28857 28892 +35
============================================
+ Hits 119351 119416 +65
- Misses 59983 60136 +153
- Partials 9254 9256 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
9b2b3e9 to
ed0217a
Compare
ed0217a to
f158985
Compare
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.
Pull request overview
This PR centralizes SSL/TLS context handling across Pinot components by introducing module-local context singletons (BrokerContext, ControllerContext, ServerContext) that delegate to a shared QueryRuntimeContext for gRPC SSL contexts. It also adds a pluggable SslContextProvider mechanism for client SSL configuration with JDK/BCJSSE support.
Key Changes:
- Centralized SSL context management through module-specific context classes backed by QueryRuntimeContext
- Introduced SslContextProvider interface with factory-based lookup and default JDK implementation
- Enhanced client SSL configuration with protocol/keystore/algorithm customization
Reviewed changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| pinot-server/src/main/java/org/apache/pinot/server/ServerContext.java | New singleton context for server SSL contexts delegating to QueryRuntimeContext |
| pinot-broker/src/main/java/org/apache/pinot/broker/BrokerContext.java | New singleton context for broker SSL contexts delegating to QueryRuntimeContext |
| pinot-controller/src/main/java/org/apache/pinot/controller/ControllerContext.java | New singleton context for controller SSL contexts delegating to QueryRuntimeContext |
| pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/context/QueryRuntimeContext.java | Renamed from BrokerContext, added gRPC SSL context fields |
| pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/context/ServerContext.java | Removed (functionality moved to module-specific contexts) |
| pinot-query-runtime/src/main/java/org/apache/pinot/query/runtime/context/ControllerContext.java | Removed (functionality moved to module-specific contexts) |
| pinot-server/src/main/java/org/apache/pinot/server/worker/WorkerQueryServer.java | Initialize server context SSL contexts during worker query server setup |
| pinot-server/src/main/java/org/apache/pinot/server/starter/helix/BaseServerStarter.java | Initialize server context HTTPS contexts on startup |
| pinot-controller/src/main/java/org/apache/pinot/controller/BaseControllerStarter.java | Initialize controller context SSL contexts on startup |
| pinot-broker/src/main/java/org/apache/pinot/broker/broker/helix/BaseBrokerStarter.java | Initialize broker context HTTPS contexts on startup |
| pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java | Initialize broker context SSL contexts in multi-stage handler |
| pinot-query-runtime/.../QueryServer.java | Reuse cached server gRPC SSL context from QueryRuntimeContext |
| pinot-query-runtime/.../QueryDispatcher.java | Initialize and reuse client gRPC SSL context from QueryRuntimeContext |
| pinot-query-runtime/.../DispatchClient.java | Accept optional SslContext parameter to reuse cached context |
| pinot-query-runtime/.../MailboxService.java | Resolve SSL contexts from QueryRuntimeContext for broker/server/controller instances |
| pinot-query-runtime/.../GrpcMailboxServer.java | Accept optional SslContext parameter to reuse cached context |
| pinot-query-runtime/.../ChannelManager.java | Accept optional SslContext parameter to reuse cached context |
| pinot-query-runtime/.../OpChainExecutionContext.java | Simplified to use QueryRuntimeContext instead of separate broker/server contexts |
| pinot-clients/.../SslContextProvider.java | New interface for pluggable SSL configuration |
| pinot-clients/.../SslContextProviderFactory.java | Factory for loading SslContextProvider via property/ServiceLoader |
| pinot-clients/.../DefaultSslContextProvider.java | Default JDK/BCJSSE provider implementation |
| pinot-clients/.../JsonAsyncHttpPinotClientTransport.java | Updated to use SslContextProvider for SSL configuration |
| pinot-common/.../ClientSSLContextGenerator.java | Added configurable protocol/keystore/algorithm with try-with-resources |
| pinot-broker/.../BrokerGrpcServer.java | Added warning for non-JDK providers and provider-aware GrpcSslContexts configuration |
| pinot-controller/pom.xml | Added pinot-query-runtime dependency |
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/MailboxService.java
Outdated
Show resolved
Hide resolved
pinot-query-runtime/src/main/java/org/apache/pinot/query/mailbox/MailboxService.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/common/utils/ClientSSLContextGenerator.java
Outdated
Show resolved
Hide resolved
f158985 to
82c7250
Compare
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.
Pull request overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated no new comments.
82c7250 to
8fc4852
Compare
8fc4852 to
f2dc959
Compare
Summary:
BrokerContext,ControllerContext, andServerContextbacked byQueryRuntimeContextfor shared gRPC SSL contexts and HTTPS SSL contexts, and wire controller to depend on query-runtime.SslContextProviderwith default JDK/BCJSSE implementation plus configurable lookup (system property/ServiceLoader) and update the async HTTP client transport to use it.