Skip to content

Commit

Permalink
Add ACL cluster to simulated app. (#25265)
Browse files Browse the repository at this point in the history
  • Loading branch information
krypton36 authored and pull[bot] committed May 8, 2023
1 parent b572b05 commit 3771d59
Show file tree
Hide file tree
Showing 4 changed files with 660 additions and 14 deletions.
78 changes: 78 additions & 0 deletions examples/placeholder/linux/apps/app1/config.matter
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,69 @@ server cluster Descriptor = 29 {
readonly attribute int16u clusterRevision = 65533;
}

server cluster AccessControl = 31 {
enum AccessControlEntryAuthModeEnum : ENUM8 {
kPase = 1;
kCase = 2;
kGroup = 3;
}

enum AccessControlEntryPrivilegeEnum : ENUM8 {
kView = 1;
kProxyView = 2;
kOperate = 3;
kManage = 4;
kAdminister = 5;
}

enum ChangeTypeEnum : ENUM8 {
kChanged = 0;
kAdded = 1;
kRemoved = 2;
}

fabric_scoped struct AccessControlEntryStruct {
fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1;
fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2;
nullable fabric_sensitive int64u subjects[] = 3;
nullable fabric_sensitive Target targets[] = 4;
fabric_idx fabricIndex = 254;
}

struct Target {
nullable cluster_id cluster = 0;
nullable endpoint_no endpoint = 1;
nullable devtype_id deviceType = 2;
}

fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlEntryStruct latestValue = 4;
fabric_idx fabricIndex = 254;
}

fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 {
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlExtensionStruct latestValue = 4;
fabric_idx fabricIndex = 254;
}

attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0;
readonly attribute int16u subjectsPerAccessControlEntry = 2;
readonly attribute int16u targetsPerAccessControlEntry = 3;
readonly attribute int16u accessControlEntriesPerFabric = 4;
readonly attribute command_id generatedCommandList[] = 65528;
readonly attribute command_id acceptedCommandList[] = 65529;
readonly attribute event_id eventList[] = 65530;
readonly attribute attrib_id attributeList[] = 65531;
readonly attribute bitmap32 featureMap = 65532;
readonly attribute int16u clusterRevision = 65533;
}

server cluster Actions = 37 {
enum ActionErrorEnum : ENUM8 {
kUnknown = 0;
Expand Down Expand Up @@ -2999,6 +3062,21 @@ endpoint 0 {
callback attribute clusterRevision default = 1;
}

server cluster AccessControl {
emits event AccessControlEntryChanged;
emits event AccessControlExtensionChanged;
callback attribute acl;
callback attribute subjectsPerAccessControlEntry;
callback attribute targetsPerAccessControlEntry;
callback attribute accessControlEntriesPerFabric;
callback attribute generatedCommandList;
callback attribute acceptedCommandList;
callback attribute eventList;
callback attribute attributeList;
ram attribute featureMap;
ram attribute clusterRevision default = 1;
}

server cluster Actions {
callback attribute actionList;
callback attribute endpointLists;
Expand Down
259 changes: 252 additions & 7 deletions examples/placeholder/linux/apps/app1/config.zap
Original file line number Diff line number Diff line change
Expand Up @@ -16,19 +16,19 @@
}
],
"package": [
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/zcl/zcl.json",
"type": "zcl-properties",
"category": "matter",
"version": 1,
"description": "Matter SDK ZCL data"
},
{
"pathRelativity": "relativeToZap",
"path": "../../../../../src/app/zap-templates/app-templates.json",
"type": "gen-templates-json",
"version": "chip-v1"
}
],
"endpointTypes": [
Expand Down Expand Up @@ -368,6 +368,250 @@
}
]
},
{
"name": "Access Control",
"code": 31,
"mfgCode": null,
"define": "ACCESS_CONTROL_CLUSTER",
"side": "client",
"enabled": 0,
"attributes": [
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "client",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "client",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Access Control",
"code": 31,
"mfgCode": null,
"define": "ACCESS_CONTROL_CLUSTER",
"side": "server",
"enabled": 1,
"attributes": [
{
"name": "ACL",
"code": 0,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "Extension",
"code": 1,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 0,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "SubjectsPerAccessControlEntry",
"code": 2,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "TargetsPerAccessControlEntry",
"code": 3,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AccessControlEntriesPerFabric",
"code": 4,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "GeneratedCommandList",
"code": 65528,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AcceptedCommandList",
"code": 65529,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "EventList",
"code": 65530,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "AttributeList",
"code": 65531,
"mfgCode": null,
"side": "server",
"type": "array",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "FeatureMap",
"code": 65532,
"mfgCode": null,
"side": "server",
"type": "bitmap32",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "0",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"type": "int16u",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
],
"events": [
{
"name": "AccessControlEntryChanged",
"code": 0,
"mfgCode": null,
"side": "server",
"included": 1
},
{
"name": "AccessControlExtensionChanged",
"code": 1,
"mfgCode": null,
"side": "server",
"included": 1
}
]
},
{
"name": "Actions",
"code": 37,
Expand Down Expand Up @@ -9089,5 +9333,6 @@
"endpointVersion": 1,
"deviceIdentifier": 258
}
]
],
"log": []
}
Loading

0 comments on commit 3771d59

Please sign in to comment.