Skip to content

Commit 1520220

Browse files
tleacmcsabzbarsky-apple
authored andcommitted
Add ARL feature to access control cluster and regen (#34535)
* Add ARL feature to access control cluster and regen Edits to src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml then zap_regen_all.py * Fixed kotlin generation * Fixed response for ReviewFabricRestrictions command * review updates * Fix Python ZAP codegen mis-merge. * Updated acces-control-cluster.xml with alchemy minor hand edits required to zap_regen_all.py successfully. --------- Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
1 parent e8f96cd commit 1520220

File tree

141 files changed

+9388
-136
lines changed

Some content is hidden

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

141 files changed

+9388
-136
lines changed

examples/air-purifier-app/air-purifier-common/air-purifier-app.matter

+55-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ cluster Descriptor = 29 {
106106
and enforce Access Control for the Node's endpoints and their associated
107107
cluster instances. */
108108
cluster AccessControl = 31 {
109-
revision 1; // NOTE: Default/not specifically set
109+
revision 2;
110110

111111
enum AccessControlEntryAuthModeEnum : enum8 {
112112
kPASE = 1;
@@ -122,12 +122,42 @@ cluster AccessControl = 31 {
122122
kAdminister = 5;
123123
}
124124

125+
enum AccessRestrictionTypeEnum : enum8 {
126+
kAttributeAccessForbidden = 0;
127+
kAttributeWriteForbidden = 1;
128+
kCommandForbidden = 2;
129+
kEventForbidden = 3;
130+
}
131+
125132
enum ChangeTypeEnum : enum8 {
126133
kChanged = 0;
127134
kAdded = 1;
128135
kRemoved = 2;
129136
}
130137

138+
bitmap Feature : bitmap32 {
139+
kExtension = 0x1;
140+
kManagedDevice = 0x2;
141+
}
142+
143+
struct AccessRestrictionStruct {
144+
AccessRestrictionTypeEnum type = 0;
145+
nullable int32u id = 1;
146+
}
147+
148+
struct CommissioningAccessRestrictionEntryStruct {
149+
endpoint_no endpoint = 0;
150+
cluster_id cluster = 1;
151+
AccessRestrictionStruct restrictions[] = 2;
152+
}
153+
154+
fabric_scoped struct AccessRestrictionEntryStruct {
155+
fabric_sensitive endpoint_no endpoint = 0;
156+
fabric_sensitive cluster_id cluster = 1;
157+
fabric_sensitive AccessRestrictionStruct restrictions[] = 2;
158+
fabric_idx fabricIndex = 254;
159+
}
160+
131161
struct AccessControlTargetStruct {
132162
nullable cluster_id cluster = 0;
133163
nullable endpoint_no endpoint = 1;
@@ -163,17 +193,41 @@ cluster AccessControl = 31 {
163193
fabric_idx fabricIndex = 254;
164194
}
165195

196+
fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 {
197+
fabric_idx fabricIndex = 254;
198+
}
199+
200+
fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 {
201+
int64u token = 0;
202+
nullable long_char_string instruction = 1;
203+
nullable long_char_string redirectURL = 2;
204+
fabric_idx fabricIndex = 254;
205+
}
206+
166207
attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
167208
attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1;
168209
readonly attribute int16u subjectsPerAccessControlEntry = 2;
169210
readonly attribute int16u targetsPerAccessControlEntry = 3;
170211
readonly attribute int16u accessControlEntriesPerFabric = 4;
212+
readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5;
213+
readonly attribute optional AccessRestrictionEntryStruct arl[] = 6;
171214
readonly attribute command_id generatedCommandList[] = 65528;
172215
readonly attribute command_id acceptedCommandList[] = 65529;
173216
readonly attribute event_id eventList[] = 65530;
174217
readonly attribute attrib_id attributeList[] = 65531;
175218
readonly attribute bitmap32 featureMap = 65532;
176219
readonly attribute int16u clusterRevision = 65533;
220+
221+
request struct ReviewFabricRestrictionsRequest {
222+
AccessRestrictionStruct arl[] = 0;
223+
}
224+
225+
response struct ReviewFabricRestrictionsResponse = 1 {
226+
int64u token = 0;
227+
}
228+
229+
/** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */
230+
fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0;
177231
}
178232

179233
/** This cluster provides attributes and events for determining basic information about Nodes, which supports both

examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter

+55-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ cluster Descriptor = 29 {
106106
and enforce Access Control for the Node's endpoints and their associated
107107
cluster instances. */
108108
cluster AccessControl = 31 {
109-
revision 1; // NOTE: Default/not specifically set
109+
revision 2;
110110

111111
enum AccessControlEntryAuthModeEnum : enum8 {
112112
kPASE = 1;
@@ -122,12 +122,42 @@ cluster AccessControl = 31 {
122122
kAdminister = 5;
123123
}
124124

125+
enum AccessRestrictionTypeEnum : enum8 {
126+
kAttributeAccessForbidden = 0;
127+
kAttributeWriteForbidden = 1;
128+
kCommandForbidden = 2;
129+
kEventForbidden = 3;
130+
}
131+
125132
enum ChangeTypeEnum : enum8 {
126133
kChanged = 0;
127134
kAdded = 1;
128135
kRemoved = 2;
129136
}
130137

138+
bitmap Feature : bitmap32 {
139+
kExtension = 0x1;
140+
kManagedDevice = 0x2;
141+
}
142+
143+
struct AccessRestrictionStruct {
144+
AccessRestrictionTypeEnum type = 0;
145+
nullable int32u id = 1;
146+
}
147+
148+
struct CommissioningAccessRestrictionEntryStruct {
149+
endpoint_no endpoint = 0;
150+
cluster_id cluster = 1;
151+
AccessRestrictionStruct restrictions[] = 2;
152+
}
153+
154+
fabric_scoped struct AccessRestrictionEntryStruct {
155+
fabric_sensitive endpoint_no endpoint = 0;
156+
fabric_sensitive cluster_id cluster = 1;
157+
fabric_sensitive AccessRestrictionStruct restrictions[] = 2;
158+
fabric_idx fabricIndex = 254;
159+
}
160+
131161
struct AccessControlTargetStruct {
132162
nullable cluster_id cluster = 0;
133163
nullable endpoint_no endpoint = 1;
@@ -163,17 +193,41 @@ cluster AccessControl = 31 {
163193
fabric_idx fabricIndex = 254;
164194
}
165195

196+
fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 {
197+
fabric_idx fabricIndex = 254;
198+
}
199+
200+
fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 {
201+
int64u token = 0;
202+
nullable long_char_string instruction = 1;
203+
nullable long_char_string redirectURL = 2;
204+
fabric_idx fabricIndex = 254;
205+
}
206+
166207
attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
167208
attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1;
168209
readonly attribute int16u subjectsPerAccessControlEntry = 2;
169210
readonly attribute int16u targetsPerAccessControlEntry = 3;
170211
readonly attribute int16u accessControlEntriesPerFabric = 4;
212+
readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5;
213+
readonly attribute optional AccessRestrictionEntryStruct arl[] = 6;
171214
readonly attribute command_id generatedCommandList[] = 65528;
172215
readonly attribute command_id acceptedCommandList[] = 65529;
173216
readonly attribute event_id eventList[] = 65530;
174217
readonly attribute attrib_id attributeList[] = 65531;
175218
readonly attribute bitmap32 featureMap = 65532;
176219
readonly attribute int16u clusterRevision = 65533;
220+
221+
request struct ReviewFabricRestrictionsRequest {
222+
AccessRestrictionStruct arl[] = 0;
223+
}
224+
225+
response struct ReviewFabricRestrictionsResponse = 1 {
226+
int64u token = 0;
227+
}
228+
229+
/** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */
230+
fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0;
177231
}
178232

179233
/** This cluster provides attributes and events for determining basic information about Nodes, which supports both

examples/all-clusters-app/all-clusters-common/all-clusters-app.matter

+55-1
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,7 @@ cluster Binding = 30 {
508508
and enforce Access Control for the Node's endpoints and their associated
509509
cluster instances. */
510510
cluster AccessControl = 31 {
511-
revision 1; // NOTE: Default/not specifically set
511+
revision 2;
512512

513513
enum AccessControlEntryAuthModeEnum : enum8 {
514514
kPASE = 1;
@@ -524,12 +524,42 @@ cluster AccessControl = 31 {
524524
kAdminister = 5;
525525
}
526526

527+
enum AccessRestrictionTypeEnum : enum8 {
528+
kAttributeAccessForbidden = 0;
529+
kAttributeWriteForbidden = 1;
530+
kCommandForbidden = 2;
531+
kEventForbidden = 3;
532+
}
533+
527534
enum ChangeTypeEnum : enum8 {
528535
kChanged = 0;
529536
kAdded = 1;
530537
kRemoved = 2;
531538
}
532539

540+
bitmap Feature : bitmap32 {
541+
kExtension = 0x1;
542+
kManagedDevice = 0x2;
543+
}
544+
545+
struct AccessRestrictionStruct {
546+
AccessRestrictionTypeEnum type = 0;
547+
nullable int32u id = 1;
548+
}
549+
550+
struct CommissioningAccessRestrictionEntryStruct {
551+
endpoint_no endpoint = 0;
552+
cluster_id cluster = 1;
553+
AccessRestrictionStruct restrictions[] = 2;
554+
}
555+
556+
fabric_scoped struct AccessRestrictionEntryStruct {
557+
fabric_sensitive endpoint_no endpoint = 0;
558+
fabric_sensitive cluster_id cluster = 1;
559+
fabric_sensitive AccessRestrictionStruct restrictions[] = 2;
560+
fabric_idx fabricIndex = 254;
561+
}
562+
533563
struct AccessControlTargetStruct {
534564
nullable cluster_id cluster = 0;
535565
nullable endpoint_no endpoint = 1;
@@ -565,17 +595,41 @@ cluster AccessControl = 31 {
565595
fabric_idx fabricIndex = 254;
566596
}
567597

598+
fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 {
599+
fabric_idx fabricIndex = 254;
600+
}
601+
602+
fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 {
603+
int64u token = 0;
604+
nullable long_char_string instruction = 1;
605+
nullable long_char_string redirectURL = 2;
606+
fabric_idx fabricIndex = 254;
607+
}
608+
568609
attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
569610
attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1;
570611
readonly attribute int16u subjectsPerAccessControlEntry = 2;
571612
readonly attribute int16u targetsPerAccessControlEntry = 3;
572613
readonly attribute int16u accessControlEntriesPerFabric = 4;
614+
readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5;
615+
readonly attribute optional AccessRestrictionEntryStruct arl[] = 6;
573616
readonly attribute command_id generatedCommandList[] = 65528;
574617
readonly attribute command_id acceptedCommandList[] = 65529;
575618
readonly attribute event_id eventList[] = 65530;
576619
readonly attribute attrib_id attributeList[] = 65531;
577620
readonly attribute bitmap32 featureMap = 65532;
578621
readonly attribute int16u clusterRevision = 65533;
622+
623+
request struct ReviewFabricRestrictionsRequest {
624+
AccessRestrictionStruct arl[] = 0;
625+
}
626+
627+
response struct ReviewFabricRestrictionsResponse = 1 {
628+
int64u token = 0;
629+
}
630+
631+
/** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */
632+
fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0;
579633
}
580634

581635
/** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */

examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter

+55-1
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ cluster Binding = 30 {
401401
and enforce Access Control for the Node's endpoints and their associated
402402
cluster instances. */
403403
cluster AccessControl = 31 {
404-
revision 1; // NOTE: Default/not specifically set
404+
revision 2;
405405

406406
enum AccessControlEntryAuthModeEnum : enum8 {
407407
kPASE = 1;
@@ -417,12 +417,42 @@ cluster AccessControl = 31 {
417417
kAdminister = 5;
418418
}
419419

420+
enum AccessRestrictionTypeEnum : enum8 {
421+
kAttributeAccessForbidden = 0;
422+
kAttributeWriteForbidden = 1;
423+
kCommandForbidden = 2;
424+
kEventForbidden = 3;
425+
}
426+
420427
enum ChangeTypeEnum : enum8 {
421428
kChanged = 0;
422429
kAdded = 1;
423430
kRemoved = 2;
424431
}
425432

433+
bitmap Feature : bitmap32 {
434+
kExtension = 0x1;
435+
kManagedDevice = 0x2;
436+
}
437+
438+
struct AccessRestrictionStruct {
439+
AccessRestrictionTypeEnum type = 0;
440+
nullable int32u id = 1;
441+
}
442+
443+
struct CommissioningAccessRestrictionEntryStruct {
444+
endpoint_no endpoint = 0;
445+
cluster_id cluster = 1;
446+
AccessRestrictionStruct restrictions[] = 2;
447+
}
448+
449+
fabric_scoped struct AccessRestrictionEntryStruct {
450+
fabric_sensitive endpoint_no endpoint = 0;
451+
fabric_sensitive cluster_id cluster = 1;
452+
fabric_sensitive AccessRestrictionStruct restrictions[] = 2;
453+
fabric_idx fabricIndex = 254;
454+
}
455+
426456
struct AccessControlTargetStruct {
427457
nullable cluster_id cluster = 0;
428458
nullable endpoint_no endpoint = 1;
@@ -458,17 +488,41 @@ cluster AccessControl = 31 {
458488
fabric_idx fabricIndex = 254;
459489
}
460490

491+
fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 {
492+
fabric_idx fabricIndex = 254;
493+
}
494+
495+
fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 {
496+
int64u token = 0;
497+
nullable long_char_string instruction = 1;
498+
nullable long_char_string redirectURL = 2;
499+
fabric_idx fabricIndex = 254;
500+
}
501+
461502
attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
462503
attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1;
463504
readonly attribute int16u subjectsPerAccessControlEntry = 2;
464505
readonly attribute int16u targetsPerAccessControlEntry = 3;
465506
readonly attribute int16u accessControlEntriesPerFabric = 4;
507+
readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5;
508+
readonly attribute optional AccessRestrictionEntryStruct arl[] = 6;
466509
readonly attribute command_id generatedCommandList[] = 65528;
467510
readonly attribute command_id acceptedCommandList[] = 65529;
468511
readonly attribute event_id eventList[] = 65530;
469512
readonly attribute attrib_id attributeList[] = 65531;
470513
readonly attribute bitmap32 featureMap = 65532;
471514
readonly attribute int16u clusterRevision = 65533;
515+
516+
request struct ReviewFabricRestrictionsRequest {
517+
AccessRestrictionStruct arl[] = 0;
518+
}
519+
520+
response struct ReviewFabricRestrictionsResponse = 1 {
521+
int64u token = 0;
522+
}
523+
524+
/** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */
525+
fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0;
472526
}
473527

474528
/** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */

0 commit comments

Comments
 (0)