Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add access control server skeleton #12296

Merged
Show file tree
Hide file tree
Changes from 31 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
d5eb767
Add access control server skeleton
mlepage-google Nov 25, 2021
2748396
Regen code.
mlepage-google Nov 26, 2021
dd3d079
Restyle code
mlepage-google Nov 26, 2021
2e5b927
Update from upstream changes
mlepage-google Nov 27, 2021
e4af168
Merge branch 'master' into access-control-server-skeleton
mlepage-google Nov 29, 2021
dcc1381
Restyle
mlepage-google Nov 29, 2021
c593e2a
Merge branch 'master' into access-control-server-skeleton
mlepage-google Nov 29, 2021
d3df60c
Add access-control-server to CMakeLists.txt
mlepage-google Nov 29, 2021
bf1709f
Remove nullable from list attribute
mlepage-google Nov 29, 2021
b8bc6ec
Merge branch 'master' into access-control-server-skeleton
mlepage-google Nov 29, 2021
2fb788a
Merge branch 'master' into access-control-server-skeleton
mlepage-google Nov 30, 2021
89a5974
Regen and restyle
mlepage-google Nov 30, 2021
71b5fa7
Merge branch 'master' into access-control-server-skeleton
mlepage-google Nov 30, 2021
c68c025
Regen and restyle
mlepage-google Nov 30, 2021
21466e7
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 1, 2021
80dc54b
Fix test
mlepage-google Dec 2, 2021
53baaf3
Regen and restyle
mlepage-google Dec 2, 2021
63a0ce0
Regen and restyle
mlepage-google Dec 2, 2021
08c41e9
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 2, 2021
466a548
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 2, 2021
6a5b6f8
Regen and restyle
mlepage-google Dec 2, 2021
a2208c6
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 2, 2021
1655019
Regen and restyle
mlepage-google Dec 2, 2021
c710106
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 2, 2021
49cbd62
Regen and restyle
mlepage-google Dec 2, 2021
5ac7f6a
Regen and restyle
mlepage-google Dec 2, 2021
ea2d4df
Add AccessControl cluster to Darwin test helper
mlepage-google Dec 3, 2021
c8a905a
Remove AccessControl cluster from some tests
mlepage-google Dec 3, 2021
6eec4e3
Fix unless in test file
mlepage-google Dec 3, 2021
4334838
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 3, 2021
fb1e25f
Restyle and regen
mlepage-google Dec 3, 2021
04d074d
Merge branch 'master' into access-control-server-skeleton
mlepage-google Dec 3, 2021
ccad3d2
Regen and restyle
mlepage-google Dec 3, 2021
1f1b567
Add ignore list for cluster attribute tests
mlepage-google Dec 3, 2021
4f594bd
Restyle
mlepage-google Dec 3, 2021
127624a
Fix ignore list for cluster attribute decode tests
mlepage-google Dec 3, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 66 additions & 0 deletions examples/all-clusters-app/all-clusters-common/all-clusters-app.zap
Original file line number Diff line number Diff line change
Expand Up @@ -870,6 +870,72 @@
}
]
},
{
"name": "Access Control",
"code": 31,
"mfgCode": null,
"define": "ACCESS_CONTROL_CLUSTER",
"side": "client",
"enabled": 0,
"commands": [],
"attributes": []
},
{
"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": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Basic",
"code": 40,
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/esp32/main/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ set(SRC_DIRS_LIST
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/on-off-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/level-control"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/identify-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/access-control-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/account-login-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/application-launcher-server"
"${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/src/app/clusters/audio-output-server"
Expand Down
1 change: 1 addition & 0 deletions examples/all-clusters-app/mbed/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ target_sources(${APP_TARGET} PRIVATE
${APP_CLUSTERS}/basic/basic.cpp
${APP_CLUSTERS}/bindings/bindings.cpp
${APP_CLUSTERS}/on-off-server/on-off-server.cpp
${APP_CLUSTERS}/access-control-server/access-control-server.cpp
${APP_CLUSTERS}/account-login-server/account-login-server.cpp
${APP_CLUSTERS}/application-launcher-server/application-launcher-server.cpp
${APP_CLUSTERS}/audio-output-server/audio-output-server.cpp
Expand Down
18 changes: 18 additions & 0 deletions src/app/clusters/access-control-server/access-control-server.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
*
* Copyright (c) 2021 Project CHIP Authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

void MatterAccessControlPluginServerInitCallback() {}
1 change: 1 addition & 0 deletions src/app/tests/suites/TestDescriptorCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ tests:
value: [
0x0003, # Identify
0x001D, # Descriptor
0x001F, # Access Control
0x0028, # Basic Information
0x0029, # OTA Software Update Provider
0x002A, # OTA Software Update Requestor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,13 @@ limitations under the License.
and enforce Access Control for the Node’s endpoints and their associated
cluster instances.</description>
<!-- Base data types -->
<attribute side="server" code="0x0000" define="ACL" type="ARRAY" entryType="AccessControlEntry" writable="true" isNullable="true">
<attribute side="server" code="0x0000" define="ACL" type="ARRAY" entryType="AccessControlEntry" writable="true">
<description>ACL</description>
<access op="read" privilege="administer"/>
<access op="write" privilege="administer"/>
<access modifier="fabric-scoped"/>
</attribute>
<attribute side="server" code="0x0001" define="EXTENSION" type="ARRAY" entryType="ExtensionEntry" writable="true" isNullable="true">
<attribute side="server" code="0x0001" define="EXTENSION" type="ARRAY" entryType="ExtensionEntry" writable="true">
<description>Extension</description>
<access op="read" privilege="administer"/>
<access op="write" privilege="administer"/>
Expand Down
1 change: 1 addition & 0 deletions src/app/zap-templates/zcl/zcl.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"version": "ZCL Test Data",
"xmlRoot": [".", "./data-model/chip/", "./data-model/silabs/"],
"xmlFile": [
"access-control-cluster.xml",
"account-login-cluster.xml",
"administrator-commissioning-cluster.xml",
"application-basic-cluster.xml",
Expand Down
36 changes: 19 additions & 17 deletions src/app/zap_cluster_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,11 @@

# List of directories in src/app/clusters to build for server clusters.
SERVER_CLUSTERS: typing.Dict[str, typing.List[str]] = {
'ALARM_CLUSTER': [],
'APPLICATION_BASIC_CLUSTER': ['application-basic-server'],
'ACCESS_CONTROL_CLUSTER': ['access-control-server'],
'ACCOUNT_LOGIN_CLUSTER': ['account-login-server'],
'ADMINISTRATOR_COMMISSIONING_CLUSTER': ['administrator-commissioning-server'],
'ALARM_CLUSTER': [],
'APPLICATION_BASIC_CLUSTER': ['application-basic-server'],
'APPLICATION_LAUNCHER_CLUSTER': ['application-launcher-server'],
'AUDIO_OUTPUT_CLUSTER': ['audio-output-server'],
'BARRIER_CONTROL_CLUSTER': ['barrier-control-server'],
Expand All @@ -29,13 +30,14 @@
'DEVICE_TEMP_CLUSTER': [],
'DIAGNOSTIC_LOGS_CLUSTER': ['diagnostic-logs-server'],
'DOOR_LOCK_CLUSTER': ['door-lock-server'],
'ELECTRICAL_MEASUREMENT_CLUSTER': [],
'ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER': ['ethernet_network_diagnostics_server'],
'FIXED_LABEL_CLUSTER': [],
'FLOW_MEASUREMENT_CLUSTER': [],
'GENERAL_COMMISSIONING_CLUSTER': ['general-commissioning-server'],
'GENERAL_DIAGNOSTICS_CLUSTER': ['general_diagnostics_server'],
'GROUPS_CLUSTER': ['groups-server'],
'GROUP_KEY_MANAGEMENT_CLUSTER': [],
'GROUPS_CLUSTER': ['groups-server'],
'IAS_ZONE_CLUSTER': ['ias-zone-server'],
'IDENTIFY_CLUSTER': ['identify-server'],
'ILLUMINANCE_MEASUREMENT_CLUSTER': [],
Expand All @@ -58,31 +60,31 @@
'PRESSURE_MEASUREMENT_CLUSTER': [],
'PUMP_CONFIG_CONTROL_CLUSTER': ['pump-configuration-and-control-server'],
'RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER': [],
'ELECTRICAL_MEASUREMENT_CLUSTER': [],
'SCENES_CLUSTER': ['scenes'],
'SOFTWARE_DIAGNOSTICS_CLUSTER': ['software_diagnostics_server'],
'SWITCH_CLUSTER': [],
'TARGET_NAVIGATOR_CLUSTER': ['target-navigator-server'],
'TEMP_MEASUREMENT_CLUSTER': [],
'TEST_CLUSTER': ['test-cluster-server'],
'TV_CHANNEL_CLUSTER': ['tv-channel-server'],
'THERMOSTAT_CLUSTER': ['thermostat-server'],
'THREAD_NETWORK_DIAGNOSTICS_CLUSTER': ['thread_network_diagnostics_server'],
'WINDOW_COVERING_CLUSTER': ['window-covering-server'],
'THERMOSTAT_UI_CONFIG_CLUSTER': ['thermostat-user-interface-configuration-server'],
'WIFI_NETWORK_DIAGNOSTICS_CLUSTER': ['wifi_network_diagnostics_server'],
'THREAD_NETWORK_DIAGNOSTICS_CLUSTER': ['thread_network_diagnostics_server'],
'TV_CHANNEL_CLUSTER': ['tv-channel-server'],
'WAKE_ON_LAN_CLUSTER': [],
'WIFI_NETWORK_DIAGNOSTICS_CLUSTER': ['wifi_network_diagnostics_server'],
'WINDOW_COVERING_CLUSTER': ['window-covering-server'],
'ZLL_COMMISSIONING_CLUSTER': []
}

# List of directories in src/app/clusters to build for client clusters.
CLIENT_CLUSTERS: typing.Dict[str, typing.List[str]] = {
'ALARM_CLUSTER': [],
'ACCESS_CONTROL_CLUSTER': [],
'ACCOUNT_LOGIN_CLUSTER': [],
'ADMINISTRATOR_COMMISSIONING_CLUSTER': [],
'ALARM_CLUSTER': [],
'APPLICATION_BASIC_CLUSTER': [],
'APPLICATION_LAUNCHER_CLUSTER': [],
'AUDIO_OUTPUT_CLUSTER': [],
'APPLICATION_BASIC_CLUSTER': [],
'BARRIER_CONTROL_CLUSTER': [],
'BASIC_CLUSTER': [],
'BINARY_INPUT_BASIC_CLUSTER': [],
Expand All @@ -93,17 +95,18 @@
'COLOR_CONTROL_CLUSTER': [],
'COMMISSIONING_CLUSTER': [],
'CONTENT_LAUNCH_CLUSTER': [],
'DEVICE_TEMP_CLUSTER': [],
'DESCRIPTOR_CLUSTER': [],
'DEVICE_TEMP_CLUSTER': [],
'DIAGNOSTIC_LOGS_CLUSTER': [],
'DOOR_LOCK_CLUSTER': [],
'ELECTRICAL_MEASUREMENT_CLUSTER': [],
'ETHERNET_NETWORK_DIAGNOSTICS_CLUSTER': [],
'FIXED_LABEL_CLUSTER': [],
'FLOW_MEASUREMENT_CLUSTER': [],
'GENERAL_COMMISSIONING_CLUSTER': [],
'GENERAL_DIAGNOSTICS_CLUSTER': [],
'GROUPS_CLUSTER': [],
'GROUP_KEY_MANAGEMENT_CLUSTER': [],
'GROUPS_CLUSTER': [],
'IAS_ZONE_CLUSTER': ['ias-zone-client'],
'IDENTIFY_CLUSTER': [],
'ILLUMINANCE_MEASUREMENT_CLUSTER': [],
Expand All @@ -126,21 +129,20 @@
'PRESSURE_MEASUREMENT_CLUSTER': [],
'PUMP_CONFIG_CONTROL_CLUSTER': ['pump-configuration-and-control-client'],
'RELATIVE_HUMIDITY_MEASUREMENT_CLUSTER': [],
'ELECTRICAL_MEASUREMENT_CLUSTER': [],
'SCENES_CLUSTER': [],
'SOFTWARE_DIAGNOSTICS_CLUSTER': [],
'SWITCH_CLUSTER': [],
'TARGET_NAVIGATOR_CLUSTER': [],
'TEMP_MEASUREMENT_CLUSTER': [],
'TEST_CLUSTER': [],
'TRUSTED_ROOT_CERTIFICATES_CLUSTER': [],
'TV_CHANNEL_CLUSTER': [],
'THERMOSTAT_CLUSTER': ['thermostat-client'],
'THERMOSTAT_UI_CONFIG_CLUSTER': [],
'THREAD_NETWORK_DIAGNOSTICS_CLUSTER': [],
'WINDOW_COVERING_CLUSTER': [],
'WIFI_NETWORK_DIAGNOSTICS_CLUSTER': [],
'TRUSTED_ROOT_CERTIFICATES_CLUSTER': [],
'TV_CHANNEL_CLUSTER': [],
'WAKE_ON_LAN_CLUSTER': [],
'WIFI_NETWORK_DIAGNOSTICS_CLUSTER': [],
'WINDOW_COVERING_CLUSTER': [],
'ZLL_COMMISSIONING_CLUSTER': []
}

Expand Down
82 changes: 82 additions & 0 deletions src/controller/data_model/controller-clusters.zap
Original file line number Diff line number Diff line change
Expand Up @@ -1343,6 +1343,88 @@
}
]
},
{
"name": "Access Control",
"code": 31,
"mfgCode": null,
"define": "ACCESS_CONTROL_CLUSTER",
"side": "client",
"enabled": 1,
"commands": [],
"attributes": [
{
"name": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Access Control",
"code": 31,
"mfgCode": null,
"define": "ACCESS_CONTROL_CLUSTER",
"side": "server",
"enabled": 0,
"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": "ClusterRevision",
"code": 65533,
"mfgCode": null,
"side": "server",
"included": 1,
"storageOption": "RAM",
"singleton": 0,
"bounded": 0,
"defaultValue": "1",
"reportable": 0,
"minInterval": 1,
"maxInterval": 65534,
"reportableChange": 0
}
]
},
{
"name": "Bridged Actions",
"code": 37,
Expand Down
6 changes: 6 additions & 0 deletions src/controller/java/zap-generated/CHIPCallbackTypes.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions src/controller/java/zap-generated/CHIPClusters-JNI.cpp

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading