Is your feature request related to a problem? Please describe.
With the AbstractTemplate model extended to support type="cert", the new ca and blueprint_cert relational fields must be exposed via the REST API. Without this, programmatic management of PKI templates is impossible, blocking third-party integrations and automation scripts.
Describe the solution you'd like
I will update the API serializers and existing endpoints to natively support the new template type:
-
Template Serializer: update the API serializers to conditionally expose the ca and blueprint_cert fields. The validation logic must enforce that ca is strictly required when type="cert", but ignored for other template types.
-
Blueprint Validation: ensure the serializer's validation prevents a certificate assigned to a DeviceCertificate from being selected as a blueprint_cert.
-
Device Serializer: ensure the Device API serializer correctly handles assignments, transparently creating or destroying DeviceCertificate relationships when templates are patched.
-
Organization Scoping: ensure that existing OpenWISP multi-tenant RBAC and organization scoping are strictly applied to both the ca and blueprint_cert fields during API creation and updates.
Requirements from the GSoC proposal
- Expose the new
Certificate template type within the current REST API template endpoints.
- Do not introduce new API endpoints unless the plan changes during implementation.
- Reuse OpenWISP's existing role-based access control.
Tests from the GSoC proposal
Measurable outcomes: 7
Implementation points: 6, 7
Is your feature request related to a problem? Please describe.
With the AbstractTemplate model extended to support
type="cert", the newcaandblueprint_certrelational fields must be exposed via the REST API. Without this, programmatic management of PKI templates is impossible, blocking third-party integrations and automation scripts.Describe the solution you'd like
I will update the API serializers and existing endpoints to natively support the new template type:
Template Serializer: update the API serializers to conditionally expose the
caandblueprint_certfields. The validation logic must enforce thatcais strictly required whentype="cert", but ignored for other template types.Blueprint Validation: ensure the serializer's validation prevents a certificate assigned to a
DeviceCertificatefrom being selected as ablueprint_cert.Device Serializer: ensure the Device API serializer correctly handles assignments, transparently creating or destroying
DeviceCertificaterelationships when templates are patched.Organization Scoping: ensure that existing OpenWISP multi-tenant RBAC and organization scoping are strictly applied to both the
caandblueprint_certfields during API creation and updates.Requirements from the GSoC proposal
Certificatetemplate type within the current REST API template endpoints.Tests from the GSoC proposal
caandblueprint_certfields.Measurable outcomes: 7
Implementation points: 6, 7