Skip to content

[refactor:gsoc26] Use Standalone Certificate Templates as the underlying base for VpnClient certificate management #1449

Description

@stktyagi

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.

Metadata

Metadata

Assignees

Labels

enhancementgsocPart of a Google Summer of Code project

Type

Projects

Status
ToDo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions