Fabric-scoped and fabric-sensitive updates for IDL (#22955)
* Start defining fabric-sensitive types
* Update types: structures are fabric scoped, attributes are fabric sensitive (if applicable)
* Tag fabric-scoped structures in matter idl
* Allow fields to be marked fabric sensitive
* Start supporting fabric scoped and sensitive logic
* zap regen
* Add parser and tests for fabric-sensitive events
* Restyle
* Add tag for fabric sensitive events in idl generator
* zap regen
* Fix typo in readme
* Fix typo
* Add support for fabric scoped and fabric sensitive
* Add unit test for fabric sensitive and scoped stuff
* Rename attributes to qualites, tests pass in idl. More code review comments
* Fix java codegen tests
* Remove unused import
* Remove more unused imports
* Regen bridge-app.matter
* Regen lighting-on-off
* Rename fabric_command to fabric_scoped_command
diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
index 61ef9bf..825ae1b 100644
--- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
+++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter
@@ -151,11 +151,11 @@
kAdminister = 5;
}
- struct AccessControlEntry {
- Privilege privilege = 1;
- AuthMode authMode = 2;
- nullable int64u subjects[] = 3;
- nullable Target targets[] = 4;
+ fabric_scoped struct AccessControlEntry {
+ fabric_sensitive Privilege privilege = 1;
+ fabric_sensitive AuthMode authMode = 2;
+ nullable fabric_sensitive int64u subjects[] = 3;
+ nullable fabric_sensitive Target targets[] = 4;
fabric_idx fabricIndex = 254;
}
@@ -165,12 +165,12 @@
nullable devtype_id deviceType = 2;
}
- struct ExtensionEntry {
- octet_string<128> data = 1;
+ fabric_scoped struct ExtensionEntry {
+ fabric_sensitive octet_string<128> data = 1;
fabric_idx fabricIndex = 254;
}
- info event access(read: administer) AccessControlEntryChanged = 0 {
+ fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
@@ -178,7 +178,7 @@
fabric_idx fabricIndex = 254;
}
- info event access(read: administer) AccessControlExtensionChanged = 1 {
+ fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
@@ -333,7 +333,7 @@
kDelayedOnUserConsent = 8;
}
- struct ProviderLocation {
+ fabric_scoped struct ProviderLocation {
node_id providerNodeID = 1;
endpoint_no endpoint = 2;
fabric_idx fabricIndex = 254;
@@ -1111,13 +1111,13 @@
kInvalidFabricIndex = 11;
}
- struct NOCStruct {
- octet_string noc = 1;
- nullable octet_string icac = 2;
+ fabric_scoped struct NOCStruct {
+ fabric_sensitive octet_string noc = 1;
+ nullable fabric_sensitive octet_string icac = 2;
fabric_idx fabricIndex = 254;
}
- struct FabricDescriptor {
+ fabric_scoped struct FabricDescriptor {
octet_string<65> rootPublicKey = 1;
vendor_id vendorId = 2;
fabric_id fabricId = 3;
@@ -1209,13 +1209,13 @@
kCacheAndSync = 1;
}
- struct GroupKeyMapStruct {
+ fabric_scoped struct GroupKeyMapStruct {
group_id groupId = 1;
int16u groupKeySetID = 2;
fabric_idx fabricIndex = 254;
}
- struct GroupInfoMapStruct {
+ fabric_scoped struct GroupInfoMapStruct {
group_id groupId = 1;
endpoint_no endpoints[] = 2;
optional char_string<16> groupName = 3;