Skip to content

Enable reloading CA without a restart#16500

Closed
hongbin wants to merge 1 commit intoetcd-io:mainfrom
hongbin:reloadCAFirstPart
Closed

Enable reloading CA without a restart#16500
hongbin wants to merge 1 commit intoetcd-io:mainfrom
hongbin:reloadCAFirstPart

Conversation

@hongbin
Copy link

@hongbin hongbin commented Aug 28, 2023

  • Add two options to server: "client-root-ca-reload" and "peer-root-ca-reload". By default, these options are false. Whenever the options are enabled, the server will dynamically load CA keys & certs.
  • Provide implementation for "GetConfigForClient". This will allow server to load CA files on each TLS handshake.
  • Provide implementation for "VerifyConnection". This will allow clients (for peer connection) to load CA files per request.

Note: this patch implements CA reloading without performance optimization. Optimization could be done in the future. Potential optimization is to avoid loading CA on each request. We could implement a background routine to periodically loading CA files instead.

Fixes #11555

@hongbin hongbin force-pushed the reloadCAFirstPart branch from 9aa995f to f81ee9a Compare August 28, 2023 20:11
@hongbin hongbin force-pushed the reloadCAFirstPart branch from f81ee9a to 8e3815d Compare August 30, 2023 02:51
@hongbin hongbin changed the title WIP: Enable reloading CA without a restart Enable reloading CA without a restart Aug 30, 2023
@hongbin hongbin force-pushed the reloadCAFirstPart branch from 8e3815d to 588a667 Compare August 30, 2023 03:16
* Add two options to server: "client-root-ca-reload" and "peer-root-ca-reload".
  By default, these options are set to false. Whenever the options are enabled,
  the server will dynamically load CA keys & certs.
* Provide implementation for "GetConfigForClient". This will allow server to
  load CA files on each TLS handshake.
* Provide implementation for "VerifyConnection". This will clients (for peer connection)
  to load CA files per request.

Note: this patch implements CA reloading without performance optimization.
Optimization could be done in the future. Potential optimization is
to avoid loading CA on each request. We could implement a background
routine to periodically loading CA files instead.

Signed-off-by: Hongbin Lu <hongbinlu@microsoft.com>
@hongbin hongbin force-pushed the reloadCAFirstPart branch from 588a667 to c208106 Compare August 31, 2023 03:12
@stale
Copy link

stale bot commented Mar 17, 2024

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Mar 17, 2024
@vladorf
Copy link

vladorf commented Jun 6, 2024

hello, we are also in need of this feature

E: can we remove stale tag?

@serathius
Copy link
Member

Contributions are welcomed!

@stale stale bot removed the stale label Jun 6, 2024
@oblazek
Copy link

oblazek commented Jun 6, 2024

👋 hey Marek, you mean we can contribute with the review? :)

@serathius
Copy link
Member

Please start from contributing to discussion #11555.

Please note "I need it", is not a productive comment.

@stale
Copy link

stale bot commented Apr 26, 2025

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 21 days if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

ETCD doesn't automatically load changes to ca bundles for peer-trusted-ca-file or trusted-ca-file

5 participants