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

[ICD] Remove key from ICD Management cluster #29562

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,6 @@ server cluster IcdManagement = 70 {
fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
fabric_sensitive octet_string<16> key = 3;
fabric_idx fabricIndex = 254;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1945,7 +1945,6 @@ server cluster IcdManagement = 70 {
fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
fabric_sensitive octet_string<16> key = 3;
fabric_idx fabricIndex = 254;
}

Expand Down
1 change: 0 additions & 1 deletion examples/lock-app/lock-common/lock-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,6 @@ server cluster IcdManagement = 70 {
fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
fabric_sensitive octet_string<16> key = 3;
fabric_idx fabricIndex = 254;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1558,7 +1558,6 @@ server cluster IcdManagement = 70 {
fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
fabric_sensitive octet_string<16> key = 3;
fabric_idx fabricIndex = 254;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ CHIP_ERROR IcdManagementAttributeAccess::ReadRegisteredClients(EndpointId endpoi

Structs::MonitoringRegistrationStruct::Type s{ .checkInNodeID = e.checkInNodeID,
.monitoredSubject = e.monitoredSubject,
.key = e.key,
.fabricIndex = e.fabricIndex };
ReturnErrorOnFailure(subEncoder.Encode(s));
}
Expand Down
47 changes: 7 additions & 40 deletions src/app/tests/suites/TestIcdManagementCluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,17 +167,8 @@ tests:
response:
value:
[
{
CheckInNodeID: 101,
MonitoredSubject: 1001,
Key: "\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f",
},
{
CheckInNodeID: 201,
MonitoredSubject: 2001,
Key:
"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f",
},
{ CheckInNodeID: 101, MonitoredSubject: 1001 },
{ CheckInNodeID: 201, MonitoredSubject: 2001 },
]

- label: "Register 1.1"
Expand All @@ -201,17 +192,8 @@ tests:
response:
value:
[
{
CheckInNodeID: 101,
MonitoredSubject: 1002,
Key: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1",
},
{
CheckInNodeID: 201,
MonitoredSubject: 2001,
Key:
"\x20\x21\x22\x23\x24\x25\x26\x27\x28\x29\x2a\x2b\x2c\x2d\x2e\x2f",
},
{ CheckInNodeID: 101, MonitoredSubject: 1002 },
{ CheckInNodeID: 201, MonitoredSubject: 2001 },
]

- label: "Register 2.2 (wrong verification key)"
Expand All @@ -238,16 +220,8 @@ tests:
response:
value:
[
{
CheckInNodeID: 101,
MonitoredSubject: 1002,
Key: "\x01\x11\x21\x31\x41\x51\x61\x71\x81\x91\xa1\xb1\xc1\xd1\xe1\xf1",
},
{
CheckInNodeID: 201,
MonitoredSubject: 2002,
Key: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f",
},
{ CheckInNodeID: 101, MonitoredSubject: 1002 },
{ CheckInNodeID: 201, MonitoredSubject: 2002 },
]

- label: "Unregister 1.1 (wrong key)"
Expand All @@ -263,14 +237,7 @@ tests:
command: "readAttribute"
attribute: "RegisteredClients"
response:
value:
[
{
CheckInNodeID: 201,
MonitoredSubject: 2002,
Key: "\x02\x12\x22\x32\x42\x52\x62\x72\x82\x92\xa2\xb2\xc2\xd2\xe2\x2f",
},
]
value: [{ CheckInNodeID: 201, MonitoredSubject: 2002 }]

- label: "Unregister 2.1"
command: "UnregisterClient"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ limitations under the License.
<cluster code="0x0046"/>
<item fieldId="1" name="CheckInNodeID" type="node_id" isFabricSensitive="true"/>
<item fieldId="2" name="MonitoredSubject" type="INT64U" isFabricSensitive="true"/>
<item fieldId="3" name="Key" type="OCTET_STRING" length="16" isFabricSensitive="true"/>
<!-- RESERVED = 0x03 -->
</struct>

<cluster>
Expand Down
1 change: 0 additions & 1 deletion src/controller/data_model/controller-clusters.matter
Original file line number Diff line number Diff line change
Expand Up @@ -2713,7 +2713,6 @@ client cluster IcdManagement = 70 {
fabric_scoped struct MonitoringRegistrationStruct {
fabric_sensitive node_id checkInNodeID = 1;
fabric_sensitive int64u monitoredSubject = 2;
fabric_sensitive octet_string<16> key = 3;
fabric_idx fabricIndex = 254;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,12 @@ import chip.tlv.TlvWriter
class IcdManagementClusterMonitoringRegistrationStruct(
val checkInNodeID: ULong,
val monitoredSubject: ULong,
val key: ByteArray,
val fabricIndex: UInt
) {
override fun toString(): String = buildString {
append("IcdManagementClusterMonitoringRegistrationStruct {\n")
append("\tcheckInNodeID : $checkInNodeID\n")
append("\tmonitoredSubject : $monitoredSubject\n")
append("\tkey : $key\n")
append("\tfabricIndex : $fabricIndex\n")
append("}\n")
}
Expand All @@ -42,7 +40,6 @@ class IcdManagementClusterMonitoringRegistrationStruct(
startStructure(tlvTag)
put(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D), checkInNodeID)
put(ContextSpecificTag(TAG_MONITORED_SUBJECT), monitoredSubject)
put(ContextSpecificTag(TAG_KEY), key)
put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex)
endStructure()
}
Expand All @@ -51,7 +48,6 @@ class IcdManagementClusterMonitoringRegistrationStruct(
companion object {
private const val TAG_CHECK_IN_NODE_I_D = 1
private const val TAG_MONITORED_SUBJECT = 2
private const val TAG_KEY = 3
private const val TAG_FABRIC_INDEX = 254

fun fromTlv(
Expand All @@ -61,15 +57,13 @@ class IcdManagementClusterMonitoringRegistrationStruct(
tlvReader.enterStructure(tlvTag)
val checkInNodeID = tlvReader.getULong(ContextSpecificTag(TAG_CHECK_IN_NODE_I_D))
val monitoredSubject = tlvReader.getULong(ContextSpecificTag(TAG_MONITORED_SUBJECT))
val key = tlvReader.getByteArray(ContextSpecificTag(TAG_KEY))
val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX))

tlvReader.exitContainer()

return IcdManagementClusterMonitoringRegistrationStruct(
checkInNodeID,
monitoredSubject,
key,
fabricIndex
)
}
Expand Down
13 changes: 3 additions & 10 deletions src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp

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

12 changes: 3 additions & 9 deletions src/controller/java/zap-generated/CHIPReadCallbacks.cpp

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

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

2 changes: 0 additions & 2 deletions src/controller/python/chip/clusters/Objects.py

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

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

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

1 change: 0 additions & 1 deletion src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h

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

5 changes: 1 addition & 4 deletions src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm

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

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

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

Loading
Loading