-
Notifications
You must be signed in to change notification settings - Fork 14
cluster-bootstrap support TLS requests in client calls #426
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
Conversation
fdefb91 to
7b92aa8
Compare
7b92aa8 to
1fec922
Compare
...scala/org/apache/pekko/management/cluster/bootstrap/internal/HttpContactPointBootstrap.scala
Outdated
Show resolved
Hide resolved
1fec922 to
9dbab64
Compare
Update HttpContactPointBootstrap.scala Update HttpContactPointBootstrap.scala add cert Update BootstrapCoordinatorSpec.scala extra test make TLS version configurable cert unused Update BootstrapCoordinatorSpec.scala Update BootstrapCoordinatorSpec.scala Update HttpContactPointBootstrap.scala Revert "cert unused" This reverts commit 83b45b5. add tests
199650b to
fbf30a1
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 adds TLS/HTTPS support to cluster-bootstrap client calls when probing contact points. The implementation is based on the pattern used in AbstractKubernetesApiImpl, with the key difference being that the trust store configuration is optional - users can rely on their JDK's default trust store if ca-path is left empty.
Key Changes
- Added SSL context generation with optional custom certificate trust store
- HTTP client now uses HTTPS connection context when the URI scheme is "https://"
- Comprehensive test coverage for SSL context generation with various configurations
Reviewed Changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| management-cluster-bootstrap/src/main/scala/org/apache/pekko/management/cluster/bootstrap/internal/HttpContactPointBootstrap.scala | Implements SSL context generation and conditionally uses HTTPS connection context based on URI scheme |
| management-cluster-bootstrap/src/main/scala/org/apache/pekko/management/cluster/bootstrap/ClusterBootstrapSettings.scala | Adds configuration settings for ca-path and tls-version under httpClient |
| management-cluster-bootstrap/src/main/resources/reference.conf | Adds default configuration for HTTP client SSL/TLS settings |
| management-cluster-bootstrap/src/test/scala/org/apache/pekko/management/cluster/bootstrap/internal/HttpContactPointBootstrapSpec.scala | Adds comprehensive tests for SSL context generation with various scenarios |
| management-cluster-bootstrap/src/test/scala/org/apache/pekko/management/cluster/bootstrap/internal/BootstrapCoordinatorSpec.scala | Minor import reorganization |
| management-cluster-bootstrap/src/test/resources/application.conf | Adds test configuration for actor system |
| management-cluster-bootstrap/src/test/files/ca.crt | Adds test certificate for SSL context tests |
| build.sbt | Adds dependency on managementPki module |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...a/org/apache/pekko/management/cluster/bootstrap/internal/HttpContactPointBootstrapSpec.scala
Outdated
Show resolved
Hide resolved
mdedetrich
left a comment
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.
lgtm
Co-authored-by: Copilot <[email protected]>
…anagement/cluster/bootstrap/internal/HttpContactPointBootstrapSpec.scala Co-authored-by: Copilot <[email protected]>
* cluster-bootstrap support TLS requests in client calls Update HttpContactPointBootstrap.scala Update HttpContactPointBootstrap.scala add cert Update BootstrapCoordinatorSpec.scala extra test make TLS version configurable cert unused Update BootstrapCoordinatorSpec.scala Update BootstrapCoordinatorSpec.scala Update HttpContactPointBootstrap.scala Revert "cert unused" This reverts commit 83b45b5. add tests * Update management-cluster-bootstrap/src/main/resources/reference.conf Co-authored-by: Copilot <[email protected]> * Update management-cluster-bootstrap/src/test/scala/org/apache/pekko/management/cluster/bootstrap/internal/HttpContactPointBootstrapSpec.scala Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
* cluster-bootstrap support TLS requests in client calls Update HttpContactPointBootstrap.scala Update HttpContactPointBootstrap.scala add cert Update BootstrapCoordinatorSpec.scala extra test make TLS version configurable cert unused Update BootstrapCoordinatorSpec.scala Update BootstrapCoordinatorSpec.scala Update HttpContactPointBootstrap.scala Revert "cert unused" This reverts commit 83b45b5. add tests * Update management-cluster-bootstrap/src/main/resources/reference.conf * Update management-cluster-bootstrap/src/test/scala/org/apache/pekko/management/cluster/bootstrap/internal/HttpContactPointBootstrapSpec.scala --------- Co-authored-by: Copilot <[email protected]>
Uh oh!
There was an error while loading. Please reload this page.