Skip to content

Commit

Permalink
Add Access-Control cluster to all example apps using ZAP (#14657)
Browse files Browse the repository at this point in the history
  • Loading branch information
harsha-rajendran authored and pull[bot] committed Jan 19, 2024
1 parent d2efc3d commit 6beab66
Show file tree
Hide file tree
Showing 98 changed files with 3,332 additions and 448 deletions.
126 changes: 126 additions & 0 deletions examples/bridge-app/bridge-common/bridge-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,130 @@ struct LabelStruct {
CHAR_STRING<16> value = 1;
}

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

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

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

struct AccessControlEntry {
fabric_idx fabricIndex = 0;
Privilege privilege = 1;
AuthMode authMode = 2;
nullable INT64U subjects[] = 3;
nullable Target targets[] = 4;
}

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

struct ExtensionEntry {
fabric_idx fabricIndex = 0;
OCTET_STRING<254> data = 1;
}

info event AccessControlEntryChanged = 0 {
fabric_idx adminFabricIndex = 0;
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlEntry latestValue = 4;
}

info event AccessControlExtensionChanged = 1 {
fabric_idx adminFabricIndex = 0;
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable ExtensionEntry latestValue = 4;
}

attribute AccessControlEntry acl[] = 0;
attribute ExtensionEntry extension[] = 1;
readonly global attribute attrib_id attributeList[] = 65531;
readonly global attribute int16u clusterRevision = 65533;
}

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

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

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

struct AccessControlEntry {
fabric_idx fabricIndex = 0;
Privilege privilege = 1;
AuthMode authMode = 2;
nullable INT64U subjects[] = 3;
nullable Target targets[] = 4;
}

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

struct ExtensionEntry {
fabric_idx fabricIndex = 0;
OCTET_STRING<254> data = 1;
}

info event AccessControlEntryChanged = 0 {
fabric_idx adminFabricIndex = 0;
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlEntry latestValue = 4;
}

info event AccessControlExtensionChanged = 1 {
fabric_idx adminFabricIndex = 0;
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable ExtensionEntry latestValue = 4;
}

attribute AccessControlEntry acl[] = 0;
attribute ExtensionEntry extension[] = 1;
readonly global attribute attrib_id attributeList[] = 65531;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster AdministratorCommissioning = 60 {
enum CommissioningWindowStatus : ENUM8 {
kWindowNotOpen = 0;
Expand Down Expand Up @@ -977,6 +1101,8 @@ server cluster WiFiNetworkDiagnostics = 54 {


endpoint 0 {
binding cluster AccessControl;
server cluster AccessControl;
server cluster AdministratorCommissioning;
server cluster Basic;
server cluster Descriptor;
Expand Down
100 changes: 99 additions & 1 deletion examples/bridge-app/bridge-common/bridge-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,103 @@
}
]
},
{
"name": "Access Control",
"code": 31,
"mfgCode": null,
"define": "ACCESS_CONTROL_CLUSTER",
"side": "client",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "client",
"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,
"commands": [],
"attributes": [
{
"name": "ACL",
"code": 0,
"mfgCode": null,
"side": "server",
"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",
"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",
"included": 1,
"storageOption": "External",
"singleton": 0,
"bounded": 0,
"defaultValue": "",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
},
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 1,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Basic",
"code": 40,
Expand Down Expand Up @@ -4976,5 +5073,6 @@
"endpointVersion": 1,
"deviceIdentifier": 257
}
]
],
"log": []
}
1 change: 1 addition & 0 deletions examples/bridge-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ idf_component_register(PRIV_INCLUDE_DIRS
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/util"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/reporting"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/administrator-commissioning-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/basic"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control"
Expand Down
63 changes: 63 additions & 0 deletions examples/door-lock-app/door-lock-common/door-lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,68 @@ struct LabelStruct {
CHAR_STRING<16> value = 1;
}

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

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

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

struct AccessControlEntry {
fabric_idx fabricIndex = 0;
Privilege privilege = 1;
AuthMode authMode = 2;
nullable INT64U subjects[] = 3;
nullable Target targets[] = 4;
}

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

struct ExtensionEntry {
fabric_idx fabricIndex = 0;
OCTET_STRING<254> data = 1;
}

info event AccessControlEntryChanged = 0 {
fabric_idx adminFabricIndex = 0;
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable AccessControlEntry latestValue = 4;
}

info event AccessControlExtensionChanged = 1 {
fabric_idx adminFabricIndex = 0;
nullable node_id adminNodeID = 1;
nullable INT16U adminPasscodeID = 2;
ChangeTypeEnum changeType = 3;
nullable ExtensionEntry latestValue = 4;
}

attribute AccessControlEntry acl[] = 0;
attribute ExtensionEntry extension[] = 1;
readonly global attribute attrib_id attributeList[] = 65531;
readonly global attribute int16u clusterRevision = 65533;
}

server cluster AdministratorCommissioning = 60 {
enum CommissioningWindowStatus : ENUM8 {
kWindowNotOpen = 0;
Expand Down Expand Up @@ -1430,6 +1492,7 @@ server cluster WiFiNetworkDiagnostics = 54 {


endpoint 0 {
server cluster AccessControl;
server cluster AdministratorCommissioning;
server cluster Basic;
server cluster Descriptor;
Expand Down
Loading

0 comments on commit 6beab66

Please sign in to comment.