feat: DMS: add certificate Issuance Profile support#276
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #276 +/- ##
==========================================
- Coverage 45.82% 45.81% -0.01%
==========================================
Files 128 128
Lines 8570 8569 -1
==========================================
- Hits 3927 3926 -1
Misses 4307 4307
Partials 336 336
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…roll Signed-off-by: Jon Galipienzo <[email protected]>
Signed-off-by: Jon Galipienzo <[email protected]>
Signed-off-by: Jon Galipienzo <[email protected]>
Signed-off-by: Jon Galipienzo <[email protected]>
Signed-off-by: Jon Galipienzo <[email protected]>
a85a413 to
42aec29
Compare
Signed-off-by: Jon Galipienzo <[email protected]>
7f62113 to
5be2ab6
Compare
|
There was a problem hiding this comment.
Pull Request Overview
This PR adds configurable certificate issuance profiles to the DMS, enhancing control over device certificate management.
- Introduces a new IssuanceProfile field in DMS settings with associated validation and default assignment logic.
- Updates create, update, enroll, and reenroll operations to validate the issuance profile against the enrollment CA’s certificate.
- Adds new error definitions and test cases to capture invalid issuance profile scenarios.
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| core/pkg/models/dms.go | Added a new IssuanceProfile field to the DMS settings struct |
| core/pkg/errs/dms.go | Added new error ErrDMSIssuanceProfile for issuance profile validation failures |
| backend/pkg/x509engines/x509engine.go | Updated error message wording for certificate expiration checks |
| backend/pkg/services/dmsmanager.go | Integrated issuance profile validation and default assignment in DMS operations |
| backend/pkg/controllers/dmsmanager.go | Adjusted HTTP error responses to use consistent JSON formatting |
| backend/pkg/assemblers/dms-manager_test.go | Added tests covering invalid issuance profile scenarios |
Comments suppressed due to low confidence (1)
core/pkg/errs/dms.go:8
- [nitpick] Standardize the error message wording for issuance profile validation so that it matches the log messages produced in the validation function; this will help reduce ambiguity when troubleshooting.
ErrDMSIssuanceProfile error = errors.New("DMS certificate expiration exceeds that of the enrollment CA")
* feat: use Issuance Profile definition from DMS during enroll and reenroll Signed-off-by: Jon Galipienzo <[email protected]> * test: add/update tests to cover the new configuration Signed-off-by: Jon Galipienzo <[email protected]> * feat: provide enrollment CA's IssuanceProfile as default Signed-off-by: Jon Galipienzo <[email protected]> * test: add test for default issuance profile Signed-off-by: Jon Galipienzo <[email protected]> * test: fix tests Signed-off-by: Jon Galipienzo <[email protected]> * feat: validate issuance profile on create/update Signed-off-by: Jon Galipienzo <[email protected]> --------- Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz <haritzsaiz>
* feat: use Issuance Profile definition from DMS during enroll and reenroll Signed-off-by: Jon Galipienzo <[email protected]> * test: add/update tests to cover the new configuration Signed-off-by: Jon Galipienzo <[email protected]> * feat: provide enrollment CA's IssuanceProfile as default Signed-off-by: Jon Galipienzo <[email protected]> * test: add test for default issuance profile Signed-off-by: Jon Galipienzo <[email protected]> * test: fix tests Signed-off-by: Jon Galipienzo <[email protected]> * feat: validate issuance profile on create/update Signed-off-by: Jon Galipienzo <[email protected]> --------- Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz <haritzsaiz>
…d with colons (#279) * fix crl urls Signed-off-by: Haritz <haritzsaiz> * fix tests Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix SubjectKeyIDs Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix crl Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix import tests Signed-off-by: Haritz <haritzsaiz> * fix va role fetching Signed-off-by: Haritz <haritzsaiz> * chore: Bump dependencies (#278) Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: DMS: add certificate Issuance Profile support (#276) * feat: use Issuance Profile definition from DMS during enroll and reenroll Signed-off-by: Jon Galipienzo <[email protected]> * test: add/update tests to cover the new configuration Signed-off-by: Jon Galipienzo <[email protected]> * feat: provide enrollment CA's IssuanceProfile as default Signed-off-by: Jon Galipienzo <[email protected]> * test: add test for default issuance profile Signed-off-by: Jon Galipienzo <[email protected]> * test: fix tests Signed-off-by: Jon Galipienzo <[email protected]> * feat: validate issuance profile on create/update Signed-off-by: Jon Galipienzo <[email protected]> --------- Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: va: Remove get roles (#280) Remove get roles Signed-off-by: Haritz <haritzsaiz> Co-authored-by: Haritz <haritzsaiz> Signed-off-by: Haritz <haritzsaiz> * chore: monolithic: add labels and standard ports in docker containers (#281) add labels and standard ports Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> --------- Signed-off-by: Haritz <haritzsaiz> Signed-off-by: haritz <[email protected]> Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz S. Sierra <[email protected]> Co-authored-by: Haritz <haritzsaiz> Co-authored-by: Juanjo Rodriguez <[email protected]> Co-authored-by: Jon Galipienzo <[email protected]>
…d with colons (#279) * fix crl urls Signed-off-by: Haritz <haritzsaiz> * fix tests Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix SubjectKeyIDs Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix crl Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix import tests Signed-off-by: Haritz <haritzsaiz> * fix va role fetching Signed-off-by: Haritz <haritzsaiz> * chore: Bump dependencies (#278) Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: DMS: add certificate Issuance Profile support (#276) * feat: use Issuance Profile definition from DMS during enroll and reenroll Signed-off-by: Jon Galipienzo <[email protected]> * test: add/update tests to cover the new configuration Signed-off-by: Jon Galipienzo <[email protected]> * feat: provide enrollment CA's IssuanceProfile as default Signed-off-by: Jon Galipienzo <[email protected]> * test: add test for default issuance profile Signed-off-by: Jon Galipienzo <[email protected]> * test: fix tests Signed-off-by: Jon Galipienzo <[email protected]> * feat: validate issuance profile on create/update Signed-off-by: Jon Galipienzo <[email protected]> --------- Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: va: Remove get roles (#280) Remove get roles Signed-off-by: Haritz <haritzsaiz> Co-authored-by: Haritz <haritzsaiz> Signed-off-by: Haritz <haritzsaiz> * chore: monolithic: add labels and standard ports in docker containers (#281) add labels and standard ports Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> --------- Signed-off-by: Haritz <haritzsaiz> Signed-off-by: haritz <[email protected]> Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz S. Sierra <[email protected]> Co-authored-by: Haritz <haritzsaiz> Co-authored-by: Juanjo Rodriguez <[email protected]> Co-authored-by: Jon Galipienzo <[email protected]> Signed-off-by: haritz <[email protected]>
…d with colons (#279) * fix crl urls Signed-off-by: Haritz <haritzsaiz> * fix tests Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix SubjectKeyIDs Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix crl Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix import tests Signed-off-by: Haritz <haritzsaiz> * fix va role fetching Signed-off-by: Haritz <haritzsaiz> * chore: Bump dependencies (#278) Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: DMS: add certificate Issuance Profile support (#276) * feat: use Issuance Profile definition from DMS during enroll and reenroll Signed-off-by: Jon Galipienzo <[email protected]> * test: add/update tests to cover the new configuration Signed-off-by: Jon Galipienzo <[email protected]> * feat: provide enrollment CA's IssuanceProfile as default Signed-off-by: Jon Galipienzo <[email protected]> * test: add test for default issuance profile Signed-off-by: Jon Galipienzo <[email protected]> * test: fix tests Signed-off-by: Jon Galipienzo <[email protected]> * feat: validate issuance profile on create/update Signed-off-by: Jon Galipienzo <[email protected]> --------- Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: va: Remove get roles (#280) Remove get roles Signed-off-by: Haritz <haritzsaiz> Co-authored-by: Haritz <haritzsaiz> Signed-off-by: Haritz <haritzsaiz> * chore: monolithic: add labels and standard ports in docker containers (#281) add labels and standard ports Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> --------- Signed-off-by: Haritz <haritzsaiz> Signed-off-by: haritz <[email protected]> Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz S. Sierra <[email protected]> Co-authored-by: Haritz <haritzsaiz> Co-authored-by: Juanjo Rodriguez <[email protected]> Co-authored-by: Jon Galipienzo <[email protected]> Signed-off-by: haritz <[email protected]>
…d with colons (#279) * fix crl urls Signed-off-by: Haritz <haritzsaiz> * fix tests Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix SubjectKeyIDs Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix crl Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> * fix import tests Signed-off-by: Haritz <haritzsaiz> * fix va role fetching Signed-off-by: Haritz <haritzsaiz> * chore: Bump dependencies (#278) Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: DMS: add certificate Issuance Profile support (#276) * feat: use Issuance Profile definition from DMS during enroll and reenroll Signed-off-by: Jon Galipienzo <[email protected]> * test: add/update tests to cover the new configuration Signed-off-by: Jon Galipienzo <[email protected]> * feat: provide enrollment CA's IssuanceProfile as default Signed-off-by: Jon Galipienzo <[email protected]> * test: add test for default issuance profile Signed-off-by: Jon Galipienzo <[email protected]> * test: fix tests Signed-off-by: Jon Galipienzo <[email protected]> * feat: validate issuance profile on create/update Signed-off-by: Jon Galipienzo <[email protected]> --------- Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz <haritzsaiz> * feat: va: Remove get roles (#280) Remove get roles Signed-off-by: Haritz <haritzsaiz> Co-authored-by: Haritz <haritzsaiz> Signed-off-by: Haritz <haritzsaiz> * chore: monolithic: add labels and standard ports in docker containers (#281) add labels and standard ports Signed-off-by: haritz <[email protected]> Signed-off-by: Haritz <haritzsaiz> --------- Signed-off-by: Haritz <haritzsaiz> Signed-off-by: haritz <[email protected]> Signed-off-by: Juan Jose Rodriguez <[email protected]> Signed-off-by: Jon Galipienzo <[email protected]> Signed-off-by: Haritz S. Sierra <[email protected]> Co-authored-by: Haritz <haritzsaiz> Co-authored-by: Juanjo Rodriguez <[email protected]> Co-authored-by: Jon Galipienzo <[email protected]> Signed-off-by: haritz <[email protected]>



This PR introduces support for configurable issuance profiles on a per-DMS basis, providing greater flexibility and control over device certificate management.
Closes #274
New functionality:
IssuanceProfilefield to the DMS settings struct.This feature enables fine-grained control over certificate issuance policies for each DMS.