Skip to content

feat(tls): reload TLS certificate and key on update - #277

Open
AdamMagued wants to merge 1 commit into
mccutchen:mainfrom
AdamMagued:fix/issue-273
Open

AdamMagued wants to merge 1 commit into
mccutchen:mainfrom
AdamMagued:fix/issue-273

Conversation

@AdamMagued

Copy link
Copy Markdown

Resolves #273

Summary

Implement dynamic TLS certificate reloading via tls.Config.GetCertificate to automatically reload updated certificate and key files from disk without restarting the server.

  • Check certificate and private key file modification times and sizes on TLS handshakes.
  • Fall back safely to existing valid in-memory certificate if a reload encounters transient file errors during disk writes.
  • Support direct file replacement, atomic renames, and symlink targets (such as Kubernetes secret rotations).
  • Tested in isolated container sandbox across initial loading, dynamic updates, error fallback, symlinks, concurrent handshakes, and live HTTPS connections.

Signed-off-by: Adam Magued <adamismailmageud@gmail.com>

This branch has not been deployed

No deployments
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.

feat: Allow reloading TLS Cert and Key when files are updated

1 participant