openwisp / openwisp/openwisp-controller
[change] Use Standalone Certificate Templates as the underlying base for VpnClient certificate management
@stktyagi is already working on this.
Since Jul 30, 2026.
- Dominant language
- Python
- Stars
- 773
- Forks
- 315
- Avg merge
- 2d 16h
- Merged PRs (30d)
- 14
Description
Is your feature request related to a problem? Please describe.
Currently, VpnClient handles certificate management through custom, tied-in logic (calls on save and specific signal handlers for VPN clients). With the introduction of standalone Certificate Generator Templates and the DeviceCertificate model, we now have a generalized framework for generating, binding, renewing, and revoking device certificates. Maintaining two parallel paths for certificate generation creates code duplication, increases the maintenance burden, and introduces the risk that bug fixes or performance improvements made to one won't automatically benefit the other.
Describe the solution you'd like
Refactor the VpnClient certificate lifecycle logic to build upon or reuse the newly established Standalone Certificate Generator Template infrastructure.
- Abstract Core Lifecycle Logic: Decouple the certificate creation, renewal, and revocation routines currently housed within
VpnClientarchitecture and migrate them into a shared base class or utility that bothVpnClientandDeviceCertificatecan inherit from. - Unified Signal Management & Atomicity: Standardize the signal handlers across both implementations. Ensure that the transaction atomicity introduced in the standalone templates is actively applied to
VpnClientoperations to prevent partial database writes during certificate generation. - Synchronized CRL Updates: Tie the current newly added revocation logic to
VpnClientcertificates and make it consistent and error free across bothDeviceCertificateandVpnClient. - Consistent renewal and regeneration: Implement shared methods to update and regenerate certificate details based on
VpnClientattributes updation.
Additional context
Unifying this under the hood adheres to DRY (Don't Repeat Yourself) principles and simplifies future maintainability.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.