openwisp / openwisp/openwisp-controller
[feature:gsoc26] Extend AbstractTemplate for X.509 Certificates
@stktyagi is already working on this.
Since May 15, 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, OpenWISP restricts automated X.509 certificate generation exclusively to OpenVPN clients. If an administrator wants to create general-purpose certificates, for example for securing web services or 802.1x, they are forced to attach an unnecessary VPN configuration.
Describe the solution you'd like
Instead of creating a separate template model, I will extend the existing AbstractTemplate model to natively support standalone certificates.
- Add
"cert"to theTYPE_CHOICES. - Introduce a direct
caForeignKeyto thedjango_x509.Camodel. - Introduce an optional
blueprint_certForeignKeyto thedjango_x509.Certmodel. - Update the
clean()method validation to:- Allow
auto_cert = Truewhentype == "cert". - Require a
cawhentype == "cert". - Clear
caandblueprint_certwhentype != "cert". - Validate organization scoping for
caandblueprint_cert, following the same_validate_org_relation()pattern already used by template relations.
- Allow
Blueprint certificate validation
Enforce the blueprint constraint: validate that if a blueprint_cert is selected, it is not currently assigned directly to any device via DeviceCertificate.
The proposal lists the following controller-level validation points:
- Admin/API filtering should prevent already assigned certificates from being selected as blueprint certificates.
Template.clean()should validate that a selectedblueprint_certis not assigned to a device.DeviceCertificate.clean()should prevent a certificate referenced as a blueprint from being assigned to a device.
Decision to keep open
The proposal mentions an optional naming convention for blueprint certificates in django-x509 admin, for example [TEMPLATE] - ..., if visual distinction is needed. This is not decided here and can be investigated during implementation.
Measurable outcome: 1, 2
Implementation point: 6, 7
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.