Skip to content

Commit 36a1bbd

Browse files
authored
TLS Client Management cluster (project-chip#37115)
* Generated using: ./alchemy zap --attribute="in-progress" ... /TLSClientManagement.adoc * Apply review comments & re-run alchemy * Generated using ./scripts/tools/zap_regen_all.py * Workaround for project-chip/zap#1255
1 parent 9fe8c73 commit 36a1bbd

File tree

57 files changed

+6648
-0
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

+6648
-0
lines changed

.github/workflows/tests.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ jobs:
200200
src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml \
201201
src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml \
202202
src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml \
203+
src/app/zap-templates/zcl/data-model/chip/tls-client-management-cluster.xml \
203204
src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml \
204205
src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml \
205206
src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml \

docs/ids_and_codes/zap_clusters.md

+1
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ Generally regenerate using one of:
140140
| 1872 | 0x750 | EcosystemInformation |
141141
| 1873 | 0x751 | CommissionerControl |
142142
| 2049 | 0x801 | TlsCertificateManagement |
143+
| 2050 | 0x802 | TlsClientManagement |
143144
| 4294048773 | 0xFFF1FC05 | UnitTesting |
144145
| 4294048774 | 0xFFF1FC06 | FaultInjection |
145146
| 4294048800 | 0xFFF1FC20 | SampleMei |

scripts/rules.matterlint

+1
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ load "../src/app/zap-templates/zcl/data-model/chip/time-format-localization-clus
107107
load "../src/app/zap-templates/zcl/data-model/chip/time-synchronization-cluster.xml";
108108
load "../src/app/zap-templates/zcl/data-model/chip/timer-cluster.xml";
109109
load "../src/app/zap-templates/zcl/data-model/chip/tls-certificate-management-cluster.xml";
110+
load "../src/app/zap-templates/zcl/data-model/chip/tls-client-management-cluster.xml";
110111
load "../src/app/zap-templates/zcl/data-model/chip/unit-localization-cluster.xml";
111112
load "../src/app/zap-templates/zcl/data-model/chip/user-label-cluster.xml";
112113
load "../src/app/zap-templates/zcl/data-model/chip/wake-on-lan-cluster.xml";

scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
150150
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
151151
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
152+
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
152153
#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (1)
153154
#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (1)
154155
#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -281,6 +282,7 @@
281282
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
282283
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
283284
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285+
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
284286
#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285287
#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
286288
#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0)

scripts/tools/zap/tests/outputs/lighting-app/app-templates/gen_config.h

+2
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,7 @@
149149
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
150150
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_SERVER_ENDPOINT_COUNT (0)
151151
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
152+
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_SERVER_ENDPOINT_COUNT (0)
152153
#define MATTER_DM_UNIT_TESTING_CLUSTER_SERVER_ENDPOINT_COUNT (0)
153154
#define MATTER_DM_FAULT_INJECTION_CLUSTER_SERVER_ENDPOINT_COUNT (0)
154155
#define MATTER_DM_SAMPLE_MEI_CLUSTER_SERVER_ENDPOINT_COUNT (0)
@@ -281,6 +282,7 @@
281282
#define MATTER_DM_ECOSYSTEM_INFORMATION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
282283
#define MATTER_DM_COMMISSIONER_CONTROL_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
283284
#define MATTER_DM_TLS_CERTIFICATE_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285+
#define MATTER_DM_TLS_CLIENT_MANAGEMENT_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
284286
#define MATTER_DM_UNIT_TESTING_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
285287
#define MATTER_DM_FAULT_INJECTION_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
286288
#define MATTER_DM_SAMPLE_MEI_CLUSTER_CLIENT_ENDPOINT_COUNT (0)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0"?>
2+
<!--
3+
Copyright (c) 2025 Project CHIP Authors
4+
5+
Licensed under the Apache License, Version 2.0 (the "License");
6+
you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS,
13+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
See the License for the specific language governing permissions and
15+
limitations under the License.
16+
-->
17+
<!--
18+
XML generated by Alchemy; DO NOT EDIT.
19+
Source: src/tls/TLSClientManagement.adoc
20+
Parameters: in-progress
21+
Git: 0.7-summer-2025-308-g2f23be841
22+
-->
23+
<configurator xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../zcl.xsd">
24+
<domain name="General"/>
25+
<enum name="TLSEndpointStatusEnum" type="enum8">
26+
<cluster code="0x0802"/>
27+
<item name="Provisioned" value="0x00"/>
28+
<item name="InUse" value="0x01"/>
29+
</enum>
30+
31+
<struct name="TLSEndpointStruct" apiMaturity="provisional">
32+
<cluster code="0x0802"/>
33+
<item fieldId="0" name="EndpointID" type="int16u"/>
34+
<item fieldId="1" name="Hostname" type="octet_string" length="253"/>
35+
<item fieldId="2" name="Port" type="int16u"/>
36+
<item fieldId="3" name="CAID" type="int16u"/>
37+
<item fieldId="4" name="CCDID" type="int16u" isNullable="true"/>
38+
<item fieldId="5" name="Status" type="TLSEndpointStatusEnum" min="0x00" max="0x01"/>
39+
</struct>
40+
41+
<cluster apiMaturity="provisional">
42+
<domain name="General">General</domain>
43+
<name>TLS Client Management</name>
44+
<code>0x0802</code>
45+
<define>TLS_CLIENT_MANAGEMENT_CLUSTER</define>
46+
<description>This Cluster is used to provision TLS Endpoints with enough information to facilitate subsequent connection.</description>
47+
<client init="false" tick="false">true</client>
48+
<server init="false" tick="false">true</server>
49+
<globalAttribute code="0xFFFD" side="either" value="1"/>
50+
<attribute code="0x0000" side="server" define="MAX_PROVISIONED" type="int8u" min="5" max="254" default="5">MaxProvisioned</attribute>
51+
<attribute code="0x0001" side="server" define="PROVISIONED_ENDPOINTS" type="array" entryType="TLSEndpointStruct">ProvisionedEndpoints</attribute>
52+
<command code="0x00" source="client" name="ProvisionEndpoint" optional="false" response="ProvisionEndpointResponse" isFabricScoped="true">
53+
<description>This command SHALL provision a TLS Endpoint for the provided HostName / Port combination.</description>
54+
<access op="invoke" privilege="administer"/>
55+
<quality largeMessage="true"/>
56+
<arg id="0" name="Hostname" type="octet_string"/>
57+
<arg id="1" name="Port" type="int16u"/>
58+
<arg id="2" name="CAID" type="int16u"/>
59+
<arg id="3" name="CCDID" type="int16u" isNullable="true"/>
60+
<arg id="4" name="EndpointID" type="int16u" isNullable="true"/>
61+
</command>
62+
63+
<command code="0x01" source="server" name="ProvisionEndpointResponse" optional="false" disableDefaultResponse="true">
64+
<description>This command SHALL be generated in response to a ProvisionEndpointRequest command.</description>
65+
<quality largeMessage="true"/>
66+
<arg id="0" name="EndpointID" type="int16u"/>
67+
</command>
68+
69+
<command code="0x02" source="client" name="FindEndpoint" optional="false" response="FindEndpointResponse" isFabricScoped="true">
70+
<description>This command SHALL return the TLS Endpoint details for the passed in EndpointID, or all provisioned endpoints if null </description>
71+
<quality largeMessage="true"/>
72+
<arg id="0" name="EndpointID" type="int16u" isNullable="true"/>
73+
</command>
74+
75+
<command code="0x03" source="server" name="FindEndpointResponse" optional="false" disableDefaultResponse="true">
76+
<description>This command SHALL be generated in response to a FindEndpointRequest command.</description>
77+
<quality largeMessage="true"/>
78+
<arg id="0" name="Endpoints" array="true" type="TLSEndpointStruct"/>
79+
</command>
80+
81+
<command code="0x04" source="client" name="RemoveEndpoint" optional="false" isFabricScoped="true">
82+
<description>This command SHALL be generated to request the Node remove any TLS Endpoint.</description>
83+
<access op="invoke" privilege="administer"/>
84+
<quality largeMessage="true"/>
85+
<arg id="0" name="EndpointID" type="int16u"/>
86+
</command>
87+
88+
</cluster>
89+
</configurator>

src/app/zap-templates/zcl/zcl-with-test-extensions.json

+1
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@
129129
"time-synchronization-cluster.xml",
130130
"timer-cluster.xml",
131131
"tls-certificate-management-cluster.xml",
132+
"tls-client-management-cluster.xml",
132133
"user-label-cluster.xml",
133134
"unit-localization-cluster.xml",
134135
"valve-configuration-and-control-cluster.xml",

src/app/zap-templates/zcl/zcl.json

+1
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@
123123
"time-synchronization-cluster.xml",
124124
"timer-cluster.xml",
125125
"tls-certificate-management-cluster.xml",
126+
"tls-client-management-cluster.xml",
126127
"user-label-cluster.xml",
127128
"unit-localization-cluster.xml",
128129
"valve-configuration-and-control-cluster.xml",

src/app/zap_cluster_list.json

+2
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@
125125
"TIME_SYNCHRONIZATION_CLUSTER": [],
126126
"TIMER_CLUSTER": [],
127127
"TLS_CERTIFICATE_MANAGEMENT_CLUSTER": [],
128+
"TLS_CLIENT_MANAGEMENT_CLUSTER": [],
128129
"TRUSTED_ROOT_CERTIFICATES_CLUSTER": [],
129130
"UNIT_LOCALIZATION_CLUSTER": [],
130131
"UNIT_TESTING_CLUSTER": [],
@@ -311,6 +312,7 @@
311312
"TIME_SYNCHRONIZATION_CLUSTER": ["time-synchronization-server"],
312313
"TIMER_CLUSTER": ["timer-server"],
313314
"TLS_CERTIFICATE_MANAGEMENT_CLUSTER": [],
315+
"TLS_CLIENT_MANAGEMENT_CLUSTER": [],
314316
"TVOC_CONCENTRATION_MEASUREMENT_CLUSTER": [
315317
"concentration-measurement-server"
316318
],

src/controller/data_model/controller-clusters.matter

+59
Original file line numberDiff line numberDiff line change
@@ -10696,6 +10696,65 @@ provisional cluster TlsCertificateManagement = 2049 {
1069610696
command access(invoke: administer) RemoveClientCertificate(RemoveClientCertificateRequest): DefaultSuccess = 15;
1069710697
}
1069810698

10699+
/** This Cluster is used to provision TLS Endpoints with enough information to facilitate subsequent connection. */
10700+
provisional cluster TlsClientManagement = 2050 {
10701+
revision 1;
10702+
10703+
enum TLSEndpointStatusEnum : enum8 {
10704+
kProvisioned = 0;
10705+
kInUse = 1;
10706+
}
10707+
10708+
struct TLSEndpointStruct {
10709+
int16u endpointID = 0;
10710+
octet_string<253> hostname = 1;
10711+
int16u port = 2;
10712+
int16u caid = 3;
10713+
nullable int16u ccdid = 4;
10714+
TLSEndpointStatusEnum status = 5;
10715+
}
10716+
10717+
readonly attribute int8u maxProvisioned = 0;
10718+
readonly attribute TLSEndpointStruct provisionedEndpoints[] = 1;
10719+
readonly attribute command_id generatedCommandList[] = 65528;
10720+
readonly attribute command_id acceptedCommandList[] = 65529;
10721+
readonly attribute event_id eventList[] = 65530;
10722+
readonly attribute attrib_id attributeList[] = 65531;
10723+
readonly attribute bitmap32 featureMap = 65532;
10724+
readonly attribute int16u clusterRevision = 65533;
10725+
10726+
request struct ProvisionEndpointRequest {
10727+
octet_string hostname = 0;
10728+
int16u port = 1;
10729+
int16u caid = 2;
10730+
nullable int16u ccdid = 3;
10731+
nullable int16u endpointID = 4;
10732+
}
10733+
10734+
response struct ProvisionEndpointResponse = 1 {
10735+
int16u endpointID = 0;
10736+
}
10737+
10738+
request struct FindEndpointRequest {
10739+
nullable int16u endpointID = 0;
10740+
}
10741+
10742+
response struct FindEndpointResponse = 3 {
10743+
TLSEndpointStruct endpoints[] = 0;
10744+
}
10745+
10746+
request struct RemoveEndpointRequest {
10747+
int16u endpointID = 0;
10748+
}
10749+
10750+
/** This command SHALL provision a TLS Endpoint for the provided HostName / Port combination. */
10751+
fabric command access(invoke: administer) ProvisionEndpoint(ProvisionEndpointRequest): ProvisionEndpointResponse = 0;
10752+
/** This command SHALL return the TLS Endpoint details for the passed in EndpointID, or all provisioned endpoints if null */
10753+
fabric command FindEndpoint(FindEndpointRequest): FindEndpointResponse = 2;
10754+
/** This command SHALL be generated to request the Node remove any TLS Endpoint. */
10755+
fabric command access(invoke: administer) RemoveEndpoint(RemoveEndpointRequest): DefaultSuccess = 4;
10756+
}
10757+
1069910758
/** The Test Cluster is meant to validate the generated code */
1070010759
internal cluster UnitTesting = 4294048773 {
1070110760
revision 1; // NOTE: Default/not specifically set

0 commit comments

Comments
 (0)