Skip to content

Conversation

@pjfanning
Copy link
Member

@pjfanning pjfanning commented May 2, 2025

  • based on code in AbstractKubernetesApiImpl
  • whether to use TLS is based on the URL scheme ("https://...")
  • the trust store used for the client connection can be configured to read a directory to read certs in a directory (this is optional unlike in AbstractKubernetesApiImpl) - the aim is that you can leave this config blank if you are happy to rely on your JDK's trust store set up.

@pjfanning pjfanning modified the milestones: 1.1.1, 1.2.0 May 2, 2025
@pjfanning pjfanning marked this pull request as draft May 2, 2025 17:53
@pjfanning pjfanning modified the milestones: 1.2.0, 2.0.0 Nov 14, 2025
@pjfanning pjfanning force-pushed the cluster-bootstrap-tls branch from fdefb91 to 7b92aa8 Compare November 17, 2025 11:10
@pjfanning pjfanning marked this pull request as ready for review November 17, 2025 11:10
@pjfanning pjfanning force-pushed the cluster-bootstrap-tls branch from 7b92aa8 to 1fec922 Compare November 17, 2025 11:55
@pjfanning pjfanning force-pushed the cluster-bootstrap-tls branch from 1fec922 to 9dbab64 Compare November 17, 2025 21:08
@pjfanning pjfanning marked this pull request as draft November 17, 2025 23:01
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
@pjfanning pjfanning force-pushed the cluster-bootstrap-tls branch from 199650b to fbf30a1 Compare November 18, 2025 10:54
@pjfanning pjfanning marked this pull request as ready for review November 18, 2025 10:56
Copy link
Contributor

Copilot AI left a 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.

Copy link
Contributor

@mdedetrich mdedetrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

pjfanning and others added 2 commits November 18, 2025 18:55
…anagement/cluster/bootstrap/internal/HttpContactPointBootstrapSpec.scala

Co-authored-by: Copilot <[email protected]>
@pjfanning pjfanning merged commit 0bf41c0 into apache:main Nov 18, 2025
10 checks passed
@pjfanning pjfanning deleted the cluster-bootstrap-tls branch November 18, 2025 21:21
pjfanning added a commit to pjfanning/incubator-pekko-management that referenced this pull request Nov 18, 2025
* 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]>
pjfanning added a commit that referenced this pull request Nov 19, 2025
* 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]>
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.

3 participants