Add SSL certificate checking and regeneration scripts - #405
Open
brainstemu wants to merge 2 commits into
Open
Conversation
|
Thank you for the pull request. ROADMAP STATUS: This pull request isn't currently on any roadmap. Updates will be conveyed here as its place on/off a roadmap changes. You can view the roadmaps here: Roadmaps Google Drive folder. For more information on how the roadmaps work, see our roadmaps policy on GitHub. |
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.
Add SSL certificate check and regeneration
What?
Adds automated SSL certificate checking and regeneration support for Hubs deployments.
This pull request includes:
ssl_script/check-cert.jsfor checking certificate expiration statusssl_script/regen-ssl.jsfor regenerating SSL certificates when renewal is neededpackage.jsonupdates to expose the new SSL maintenance commandsThis implementation uses the existing Hubs environment variables and deployment configuration rather than hard-coded deployment-specific values.
Why?
Hubs deployments rely on valid TLS certificates for the main Hubs domain and its related subdomains.
Without an automated check and renewal workflow, certificate expiration requires manual monitoring and intervention. If certificates expire, users can encounter browser security warnings or lose access to the deployment entirely.
This change makes SSL maintenance easier and more reliable by providing scripts that can:
This change assumes the
www-redirectfunctionality has already been applied, since the SSL regeneration flow includes certificate handling for thewww.$HUB_DOMAINhostname.Examples
Check the current certificate:
or directly:
Regenerate SSL certificates:
or directly:
The certificate check can be used to determine whether the certificate is approaching expiration before running the regeneration process.
How to test
Start with a Hubs deployment that includes the
www-redirectfunctionality.Configure the normal Hubs environment variables required by the existing SSL setup.
Confirm access to the Kubernetes cluster:
kubectl get pods -n "$Namespace"Run the certificate check:
Confirm that the script successfully reads the current certificate and reports its expiration status.
Run the SSL regeneration process:
Confirm that the required Kubernetes TLS secrets are created or updated successfully.
Confirm that the Hubs workloads remain healthy:
kubectl get pods -n "$Namespace"Verify the TLS secrets:
kubectl get secrets -n "$Namespace"Verify HTTPS access to the configured Hubs domain:
curl -I "https://$HUB_DOMAIN"Verify HTTPS access to the
wwwhostname:curl -I "https://www.$HUB_DOMAIN"Confirm that the
wwwhostname has a valid certificate and redirects to the configured Hubs domain as expected.Documentation of functionality
The functionality is implemented directly in:
ssl_script/check-cert.jsssl_script/regen-ssl.jspackage.jsonNo separate documentation pull request is included.
The scripts and package commands provide the operational entry points for checking and regenerating certificates.
Limitations
This implementation assumes:
www-redirectfunctionality is presentThis pull request does not introduce a Kubernetes CronJob or other server-side scheduler for automatically running the certificate check on a recurring schedule.
Alternative implementations considered
Manual certificate renewal was considered, but it requires an administrator to track certificate expiration and manually perform the regeneration process.
A Kubernetes-native scheduled renewal process was also considered. This pull request keeps the initial implementation focused on reusable certificate checking and regeneration scripts so they can be tested independently and integrated into a scheduled process separately if desired.
The certificate check and regeneration logic are kept as separate scripts so the certificate can be inspected without unnecessarily triggering a renewal.
Open questions
None.
Additional details or related context
This pull request is dependent on the
www-redirectwork because the SSL regeneration flow includes certificate handling for:For review, this PR should use:
until the
www-redirectpull request is merged.After the
www-redirectpull request is merged, this pull request can be retargeted to the repository's main branch.The implementation uses environment variables and does not intentionally include deployment-specific domains, credentials, certificates, or other sensitive values.