Repository navigation
feat: Add support for SSL cert modification - #697
Merged
Merged
Conversation
johnramsden
marked this pull request as ready for review
March 21, 2026 02:02
johnramsden
marked this pull request as draft
March 21, 2026 02:03
Add a new CLI command to rotate RGW SSL certificates without needing to disable and re-enable the service. The command writes the new certificate and key to disk, and optionally restarts RGW for immediate pickup. Without --restart, a warning is emitted advising that the service must be restarted manually for the new certificate to take effect. The command also validates that RGW was originally configured with SSL before attempting to write certificates. Refactors SSL file writing into a shared writeSSLFiles() helper used by both EnableRGW and UpdateRGWCertificates. Signed-off-by: John Ramsden <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add command reference and how-to guide for rotating RGW TLS certificates using the new certificate set rgw command. Signed-off-by: John Ramsden <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]>
Add unit tests for UpdateRGWCertificates (valid certs, invalid cert, invalid key, RGW not active, SSL not configured) and RestartRGW (success and failure). Update existing EnableRGW tests for refactored error messages. Add integration tests to CI workflow: certificate rotation with --restart, rotation without restart, manual restart pickup, self-target rotation, cross-node target rotation, and failure when RGW is not running. Signed-off-by: John Ramsden <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: John Ramsden <[email protected]>
johnramsden
force-pushed
the
john/CEPH-1162-ssl
branch
from
March 23, 2026 16:58
0d1151d to
df9c844
Compare
johnramsden
marked this pull request as ready for review
March 23, 2026 17:08
sabaini
requested changes
Mar 24, 2026
sabaini
left a comment
Collaborator
There was a problem hiding this comment.
Hey @johnramsden looks good! Two notes inline
Address review feedback: write SSL cert/key to temporary files first and rename into place to prevent inconsistent state on partial failure. Add client-side base64 validation for --ssl-certificate and --ssl-private-key flags. Signed-off-by: John Ramsden <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]> Signed-off-by: John Ramsden <[email protected]>
Member
Author
sabaini
approved these changes
Mar 25, 2026
sabaini
left a comment
Collaborator
There was a problem hiding this comment.
cheers, minor remark inline but nothing to block over
Add explicit empty-string validation for SSL certificate and key in both the client-side command (validateSSLInputs) and server-side writeSSLFiles, since empty strings pass base64 decoding silently. Signed-off-by: John Ramsden <[email protected]> Co-Authored-By: Claude Opus 4.6 <[email protected]>
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
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.
Description
Add support for SSL cert modification.
Currently there is no proper way to update certificates. This adds support for updating the existing certificates.
The design includes a new certificates subcommand leaving room for adding additional certificate types. The alternative would be moving the functionality under "enable rgw".
Unfortunately there is no current way of actually reloading certificates live. SIGHUP has no effect. There is a ssl_reload option for beast but it is only available in tentacle ceph/ceph#65842.
Note: Once we have migrated to tentacle, we can add functionality that supports auto reload. I propose what we should do here is have a reload occurring every 24 hours and issue a warning saying certificates will be updated in the background every 24 hours if the user does not issue the restart flag. I already mapped out this functionality once, it is fairly easy to add it is just not currently supported and the reload flag does nothing. Ill open an issue after merge.
Fixes #421
Type of change
Delete options that are not relevant.
How has this been tested?
Added unit and integration tests verifying:
multi-node cross-node)
Contributor checklist
Please check that you have: