feat(openvpn-tunnel): update certs duration and add certs regeneration functionality #1490
+118
−13
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.
This pull request introduces new functionality for managing OpenVPN tunnel certificates, particularly enabling regeneration of server and client certificates, and improves new certificates validity to 10 years. The changes add a new script for regenerating certificates, expose certificate expiry information, and standardize EasyRSA environment variable usage across scripts.
Certificate Management Improvements
ns-openvpntunnel-regenerate-certsto regenerate server and client certificates for an OpenVPN tunnel, and updated the Makefile to install this script.regenerate_tunnel_certsfunction and corresponding API endpoint (regenerate-server-certs) inns.ovpntunnelto allow certificate regeneration via API calls.Certificate Expiry Handling
get_cert_expiry_tsutility and updated the tunnel listing API to include certificate expiry timestamps (cert_expiry_ts) in its responses when available.Consistency and Cleanup in Certificate Scripts
EASYRSA_BATCHandEASYRSA_CERT_EXPIRE) in all relevant certificate management scripts to ensure consistent certificate creation and renewal.These changes improve the maintainability and usability of OpenVPN tunnel certificate management, making it easier to automate certificate renewal and monitor certificate validity through the API.
Refs: #1481