Skip to content

Commit b0304a0

Browse files
authored
Merge pull request #552 from zigbee-alliance/#502-Add-schema-version-to-all-DCL-schemas
#502 Add SchemaVersion field into PKI, Compliance, Model and VendorInfo schemas
2 parents d7d8e06 + 6b6a444 commit b0304a0

File tree

159 files changed

+4271
-1049
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

159 files changed

+4271
-1049
lines changed

docs/static/openapi.yml

+276
Large diffs are not rendered by default.

docs/transactions.md

+22
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ Adds a record about a Vendor.
128128
- companyLegalName: `string` - Legal name of the vendor company
129129
- companyPreferredName: `optional(string)` - Preferred name of the vendor company
130130
- vendorLandingPageURL: `optional(string)` - URL of the vendor's landing page
131+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
131132
- In State: `vendorinfo/VendorInfo/value/<vid>`
132133
- Who can send:
133134
- Account with a vendor role who has the matching Vendor ID
@@ -147,6 +148,7 @@ Updates a record about a Vendor.
147148
- companyLegalName: `optional(string)` - Legal name of the vendor company
148149
- companyPreferredName: `optional(string)` - Preferred name of the vendor company
149150
- vendorLandingPageURL: `optional(string)` - URL of the vendor's landing page
151+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
150152
- In State: `vendorinfo/VendorInfo/value/<vid>`
151153
- Who can send:
152154
- Account with a vendor role who has the matching Vendor ID
@@ -209,6 +211,7 @@ Not all fields can be edited (see `EDIT_MODEL`).
209211
- supportURL: `optional(string)` - URL that contains product specific web page that contains support details for the device model.
210212
- productURL: `optional(string)` - URL that contains product specific web page that contains details for the device model.
211213
- lsfURL: `optional(string)` - URL to the Localized String File of this product.
214+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
212215
- In State:
213216
- `model/Model/value/<vid>/<pid>`
214217
- `model/VendorProducts/value/<vid>`
@@ -254,6 +257,7 @@ All non-edited fields remain the same.
254257
- supportURL: `optional(string)` - URL that contains product specific web page that contains support details for the device model.
255258
- productURL: `optional(string)` - URL that contains product specific web page that contains details for the device model.
256259
- lsfURL: `optional(string)` - URL to the Localized String File of this product.
260+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
257261
- lsfRevision: `optional(uint32)` - LsfRevision is a monotonically increasing positive integer indicating the latest available version of Localized String File.
258262
- In State: `model/Model/value/<vid>/<pid>`
259263
- Who can send:
@@ -305,6 +309,7 @@ If one of `OTA_URl`, `OTA_checksum` or `OTA_checksum_type` fields is set, then t
305309
- otaChecksum `optional(string)` - Digest of the entire contents of the associated OTA Software Update Image under the OtaUrl attribute, encoded in base64 string representation. The digest SHALL have been computed using the algorithm specified in OtaChecksumType
306310
- otaChecksumType `optional(string)` - Numeric identifier as defined in IANA Named Information Hash Algorithm Registry for the type of otaChecksum. For example, a value of 1 would match the sha-256 identifier, which maps to the SHA-256 digest algorithm
307311
- releaseNotesURL `optional(string)` - URL that contains product specific web page that contains release notes for the device model.
312+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
308313
- In State:
309314
- `model/ModelVersion/value/<vid>/<pid>/<softwareVersion>`
310315
- `model/ModelVersions/value/<vid>/<pid>`
@@ -351,6 +356,7 @@ All non-edited fields remain the same.
351356
- otaURL `optional(string)` - URL where to obtain the OTA image
352357
- otaFileSize `optional(string)` - OtaFileSize is the total size of the OTA software image in bytes
353358
- otaChecksum `optional(string)` - Digest of the entire contents of the associated OTA Software Update Image under the OtaUrl attribute, encoded in base64 string representation. The digest SHALL have been computed using the algorithm specified in OtaChecksumType
359+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
354360

