Skip to content

Commit 1933bad

Browse files
authored
Merge pull request #559 from zigbee-alliance/rename_non_root_noc_to_noc_ica
Rename non-root NOC to NOC_ICA (in doc, code, state, CLI command)
2 parents 17e3203 + 08a2e01 commit 1933bad

File tree

57 files changed

+1730
-1682
lines changed

Some content is hidden

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

57 files changed

+1730
-1682
lines changed

docs/static/openapi.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -9297,17 +9297,17 @@ paths:
92979297
type: string
92989298
tags:
92999299
- Query
9300-
/dcl/pki/noc-certificates:
9300+
/dcl/pki/noc-ica-certificates:
93019301
get:
9302-
summary: Queries a list of NocCertificates items.
9303-
operationId: NocCertificatesAll
9302+
summary: Queries a list of NocIcaCertificates items.
9303+
operationId: NocIcaCertificatesAll
93049304
responses:
93059305
'200':
93069306
description: A successful response.
93079307
schema:
93089308
type: object
93099309
properties:
9310-
nocCertificates:
9310+
nocIcaCertificates:
93119311
type: array
93129312
items:
93139313
type: object
@@ -9482,17 +9482,17 @@ paths:
94829482
type: boolean
94839483
tags:
94849484
- Query
9485-
/dcl/pki/noc-certificates/{vid}:
9485+
/dcl/pki/noc-ica-certificates/{vid}:
94869486
get:
9487-
summary: Queries a NocCertificates by index.
9488-
operationId: NocCertificates
9487+
summary: Queries a NocIcaCertificates by index.
9488+
operationId: NocIcaCertificates
94899489
responses:
94909490
'200':
94919491
description: A successful response.
94929492
schema:
94939493
type: object
94949494
properties:
9495-
nocCertificates:
9495+
nocIcaCertificates:
94969496
type: object
94979497
properties:
94989498
vid:
@@ -21678,7 +21678,7 @@ definitions:
2167821678
format: int64
2167921679
info:
2168021680
type: string
21681-
zigbeealliance.distributedcomplianceledger.pki.NocCertificates:
21681+
zigbeealliance.distributedcomplianceledger.pki.NocIcaCertificates:
2168221682
type: object
2168321683
properties:
2168421684
vid:
@@ -22056,10 +22056,10 @@ definitions:
2205622056
repeated Bar results = 1;
2205722057
PageResponse page = 2;
2205822058
}
22059-
zigbeealliance.distributedcomplianceledger.pki.QueryAllNocCertificatesResponse:
22059+
zigbeealliance.distributedcomplianceledger.pki.QueryAllNocIcaCertificatesResponse:
2206022060
type: object
2206122061
properties:
22062-
nocCertificates:
22062+
nocIcaCertificates:
2206322063
type: array
2206422064
items:
2206522065
type: object
@@ -22857,10 +22857,10 @@ definitions:
2285722857
type: string
2285822858
subjectKeyId:
2285922859
type: string
22860-
zigbeealliance.distributedcomplianceledger.pki.QueryGetNocCertificatesResponse:
22860+
zigbeealliance.distributedcomplianceledger.pki.QueryGetNocIcaCertificatesResponse:
2286122861
type: object
2286222862
properties:
22863-
nocCertificates:
22863+
nocIcaCertificates:
2286422864
type: object
2286522865
properties:
2286622866
vid:

