openwisp / openwisp/openwisp-controller

[change] Use Standalone Certificate Templates as the underlying base for VpnClient certificate management

Open
#1,449 0 comments 0 reactions 1 assignee View on GitHub

@stktyagi is already working on this.

Since Jul 30, 2026.

enhancement gsoc
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 VpnClient architecture and migrate them into a shared base class or utility that both VpnClient and DeviceCertificate can 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 VpnClient operations to prevent partial database writes during certificate generation.
  • Synchronized CRL Updates: Tie the current newly added revocation logic to VpnClient certificates and make it consistent and error free across both DeviceCertificate and VpnClient.
  • Consistent renewal and regeneration: Implement shared methods to update and regenerate certificate details based on VpnClient attributes updation.

Additional context
Unifying this under the hood adheres to DRY (Don't Repeat Yourself) principles and simplifies future maintainability.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.