-
Notifications
You must be signed in to change notification settings - Fork 2.1k
/
Copy pathTest_TC_SC_5_2.yaml
261 lines (242 loc) · 9.06 KB
/
Test_TC_SC_5_2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# Copyright (c) 2021 Project CHIP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: 26.1.2. [TC-SC-5.2] Receiving a group message - TH to DUT
PICS:
- MCORE.ROLE.COMMISSIONEE
config:
nodeId: 0x12344321
cluster: "Groups"
endpoint: 0
# Users should set endpoint value on the command line to PIXIT.G.ENDPOINT
Groups.Endpoint: 1
tests:
- label: "Step 0: Wait for the commissioned device to be retrieved"
cluster: "DelayCommands"
command: "WaitForCommissionee"
arguments:
values:
- name: "nodeId"
value: nodeId
- label: "Read the commissioner node ID"
cluster: "CommissionerCommands"
command: "GetCommissionerNodeId"
response:
values:
- name: "nodeId"
saveAs: commissionerNodeId
- label:
"Step 1: TH writes the ACL attribute in the Access Control cluster to
add Manage privileges for group 0x0103 and maintain the current
administrative privileges for the TH. The following access control
list shall be used: List item 1 (TH admin): 1)Privilege: Administer
(5) 2)AuthMode: CASE (2) 3)Subjects: TH node id ([N1]) 4)Targets: all
(null) List item 2 (group operate access): 1)Privilege: Manage (4)
2)AuthMode: Group (3) 3)Subjects: group 0x0103 ([0x0103]) 4)Targets:
all (null)"
cluster: "Access Control"
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
FabricIndex: 1,
Privilege: 5,
AuthMode: 2,
Subjects: [commissionerNodeId],
Targets: null,
},
{
FabricIndex: 1,
Privilege: 4,
AuthMode: 3,
Subjects: [0x0103],
Targets: null,
},
]
- label:
"Step 2: TH sends KeySetWrite command in the GroupKeyManagement
cluster to DUT using a key that is pre-installed on the TH.
GroupKeySet fields are as follows: 1)GroupKeySetID: 0x01a3
2)GroupKeySecurityPolicy: TrustFirst (0) 3)EpochKey0:
d0d1d2d3d4d5d6d7d8d9dadbdcdddedf 4)EpochStartTime0:1 5)EpochKey1:
d1d1d2d3d4d5d6d7d8d9dadbdcdddedf 6)EpochStartTime1:
18446744073709551613 7)EpochKey2: d2d1d2d3d4d5d6d7d8d9dadbdcdddedf
8)EpochStartTime2: 18446744073709551614"
PICS: GRPKEY.S.C00.Rsp
cluster: "Group Key Management"
command: "KeySetWrite"
arguments:
values:
- name: GroupKeySet
value:
{
GroupKeySetID: 0x01a3,
GroupKeySecurityPolicy: 0,
EpochKey0: "hex:d0d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime0: 1,
EpochKey1: "hex:d1d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime1: 18446744073709551613,
EpochKey2: "hex:d2d1d2d3d4d5d6d7d8d9dadbdcdddedf",
EpochStartTime2: 18446744073709551614,
}
- label:
"Step 3: TH binds GroupId 0x0103 and 0x0101 with GroupKeySetID 0x01a3
in the GroupKeyMap attribute list on GroupKeyManagement cluster by
writing the GroupKeyMap attribute with 2 entries as follows: List item
1: 1)GroupId: 0x0103 2)GroupKeySetId: 0x01a3 List item 2: 1)GroupId:
0x0101 2)GroupKeySetId: 0x01a3"
PICS: GRPKEY.S.A0000
cluster: "Group Key Management"
command: "writeAttribute"
attribute: "GroupKeyMap"
arguments:
value:
[
{ FabricIndex: 1, GroupId: 0x0103, GroupKeySetID: 0x01a3 },
{ FabricIndex: 1, GroupId: 0x0101, GroupKeySetID: 0x01a3 },
]
- label:
"Step 4: TH cleans up the groups by sending the RemoveAllGroups
command to the DUT on PIXIT.G.ENDPOINT"
PICS: G.S.C04.Rsp
endpoint: Groups.Endpoint
command: "RemoveAllGroups"
- label:
"Step 5: TH sends AddGroup Command to DUT on PIXIT.G.ENDPOINT with the
the following settings 1)GroupID: 0x0103 2)GroupName: 'Test Group
0103'"
PICS: G.S.C00.Rsp
endpoint: Groups.Endpoint
command: "AddGroup"
arguments:
values:
- name: GroupID
value: 0x0103
- name: GroupName
value: "Test Group 0103"
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0103
- label:
"Step 6: TH sends a AddGroup Command to the Groups cluster with the
GroupID field set to 0x0101 and the GroupName set to an 'Test Group
0101'. The command is sent as a group command using GroupID 0x0103"
PICS: G.S.C00.Rsp
groupId: 0x0103
command: "AddGroup"
arguments:
values:
- name: GroupID
value: 0x0101
- name: GroupName
value: "Test Group 0101"
# Give the group AddGroup time to actually happen; unicast delivery can outrace
# multicast if the unicast packet is sent immediately after the multicast one.
- label: "Wait for AddGroup"
cluster: "DelayCommands"
command: "WaitForMs"
arguments:
values:
- name: "ms"
value: 1000
- label: "Verify there is no response from DUT"
cluster: "LogCommands"
command: "UserPrompt"
PICS: "!PICS_SDK_CI_ONLY"
arguments:
values:
- name: "message"
value: "Verify that there is no response from DUT"
- name: "expectedValue"
value: "y"
- label:
"Step 7: TH sends a ViewGroup Command to the Groups cluster on
Endpoint PIXIT.G.ENDPOINT over CASE with the GroupID set to 0x0101 to
confirm that the AddGroup command from step 6 was successful"
PICS: G.S.F00 && G.S.C01.Rsp
endpoint: Groups.Endpoint
command: "ViewGroup"
arguments:
values:
- name: GroupID
value: 0x0101
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0101
- name: GroupName
value: "Test Group 0101"
- label:
"Step 8: TH sends a ViewGroup Command to the Groups cluster on
Endpoint PIXIT.G.ENDPOINT over CASE with the GroupID set to 0x0101 to
confirm that the AddGroup command from step 6 was successful "
PICS: " !G.S.F00 && G.S.C01.Rsp "
endpoint: Groups.Endpoint
command: "ViewGroup"
arguments:
values:
- name: GroupID
value: 0x0101
response:
values:
- name: Status
value: 0
- name: GroupID
value: 0x0101
- name: GroupName
value: ""
- label:
"Step 9: TH removes the Group key set that was added by sending a
KeySetRemove command to the GroupKeyManagement cluster with the
GroupKeySetID field set to 0x01a3"
PICS: GRPKEY.S.C03.Rsp
cluster: "Group Key Management"
command: "KeySetRemove"
arguments:
values:
- name: GroupKeySetID
value: 0x01a3
- label:
"Step 10: TH cleans up the groups by sending the RemoveAllGroups
command to the DUT on PIXIT.G.ENDPOINT"
PICS: G.S.C04.Rsp
endpoint: Groups.Endpoint
command: "RemoveAllGroups"
- label:
"Step 11: TH writes the ACL attribute in the Access Control cluster to
remove Manage privileges for group 0x0103 and maintain the current
administrative privileges for the TH. The following access control
list shall be used: List item 1 (TH admin): 1)Privilege: Administer
(5) 2)AuthMode: CASE (2) 3)Subjects: TH node id ([N1]) 4)Targets: all
(null)"
cluster: "Access Control"
command: "writeAttribute"
attribute: "ACL"
arguments:
value:
[
{
FabricIndex: 1,
Privilege: 5,
AuthMode: 2,
Subjects: [commissionerNodeId],
Targets: null,
},
]