docs/transactions.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1433,7 +1433,7 @@ already present on the ledger.
14331433
- `pki/NocIcaCertificates/value/<VID>`
14341434
- `pki/ChildCertificates/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
14351435
- CLI Command:
1436-
- `dcld tx pki add-noc-x509-cert --certificate=<string-or-path> --from=<account>`
1436+
- `dcld tx pki add-noc-x509-ica-cert --certificate=<string-or-path> --from=<account>`
14371437

14381438
#### REVOKE_NOC_ICA
14391439

@@ -1460,7 +1460,7 @@ Revoked certificates can be retrieved by using the [GET_REVOKED_CERT](#get_revok
14601460
- In State:
14611461
- `pki/RevokedCertificates/value/<Certificate's Subject>/<Certificate's Subject Key ID>`
14621462
- CLI command:
1463-
- `dcld tx pki revoke-noc-x509-cert --subject=<base64 string> --subject-key-id=<hex string> --serial-number=<string> --info=<string> --time=<int64> --revoke-child=<bool> --from=<account>`
1463+
- `dcld tx pki revoke-noc-x509-ica-cert --subject=<base64 string> --subject-key-id=<hex string> --serial-number=<string> --info=<string> --time=<int64> --revoke-child=<bool> --from=<account>`
14641464

14651465
#### GET_NOC_ROOT_BY_VID
14661466

@@ -1492,9 +1492,9 @@ Use [GET_ALL_REVOKED_CERT](#get_all_revoked_certs) to get a list of all revoked
14921492
- Parameters:
14931493
- vid: `uint16` - Vendor ID (positive non-zero)
14941494
- CLI Command:
1495-
- `dcld query pki noc-x509-certs --vid=<uint16>`
1495+
- `dcld query pki noc-x509-ica-certs --vid=<uint16>`
14961496
- REST API:
1497-
- GET `/dcl/pki/noc-certificates/{vid}`
1497+
- GET `/dcl/pki/noc-ica-certificates/{vid}`
14981498

14991499
#### GET_REVOKED_NOC_ROOT
15001500

@@ -1542,9 +1542,9 @@ Use [GET_ALL_REVOKED_CERT](#get_all_revoked_certs) to get a list of all revoked
15421542
- Parameters:
15431543
- Common pagination parameters
15441544
- CLI Command:
1545-
- `dcld query pki all-noc-x509-certs`
1545+
- `dcld query pki all-noc-x509-ica-certs`
15461546
- REST API:
1547-
- GET `/dcl/pki/noc-certificates`
1547+
- GET `/dcl/pki/noc-ica-certificates`
15481548

15491549
#### GET_ALL_REVOKED_NOC_ROOT
15501550

integration_tests/cli/pki-noc-certs.sh

+14-14
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ check_response "$result" "\"subjectKeyId\": \"$noc_root_cert_1_subject_key_id\""
200200
check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
201201
check_response "$result" "\"subjectAsText\": \"$noc_root_cert_1_subject_as_text\""
202202

203-
echo "Add first NOC certificate by vendor with VID = $vid"
204-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_1_path" --from $vendor_account --yes)
203+
echo "Add first intermidiate NOC certificate by vendor with VID = $vid"
204+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_1_path" --from $vendor_account --yes)
205205
check_response "$result" "\"code\": 0"
206206

207-
echo "Request NOC certificate by VID = $vid"
208-
result=$(dcld query pki noc-x509-certs --vid="$vid")
207+
echo "Request intermidiate NOC certificate by VID = $vid"
208+
result=$(dcld query pki noc-x509-ica-certs --vid="$vid")
209209
echo $result | jq
210210
check_response "$result" "\"subject\": \"$noc_cert_1_subject\""
211211
check_response "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\""
@@ -221,23 +221,23 @@ check_response "$result" "\"subject\": \"$noc_cert_1_subject\""
221221
check_response "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\""
222222

223223
echo "Try to add intermediate with different VID = $vid_2"
224-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_2_path" --from $vendor_account_2 --yes)
224+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_2_path" --from $vendor_account_2 --yes)
225225
check_response "$result" "\"code\": 439"
226226

227227
test_divider
228228

229229
cert_schema_version_3=3
230230
schema_version_4=4
231231
echo "Add second NOC certificate by vendor with VID = $vid"
232-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_2_path" --certificate-schema-version=$cert_schema_version_3 --schemaVersion=$schema_version_4 --from $vendor_account --yes)
232+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_2_path" --certificate-schema-version=$cert_schema_version_3 --schemaVersion=$schema_version_4 --from $vendor_account --yes)
233233
check_response "$result" "\"code\": 0"
234234

235235
echo "Add third NOC certificate by vendor with VID = $vid"
236-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_1_copy_path" --from $vendor_account --yes)
236+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_1_copy_path" --from $vendor_account --yes)
237237
check_response "$result" "\"code\": 0"
238238

239239
echo "Request all NOC certificates"
240-
result=$(dcld query pki all-noc-x509-certs)
240+
result=$(dcld query pki all-noc-x509-ica-certs)
241241
echo $result | jq
242242
check_response "$result" "\"subject\": \"$noc_cert_1_subject\""
243243
check_response "$result" "\"subjectKeyId\": \"$noc_cert_1_subject_key_id\""
@@ -272,7 +272,7 @@ result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="
272272
check_response "$result" "\"code\": 0"
273273

274274
echo "Add NOC leaf certificate by vendor with VID = $vid"
275-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_leaf_cert_1_path" --from $vendor_account --yes)
275+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_leaf_cert_1_path" --from $vendor_account --yes)
276276
check_response "$result" "\"code\": 0"
277277

278278
echo "Request All NOC root certificate"
@@ -283,7 +283,7 @@ check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_serial_numbe
283283
check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\""
284284

285285
echo "Request all NOC certificates"
286-
result=$(dcld query pki all-noc-x509-certs)
286+
result=$(dcld query pki all-noc-x509-ica-certs)
287287
echo $result | jq
288288
check_response "$result" "\"serialNumber\": \"$noc_cert_1_serial_number\""
289289
check_response "$result" "\"serialNumber\": \"$noc_cert_1_copy_serial_number\""
@@ -365,7 +365,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_s
365365
echo $result | jq
366366

367367
echo "Request NOC certificate by VID = $vid should contain intermediate and leaf certificates"
368-
result=$(dcld query pki noc-x509-certs --vid="$vid")
368+
result=$(dcld query pki noc-x509-ica-certs --vid="$vid")
369369
echo $result | jq
370370
check_response "$result" "\"subject\": \"$noc_cert_1_subject\""
371371
check_response "$result" "\"subject\": \"$noc_leaf_cert_1_subject\""
@@ -395,12 +395,12 @@ test_divider
395395
echo "REVOCATION OF NON-ROOT NOC CERTIFICATES"
396396

397397
echo "Try to revoke NOC certificate with different VID = $vid_2"
398-
result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-cert --subject="$noc_cert_1_subject" --subject-key-id="$noc_cert_1_subject_key_id" --from $vendor_account_2 --yes)
398+
result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-ica-cert --subject="$noc_cert_1_subject" --subject-key-id="$noc_cert_1_subject_key_id" --from $vendor_account_2 --yes)
399399
check_response "$result" "\"code\": 439"
400400

401401
revoke_schema_version_6=6
402402
echo "$vendor_account Vendor revokes only NOC certificates, it should not revoke leaf certificates"
403-
result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-cert --subject="$noc_cert_1_subject" --subject-key-id="$noc_cert_1_subject_key_id" --schemaVersion=$revoke_schema_version_6 --from=$vendor_account --yes)
403+
result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-ica-cert --subject="$noc_cert_1_subject" --subject-key-id="$noc_cert_1_subject_key_id" --schemaVersion=$revoke_schema_version_6 --from=$vendor_account --yes)
404404
check_response "$result" "\"code\": 0"
405405

406406
echo "Request all revoked certificates should not contain leaf certificate"
@@ -440,7 +440,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_cert_1_copy_serial
440440
echo $result | jq
441441

442442
echo "Request NOC certificate by VID = $vid should contain one leaf certificate"
443-
result=$(dcld query pki noc-x509-certs --vid="$vid")
443+
result=$(dcld query pki noc-x509-ica-certs --vid="$vid")
444444
echo $result | jq
445445
check_response "$result" "\"subject\": \"$noc_leaf_cert_1_subject\""
446446
check_response "$result" "\"subjectKeyId\": \"$noc_leaf_cert_1_subject_key_id\""

integration_tests/cli/pki-noc-revocation-with-revoking-child.sh

+13-13
Original file line numberDiff line numberDiff line change
@@ -57,11 +57,11 @@ result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="
5757
check_response "$result" "\"code\": 0"
5858

5959
echo "Add first NOC certificate by vendor with VID = $vid"
60-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_1_path" --from $vendor_account --yes)
60+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_1_path" --from $vendor_account --yes)
6161
check_response "$result" "\"code\": 0"
6262

6363
echo "Add NOC leaf certificate by vendor with VID = $vid"
64-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_leaf_cert_1_path" --from $vendor_account --yes)
64+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_leaf_cert_1_path" --from $vendor_account --yes)
6565
check_response "$result" "\"code\": 0"
6666

6767
test_divider
@@ -73,7 +73,7 @@ check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_serial_number\""
7373
check_response "$result" "\"serialNumber\": \"$noc_root_cert_1_copy_serial_number\""
7474

7575
echo "Request all NOC certificates"
76-
result=$(dcld query pki all-noc-x509-certs)
76+
result=$(dcld query pki all-noc-x509-ica-certs)
7777
echo $result | jq
7878
check_response "$result" "\"serialNumber\": \"$noc_cert_1_serial_number\""
7979
check_response "$result" "\"serialNumber\": \"$noc_leaf_cert_1_serial_number\""
@@ -146,7 +146,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_root_cert_1_serial
146146
echo $result | jq
147147

148148
echo "Request NOC certificate by VID = $vid should be empty"
149-
result=$(dcld query pki noc-x509-certs --vid="$vid")
149+
result=$(dcld query pki noc-x509-ica-certs --vid="$vid")
150150
echo $result | jq
151151
check_response "$result" "Not Found"
152152
response_does_not_contain "$result" "\"subject\": \"$noc_cert_1_subject\""
@@ -180,32 +180,32 @@ echo "Add NOC root certificate by vendor with VID = $vid"
180180
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-root-cert --certificate="$noc_root_cert_2_path" --from $vendor_account --yes)
181181
check_response "$result" "\"code\": 0"
182182

183-
echo "Add NOC certificate by vendor with VID = $vid"
184-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_2_path" --from $vendor_account --yes)
183+
echo "Add intermidiate NOC certificate by vendor with VID = $vid"
184+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_2_path" --from $vendor_account --yes)
185185
check_response "$result" "\"code\": 0"
186186

187-
echo "Add second NOC certificate by vendor with VID = $vid"
188-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_cert_2_copy_path" --from $vendor_account --yes)
187+
echo "Add second intermidiate NOC certificate by vendor with VID = $vid"
188+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_cert_2_copy_path" --from $vendor_account --yes)
189189
check_response "$result" "\"code\": 0"
190190

191191
echo "Add leaf certificate by vendor with VID = $vid"
192-
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-cert --certificate="$noc_leaf_cert_2_path" --from $vendor_account --yes)
192+
result=$(echo "$passphrase" | dcld tx pki add-noc-x509-ica-cert --certificate="$noc_leaf_cert_2_path" --from $vendor_account --yes)
193193
check_response "$result" "\"code\": 0"
194194

195195
echo "Request All NOC root certificate"
196196
result=$(dcld query pki all-noc-x509-root-certs)
197197
echo $result | jq
198198
check_response "$result" "\"serialNumber\": \"$noc_root_cert_2_serial_number\""
199199

200-
echo "Request all NOC certificates"
201-
result=$(dcld query pki all-noc-x509-certs)
200+
echo "Request all intermidiate NOC certificates"
201+
result=$(dcld query pki all-noc-x509-ica-certs)
202202
echo $result | jq
203203
check_response "$result" "\"serialNumber\": \"$noc_cert_2_serial_number\""
204204
check_response "$result" "\"serialNumber\": \"$noc_cert_2_copy_serial_number\""
205205
check_response "$result" "\"serialNumber\": \"$noc_leaf_cert_2_serial_number\""
206206

207207
echo "$vendor_account Vendor revokes non-root NOC certificate by setting \"revoke-child\" flag to true, it should revoke child certificates too"
208-
result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-cert --subject="$noc_cert_2_subject" --subject-key-id="$noc_cert_2_subject_key_id" --revoke-child=true --from=$vendor_account --yes)
208+
result=$(echo "$passphrase" | dcld tx pki revoke-noc-x509-ica-cert --subject="$noc_cert_2_subject" --subject-key-id="$noc_cert_2_subject_key_id" --revoke-child=true --from=$vendor_account --yes)
209209
check_response "$result" "\"code\": 0"
210210

211211
echo "Request all revoked certificates should two intermediate and one leaf certificates"
@@ -239,7 +239,7 @@ response_does_not_contain "$result" "\"serialNumber\": \"$noc_cert_2_copy_serial
239239
echo $result | jq
240240

241241
echo "Request NOC certificate by VID = $vid should not contain intermediate and leaf certificates"
242-
result=$(dcld query pki noc-x509-certs --vid="$vid")
242+
result=$(dcld query pki noc-x509-ica-certs --vid="$vid")
243243
echo $result | jq
244244
response_does_not_contain "$result" "\"subject\": \"$noc_cert_2_subject\""
245245
response_does_not_contain "$result" "\"subject\": \"$noc_leaf_cert_2_subject\""

0 commit comments

Comments
 (0)