355361
- In State: `model/ModelVersion/value/<vid>/<pid>/<softwareVersion>`
356362
- Who can send:
@@ -488,6 +494,7 @@ from the revocation list.
488494
- transport `optional(string)` - optional field describing the transport
489495
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
490496
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
497+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
491498
- In State:
492499
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
493500
- `compliance/CertifiedModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
@@ -525,6 +532,7 @@ Updates a compliance info by VID, PID, Software Version and Certification Type.
525532
- transport `optional(string)` - optional field describing the transport
526533
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
527534
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
535+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
528536
- Who can send:
529537
- CertificationCenter
530538
- CLI command:
@@ -572,6 +580,7 @@ is written on the ledger (`CERTIFY_MODEL` was called), or
572580
- revocationDate: `string` - The date of model revocation (rfc3339 encoded), for example 2019-10-12T07:20:50.52Z
573581
- certificationType: `string` - Certification type - Currently 'zigbee' and 'matter', 'access control', 'product security' types are supported
574582
- reason `optional(string)` - optional comment describing the reason of revocation
583+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
575584
- In State:
576585
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
577586
- `compliance/RevokedModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
@@ -611,6 +620,7 @@ Can not be set if there is already a certification record on the ledger (certifi
611620
- transport `optional(string)` - optional field describing the transport
612621
- parentChild `optional(string)` - optional field describing the parent/child - Currently 'parent' and 'child' types are supported
613622
- certificationIDOfSoftwareComponent `optional(string)` - optional field describing the certification ID of software component
623+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
614624
- In State:
615625
- `compliance/ComplianceInfo/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
616626
- `compliance/ProvisionalModel/value/<vid>/<pid>/<softwareVersion>/<certificationType>`
@@ -831,6 +841,8 @@ The certificate is immutable. It can only be revoked by either the owner or a qu
831841
- cert: `string` - PEM encoded certificate. The corresponding CLI parameter can contain either a PEM string or a path to a file containing the data.
832842
- info: `optional(string)` - information/notes for the proposal
833843
- time: `optional(int64)` - proposal time (number of nanoseconds elapsed since January 1, 1970 UTC). CLI uses the current time for that field.
844+
- certificate-schema-version: `optional(uint16)` - Certificate's schema version to support backward/forward compatability(default 0)
845+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
834846
- In State: `pki/ProposedCertificate/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
835847
- Who can send:
836848
- Trustee
@@ -883,6 +895,7 @@ The certificate is not reject until sufficient number of Trustees reject it.
883895
- Parameters:
884896
- subject: `string` - proposed certificates's `Subject` is base64 encoded subject DER sequence bytes
885897
- subject_key_id: `string` - proposed certificates's `Subject Key Id` in hex string format, e.g:
898+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
886899
`5A:88:0E:6C:36:53:D0:7F:B0:89:71:A3:F4:73:79:09:30:E6:2B:DB`
887900
- info: `optional(string)` - information/notes for the reject
888901
- time: `optional(int64)` -- reject time (number of nanoseconds elapsed since January 1, 1970 UTC). CLI uses the current time for that field.
@@ -913,6 +926,8 @@ The certificate is immutable. It can only be revoked by either the owner or a qu
913926
- `vid` field associated with the corresponding PAA on the ledger must be equal to the Vendor account's VID.
914927
- Parameters:
915928
- cert: `string` - PEM encoded certificate. The corresponding CLI parameter can contain either a PEM string or a path to a file containing the data.
929+
- certificate-schema-version: `optional(uint16)` - Certificate's schema version to support backward/forward compatability(default 0)
930+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
916931
- In State:
917932
- `pki/ApprovedCertificates/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
918933
- `pki/ChildCertificates/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
@@ -953,6 +968,7 @@ Root certificates can not be revoked this way, use `PROPOSE_X509_CERT_REVOC` an
953968
- revoke-child: `optional(bool)` - to revoke child certificates in the chain - default is false
954969
- info: `optional(string)` - information/notes for the revocation
955970
- time: `optional(int64)` - revocation time (number of nanoseconds elapsed since January 1, 1970 UTC). CLI uses the current time for that field.
971+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
956972
- In State: `pki/RevokedCertificates/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
957973
- CLI command:
958974
- `dcld tx pki revoke-x509-cert --subject=<base64 string> --subject-key-id=<hex string> --from=<account>`
@@ -995,6 +1011,8 @@ then the certificate will be in a pending state until sufficient number of other
9951011
- revoke-child: `optional(bool)` - to revoke child certificates in the chain - default is false
9961012
- info: `optional(string)` - information/notes for the revocation proposal
9971013
- time: `optional(int64)` - revocation proposal time (number of nanoseconds elapsed since January 1, 1970 UTC). CLI uses the current time for that field.
1014+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
1015+
9981016
- In State: `pki/ProposedCertificateRevocation/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
9991017
- Who can send:
10001018
- Trustee
@@ -1059,6 +1077,7 @@ and DACs (leaf certificates) added to DCL if they are revoked in the CRL identif
10591077
- dataDigest: `optional(string)` - Digest of the entire contents of the associated file downloaded from the DataUrl. Must be omitted if RevocationType is 1. Must be provided if and only if the `DataFileSize` field is present.
10601078
- dataDigestType: `optional(uint32)` - The type of digest used in the DataDigest field from the list of [1, 7, 8, 10, 11, 12] (IANA Named Information Hash Algorithm Registry). Must be provided if and only if the `DataDigest` field is present.
10611079
- revocationType: `uint32` - The type of file found at the DataUrl for this entry. Supported types: 1 - RFC5280 Certificate Revocation List (CRL).
1080+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
10621081
- In State:
10631082
- `pki/RevocationDistributionPoint/value/<IssuerSubjectKeyID>` -> list of Revocation Distribution Points
10641083
- `pki/RevocationDistributionPoint/value/<IssuerSubjectKeyID>/<vid>/<label>`-> Revocation Distribution Point
@@ -1100,6 +1119,7 @@ Updates an existing PKI Revocation distribution endpoint (such as RFC5280 Certif
11001119
- dataFileSize: `optional(uint64)` - Total size in bytes of the file found at the DataUrl. Must be omitted if RevocationType is 1.
11011120
- dataDigest: `optional(string)` - Digest of the entire contents of the associated file downloaded from the DataUrl. Must be omitted if RevocationType is 1. Must be provided if and only if the `DataFileSize` field is present.
11021121
- dataDigestType: `optional(uint32)` - The type of digest used in the DataDigest field from the list of [1, 7, 8, 10, 11, 12] (IANA Named Information Hash Algorithm Registry). Must be provided if and only if the `DataDigest` field is present.
1122+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
11031123
- In State:
11041124
- `pki/RevocationDistributionPoint/value/<IssuerSubjectKeyID>` -> list of Revocation Distribution Points
11051125
- `pki/RevocationDistributionPoint/value/<IssuerSubjectKeyID>/<vid>/<label>` -> Revocation Distribution Point
@@ -1145,6 +1165,7 @@ This transaction adds a NOC root certificate owned by the Vendor.
11451165
- the signature (self-signature) and expiration date must be valid.
11461166
- Parameters:
11471167
- cert: `string` - The NOC Root Certificate, encoded in X.509v3 PEM format. Can be a PEM string or a file path.
1168+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
11481169
- In State:
11491170
- `pki/ApprovedCertificates/value/<Subject>/<SubjectKeyID>`
11501171
- `pki/ApprovedCertificatesBySubject/value/<Subject>`
@@ -1175,6 +1196,7 @@ already present on the ledger.
11751196
- the signature (self-signature) and expiration date must be valid.
11761197
- Parameters:
11771198
- cert: `string` - The NOC non-root Certificate, encoded in X.509v3 PEM format. Can be a PEM string or a file path.
1199+
- schemaVersion: `optional(uint16)` - Schema version to support backward/forward compatability(default 0)
11781200
- In State:
11791201
- `pki/ApprovedCertificates/value/<Subject>/<SubjectKeyID>`
11801202
- `pki/ApprovedCertificatesBySubject/value/<Subject>`

integration_tests/cli/compliance-demo.sh

+9-3
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ zigbee_certification_type="zigbee"
4444
matter_certification_type="matter"
4545
cd_certificate_id="123"
4646
cd_version_number=1
47-
47+
schema_version_0=0
48+
schema_version_2=2
4849
echo "Certify unknown Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
4950
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$zigbee_certification_type" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --from $zb_account --yes)
5051
echo "$result"
@@ -182,7 +183,7 @@ check_response "$result" "ledger does not have matching CDVersionNumber=0: model
182183
test_divider
183184

184185
echo "Certify Model with VID: $vid PID: $pid SV: ${sv} with zigbee certification"
185-
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$zigbee_certification_type" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --cdVersionNumber=$cd_version_number --from $zb_account --yes)
186+
result=$(echo "$passphrase" | dcld tx compliance certify-model --vid=$vid --pid=$pid --softwareVersion=$sv --softwareVersionString=$svs --certificationType="$zigbee_certification_type" --certificationDate="$certification_date" --cdCertificateId="$cd_certificate_id" --cdVersionNumber=$cd_version_number --schemaVersion=$schema_version_2 --from $zb_account --yes)
186187
echo "$result"
187188
check_response "$result" "\"code\": 0"
188189

@@ -276,6 +277,7 @@ check_response "$result" "\"softwareVersionCertificationStatus\": 2"
276277
check_response "$result" "\"cDCertificateId\": \"$cd_certificate_id\""
277278
check_response "$result" "\"date\": \"$certification_date\""
278279
check_response "$result" "\"certificationType\": \"$zigbee_certification_type\""
280+
check_response "$result" "\"schemaVersion\": $schema_version_2"
279281
echo "$result"
280282

281283
test_divider
@@ -288,6 +290,7 @@ check_response "$result" "\"softwareVersionCertificationStatus\": 2"
288290
check_response "$result" "\"cDCertificateId\": \"$cd_certificate_id\""
289291
check_response "$result" "\"date\": \"$certification_date\""
290292
check_response "$result" "\"certificationType\": \"$matter_certification_type\""
293+
check_response "$result" "\"schemaVersion\": $schema_version_0"
291294
echo "$result"
292295

293296
test_divider
@@ -728,9 +731,10 @@ upd_supported_clusters="brand_new_clusters"
728731
upd_os_version="brand_new_os_version"
729732
upd_parent_child="parent"
730733
upd_certification_id_of_software_component="brand_new_component"
734+
schema_version_3=3
731735

732736
echo "Update Compliance Info for Model with VID: ${vid} PID: ${pid} SV: ${sv} for $zigbee_certification_type with all optional fields set"
733-
result=$(echo "$passphrase" | dcld tx compliance update-compliance-info --vid=$vid --pid=$pid --softwareVersion=$sv --certificationType=$zigbee_certification_type --cdVersionNumber=$upd_cd_version_number --certificationDate=$upd_certification_date --reason=$upd_reason --cdCertificateId=$upd_cd_certificate_id --certificationRoute=$upd_certification_route --programType=$upd_program_type --programTypeVersion=$upd_program_type_version --compliantPlatformUsed=$upd_compliant_platform_used --compliantPlatformVersion=$upd_compliant_platform_version --transport=$upd_transport --familyId=$upd_familyID --supportedClusters=$upd_supported_clusters --OSVersion=$upd_os_version --parentChild=$upd_parent_child --certificationIDOfSoftwareComponent=$upd_certification_id_of_software_component --from=$zb_account --yes)
737+
result=$(echo "$passphrase" | dcld tx compliance update-compliance-info --vid=$vid --pid=$pid --softwareVersion=$sv --certificationType=$zigbee_certification_type --cdVersionNumber=$upd_cd_version_number --certificationDate=$upd_certification_date --reason=$upd_reason --cdCertificateId=$upd_cd_certificate_id --certificationRoute=$upd_certification_route --programType=$upd_program_type --programTypeVersion=$upd_program_type_version --compliantPlatformUsed=$upd_compliant_platform_used --compliantPlatformVersion=$upd_compliant_platform_version --transport=$upd_transport --familyId=$upd_familyID --supportedClusters=$upd_supported_clusters --OSVersion=$upd_os_version --parentChild=$upd_parent_child --certificationIDOfSoftwareComponent=$upd_certification_id_of_software_component --schemaVersion=$schema_version_3 --from=$zb_account --yes)
734738
echo "$result"
735739

736740
echo "Compliance Info for Model with VID: ${vid} PID: ${pid} SV: ${sv} for $zigbee_certification_type all fields updated"
@@ -754,6 +758,8 @@ check_response "$result" "\"supportedClusters\": \"$upd_supported_clusters\""
754758
check_response "$result" "\"OSVersion\": \"$upd_os_version\""
755759
check_response "$result" "\"parentChild\": \"$upd_parent_child\""
756760
check_response "$result" "\"certificationIdOfSoftwareComponent\": \"$upd_certification_id_of_software_component\""
761+
check_response "$result" "\"schemaVersion\": $schema_version_3"
762+
757763

758764
test_divider
759765

0 commit comments

Comments
 (0)