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

Implement CASE processing of IPK #16737

Merged
merged 21 commits into from
Mar 30, 2022

Conversation

tcarmelveilleux
Copy link
Contributor

Problem

  • IPK processing used placeholder IPK at innermost levels of
    CASE and never used the values set in GroupDataProvider as
    set by Commissioner with AddNOC or KeySetWrite cluster
    commands.
  • IPK Processing requires significant state keeping by
    controllers and commissioners to work, and none of the
    plumbing existed

Fixes #15583

Change overview

  • Fixed NOC Cluster setting of IPK in AddNOC that was using
    the wrong compressed fabric ID.
  • Properly use GroupDataProvider to get IPK for controllers
    sending Sigma1
  • Properly iterate through all IPK on receiving Sigma1, from
    GroupDataProvider
  • Add plumbing to properly initialize GroupDataProvider at
    CHIPDeviceControllerFactory and Server
  • Added a central point for a default IPK, that is at the very
    outermost level, rather than innermost level. A follow-up
    PR will allow reconfiguration of it for CHIP-tool. Code paths
    will properly use the OperationalCredentialsDelegate's IPK
    value passed in Callback, if you it's provided. Controllers and
    commissioners can setup their GroupDataProvider context to
    properly use the right group keys even without the
    follow-up to allow non-default IPK in chip-tool.
  • Cleaned-up the loose ends around all the injection points

Testing

  • Updated all necessary Unit tests
  • Added IPK and Destination ID unit test cases from spec
  • All cert tests still pass
  • All unit tests still pass

Problem:
- IPK processing used placeholder IPK at innermost levels of
  CASE and never used the values set in GroupDataProvider as
  set by Commissioner with AddNOC or KeySetWrite cluster
  commands.
- IPK Processing requires significant state keeping by
  controllers and commissioners to work, and none of the
  plumbing existed

Changes:
- Fixed NOC Cluster setting of IPK in AddNOC that was using
  the wrong compressed fabric ID.
- Properly use GroupDataProvider to get IPK for controllers
  sending Sigma1
- Properly iterate through all IPK on receiving Sigma1, from
  GroupDataProvider
- Add plumbing to properly initialize GroupDataProvider at
  CHIPDeviceControllerFactory and Server
- Added a central point for a default IPK, that is at the very
  outermost level, rather than innermost level. A follow-up
  PR will allow reconfiguration of it for CHIP-tool. Code paths
  will properly use the OperationalCredentialsDelegate's IPK
  value passed in Callback, if you it's provided. Controllers and
  commissioners can setup their GroupDataProvider context to
  properly use the right group keys even without the
  follow-up to allow non-default IPK in chip-tool.
- Cleaned-up the loose ends around all the injection points

Testing done:
- Updated all necessary Unit tests
- Added IPK and Destination ID unit test cases from spec
- All cert tests still pass
- All unit tests still pass

Fixes project-chip#15583
@github-actions
Copy link

github-actions bot commented Mar 29, 2022

PR #16737: Size comparison from d6fcbd9 to f4d86cb

Increases above 0.2%:

platform target config section d6fcbd9 f4d86cb change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605498 607306 1808 0.3
.app_xip_area 512428 514076 1648 0.3
lock cyw930739m2evb_01 (read/write) 563286 564862 1576 0.3
.app_xip_area 471744 473160 1416 0.3
ota-requestor-no-progress-logging cyw930739m2evb_01 .app_xip_area 474356 475576 1220 0.3
linux chip-tool-ipv6only arm64 (read only) 9849660 9907292 57632 0.6
(read/write) 473713 474849 1136 0.2
.data.rel.ro 372656 373456 800 0.2
.got 55368 56112 744 1.3
.rodata 494468 500388 5920 1.2
.text 8301972 8349828 47856 0.6
thermostat-no-ble arm64 (read only) 2275348 2280436 5088 0.2
.text 1911952 1917328 5376 0.3
telink lighting-app tlsr9518adk80d bss 70092 70276 184 0.3
Increases (8 builds for cyw30739, linux, mbed, nrfconnect, telink)
platform target config section d6fcbd9 f4d86cb change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605498 607306 1808 0.3
.app_xip_area 512428 514076 1648 0.3
.bss 75816 75984 168 0.2
lock cyw930739m2evb_01 (read/write) 563286 564862 1576 0.3
.app_xip_area 471744 473160 1416 0.3
.bss 74320 74488 168 0.2
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575546 576926 1380 0.2
.app_xip_area 474356 475576 1220 0.3
.bss 83648 83816 168 0.2
linux chip-tool-ipv6only arm64 (read only) 9849660 9907292 57632 0.6
(read/write) 473713 474849 1136 0.2
.data.rel.ro 372656 373456 800 0.2
.got 55368 56112 744 1.3
.rodata 494468 500388 5920 1.2
.text 8301972 8349828 47856 0.6
thermostat-no-ble arm64 (read only) 2275348 2280436 5088 0.2
.text 1911952 1917328 5376 0.3
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2355772 2356788 1016 0.0
.bss 184860 185028 168 0.1
.text 1318372 1319388 1016 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1143459 1144579 1120 0.1
bss 142892 143060 168 0.1
text 783316 784332 1016 0.1
telink lighting-app tlsr9518adk80d (read/write) 787556 788980 1424 0.2
bss 70092 70276 184 0.3
text 557952 559292 1340 0.2
Decreases (7 builds for cyw30739, linux, mbed, nrfconnect)
platform target config section d6fcbd9 f4d86cb change % change
cyw30739 light cyw930739m2evb_01 .data 604 596 -8 -1.3
lock cyw930739m2evb_01 .data 568 560 -8 -1.4
ota-requestor-no-progress-logging cyw930739m2evb_01 .data 508 500 -8 -1.6
linux chip-tool-ipv6only arm64 .bss 40737 40353 -384 -0.9
.data 1144 1128 -16 -1.4
.init_array 192 184 -8 -4.2
thermostat-no-ble arm64 (read/write) 148369 148273 -96 -0.1
.data 1040 1024 -16 -1.5
.data.rel.ro 77000 76928 -72 -0.1
.got 4504 4488 -16 -0.4
.rodata 140036 139892 -144 -0.1
mbed lock-app CY8CPROTO_062_4343W+release .data 5760 5752 -8 -0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 rodata 142364 142356 -8 -0.0
Full report (8 builds for cyw30739, linux, mbed, nrfconnect, telink)
platform target config section d6fcbd9 f4d86cb change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605498 607306 1808 0.3
.app_xip_area 512428 514076 1648 0.3
.bss 75816 75984 168 0.2
.data 604 596 -8 -1.3
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 563286 564862 1576 0.3
.app_xip_area 471744 473160 1416 0.3
.bss 74320 74488 168 0.2
.data 568 560 -8 -1.4
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575546 576926 1380 0.2
.app_xip_area 474356 475576 1220 0.3
.bss 83648 83816 168 0.2
.data 508 500 -8 -1.6
.rodata 0 0 0 0.0
.text 112 112 0 0.0
linux chip-tool-ipv6only arm64 (read only) 9849660 9907292 57632 0.6
(read/write) 473713 474849 1136 0.2
.bss 40737 40353 -384 -0.9
.data 1144 1128 -16 -1.4
.data.rel.ro 372656 373456 800 0.2
.dynamic 560 560 0 0.0
.got 55368 56112 744 1.3
.init 24 24 0 0.0
.init_array 192 184 -8 -4.2
.rodata 494468 500388 5920 1.2
.text 8301972 8349828 47856 0.6
thermostat-no-ble arm64 (read only) 2275348 2280436 5088 0.2
(read/write) 148369 148273 -96 -0.1
.bss 62817 62817 0 0.0
.data 1040 1024 -16 -1.5
.data.rel.ro 77000 76928 -72 -0.1
.dynamic 560 560 0 0.0
.got 4504 4488 -16 -0.4
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 140036 139892 -144 -0.1
.text 1911952 1917328 5376 0.3
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2355772 2356788 1016 0.0
.bss 184860 185028 168 0.1
.data 5760 5752 -8 -0.1
.text 1318372 1319388 1016 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1143459 1144579 1120 0.1
bss 142892 143060 168 0.1
rodata 142364 142356 -8 -0.0
text 783316 784332 1016 0.1
telink lighting-app tlsr9518adk80d (read/write) 787556 788980 1424 0.2
bss 70092 70276 184 0.3
noinit 40416 40416 0 0.0
text 557952 559292 1340 0.2

@github-actions
Copy link

github-actions bot commented Mar 29, 2022

PR #16737: Size comparison from d6fcbd9 to d74fd8b

Increases above 0.2%:

platform target config section d6fcbd9 d74fd8b change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605498 607306 1808 0.3
.app_xip_area 512428 514076 1648 0.3
lock cyw930739m2evb_01 (read/write) 563286 564862 1576 0.3
.app_xip_area 471744 473160 1416 0.3
ota-requestor-no-progress-logging cyw930739m2evb_01 .app_xip_area 474356 475576 1220 0.3
linux chip-tool-ipv6only arm64 (read only) 9849660 9907292 57632 0.6
.got 55368 56112 744 1.3
.rodata 494468 500388 5920 1.2
.text 8301972 8349828 47856 0.6
thermostat-no-ble arm64 .text 1911952 1917328 5376 0.3
telink lighting-app tlsr9518adk80d bss 70092 70276 184 0.3
Increases (16 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section d6fcbd9 d74fd8b change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605498 607306 1808 0.3
.app_xip_area 512428 514076 1648 0.3
.bss 75816 75984 168 0.2
lock cyw930739m2evb_01 (read/write) 563286 564862 1576 0.3
.app_xip_area 471744 473160 1416 0.3
.bss 74320 74488 168 0.2
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575546 576926 1380 0.2
.app_xip_area 474356 475576 1220 0.3
.bss 83648 83816 168 0.2
efr32 lighting-app BRD4161A (read only) 926664 928128 1464 0.2
(read/write) 128952 129112 160 0.1
.bss 126952 127120 168 0.1
.text 926656 928120 1464 0.2
BRD4161A+rpc (read only) 955688 957136 1448 0.2
(read/write) 144904 145064 160 0.1
.bss 142728 142896 168 0.1
.text 955680 957128 1448 0.2
window-app BRD4161A (read only) 856052 857628 1576 0.2
(read/write) 126912 127072 160 0.1
.bss 125040 125208 168 0.1
.text 856044 857620 1576 0.2
k32w light k32w061+release (read/write) 704320 705204 884 0.1
.bss 77808 77976 168 0.2
.text 618836 619560 724 0.1
lock k32w061+release (read/write) 703428 704320 892 0.1
.bss 77784 77952 168 0.2
.text 617928 618660 732 0.1
linux chip-tool-ipv6only arm64 (read only) 9849660 9907292 57632 0.6
(read/write) 473713 474849 1136 0.2
.data.rel.ro 372656 373456 800 0.2
.got 55368 56112 744 1.3
.rodata 494468 500388 5920 1.2
.text 8301972 8349828 47856 0.6
thermostat-no-ble arm64 (read only) 2275348 2280436 5088 0.2
.text 1911952 1917328 5376 0.3
mbed lock-app CY8CPROTO_062_4343W+release (read/write) 2355772 2356788 1016 0.0
.bss 184860 185028 168 0.1
.text 1318372 1319388 1016 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1143459 1144579 1120 0.1
bss 142892 143060 168 0.1
text 783316 784332 1016 0.1
p6 all-clusters-app default (read/write) 2498448 2500272 1824 0.1
.bss 118280 118448 168 0.1
.text 1456712 1458536 1824 0.1
light-app default (read/write) 2400896 2402440 1544 0.1
.bss 111752 111920 168 0.2
.text 1359160 1360704 1544 0.1
lock-app default (read/write) 2364400 2366072 1672 0.1
.bss 111496 111664 168 0.2
.text 1322664 1324336 1672 0.1
telink lighting-app tlsr9518adk80d (read/write) 787556 788980 1424 0.2
bss 70092 70276 184 0.3
text 557952 559292 1340 0.2
Decreases (15 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6)
platform target config section d6fcbd9 d74fd8b change % change
cyw30739 light cyw930739m2evb_01 .data 604 596 -8 -1.3
lock cyw930739m2evb_01 .data 568 560 -8 -1.4
ota-requestor-no-progress-logging cyw930739m2evb_01 .data 508 500 -8 -1.6
efr32 lighting-app BRD4161A .data 1996 1988 -8 -0.4
BRD4161A+rpc .data 2176 2168 -8 -0.4
window-app BRD4161A .data 1872 1864 -8 -0.4
k32w light k32w061+release .data 1876 1868 -8 -0.4
lock k32w061+release .data 1916 1908 -8 -0.4
linux chip-tool-ipv6only arm64 .bss 40737 40353 -384 -0.9
.data 1144 1128 -16 -1.4
.init_array 192 184 -8 -4.2
thermostat-no-ble arm64 (read/write) 148369 148273 -96 -0.1
.data 1040 1024 -16 -1.5
.data.rel.ro 77000 76928 -72 -0.1
.got 4504 4488 -16 -0.4
.rodata 140036 139892 -144 -0.1
mbed lock-app CY8CPROTO_062_4343W+release .data 5760 5752 -8 -0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 rodata 142364 142356 -8 -0.0
p6 all-clusters-app default .data 2640 2632 -8 -0.3
light-app default .data 2496 2488 -8 -0.3
lock-app default .data 2456 2448 -8 -0.3
Full report (16 builds for cyw30739, efr32, k32w, linux, mbed, nrfconnect, p6, telink)
platform target config section d6fcbd9 d74fd8b change % change
cyw30739 light cyw930739m2evb_01 (read/write) 605498 607306 1808 0.3
.app_xip_area 512428 514076 1648 0.3
.bss 75816 75984 168 0.2
.data 604 596 -8 -1.3
.rodata 0 0 0 0.0
.text 0 0 0 0.0
lock cyw930739m2evb_01 (read/write) 563286 564862 1576 0.3
.app_xip_area 471744 473160 1416 0.3
.bss 74320 74488 168 0.2
.data 568 560 -8 -1.4
.rodata 0 0 0 0.0
.text 0 0 0 0.0
ota-requestor-no-progress-logging cyw930739m2evb_01 (read/write) 575546 576926 1380 0.2
.app_xip_area 474356 475576 1220 0.3
.bss 83648 83816 168 0.2
.data 508 500 -8 -1.6
.rodata 0 0 0 0.0
.text 112 112 0 0.0
efr32 lighting-app BRD4161A (read only) 926664 928128 1464 0.2
(read/write) 128952 129112 160 0.1
.bss 126952 127120 168 0.1
.data 1996 1988 -8 -0.4
.text 926656 928120 1464 0.2
BRD4161A+rpc (read only) 955688 957136 1448 0.2
(read/write) 144904 145064 160 0.1
.bss 142728 142896 168 0.1
.data 2176 2168 -8 -0.4
.text 955680 957128 1448 0.2
window-app BRD4161A (read only) 856052 857628 1576 0.2
(read/write) 126912 127072 160 0.1
.bss 125040 125208 168 0.1
.data 1872 1864 -8 -0.4
.text 856044 857620 1576 0.2
k32w light k32w061+release (read/write) 704320 705204 884 0.1
.bss 77808 77976 168 0.2
.data 1876 1868 -8 -0.4
.text 618836 619560 724 0.1
lock k32w061+release (read/write) 703428 704320 892 0.1
.bss 77784 77952 168 0.2
.data 1916 1908 -8 -0.4
.text 617928 618660 732 0.1
linux chip-tool-ipv6only arm64 (read only) 9849660 9907292 57632 0.6
(read/write) 473713 474849 1136 0.2
.bss 40737 40353 -384 -0.9
.data 1144 1128 -16 -1.4
.data.rel.ro 372656 373456 800 0.2
.dynamic 560 560 0 0.0
.got 55368 56112 744 1.3
.init 24 24 0 0.0
.init_array 192 184 -8 -4.2
.rodata 494468 500388 5920 1.2
.text 8301972 8349828 47856 0.6
thermostat-no-ble arm64 (read only) 2275348 2280436 5088 0.2
(read/write) 148369 148273 -96 -0.1
.bss 62817 62817 0 0.0
.data 1040 1024 -16 -1.5
.data.rel.ro 77000 76928 -72 -0.1
.dynamic 560 560 0 0.0
.got 4504 4488 -16 -0.4
.init 24 24 0 0.0
.init_array 360 360 0 0.0
.rodata 140036 139892 -144 -0.1
.text 1911952 1917328 5376 0.3
mbed lock-app CY8CPROTO_062_4343W+release (read only) 6224 6224 0 0.0
(read/write) 2355772 2356788 1016 0.0
.bss 184860 185028 168 0.1
.data 5760 5752 -8 -0.1
.text 1318372 1319388 1016 0.1
nrfconnect all-clusters-app nrf52840dk_nrf52840 (read/write) 1143459 1144579 1120 0.1
bss 142892 143060 168 0.1
rodata 142364 142356 -8 -0.0
text 783316 784332 1016 0.1
p6 all-clusters-app default (read/write) 2498448 2500272 1824 0.1
.bss 118280 118448 168 0.1
.data 2640 2632 -8 -0.3
.text 1456712 1458536 1824 0.1
light-app default (read/write) 2400896 2402440 1544 0.1
.bss 111752 111920 168 0.2
.data 2496 2488 -8 -0.3
.text 1359160 1360704 1544 0.1
lock-app default (read/write) 2364400 2366072 1672 0.1
.bss 111496 111664 168 0.2
.data 2456 2448 -8 -0.3
.text 1322664 1324336 1672 0.1
telink lighting-app tlsr9518adk80d (read/write) 787556 788980 1424 0.2
bss 70092 70276 184 0.3
noinit 40416 40416 0 0.0
text 557952 559292 1340 0.2

src/app/OperationalDeviceProxy.h Show resolved Hide resolved
src/app/tests/TestOperationalDeviceProxy.cpp Show resolved Hide resolved
src/credentials/FabricTable.cpp Show resolved Hide resolved
src/credentials/GroupDataProviderImpl.cpp Show resolved Hide resolved
src/protocols/secure_channel/CASESession.cpp Show resolved Hide resolved
src/protocols/secure_channel/CASESession.cpp Show resolved Hide resolved
src/protocols/secure_channel/CASESession.cpp Show resolved Hide resolved
src/protocols/secure_channel/CASESession.h Show resolved Hide resolved
src/protocols/secure_channel/CASESession.h Show resolved Hide resolved
@tcarmelveilleux tcarmelveilleux merged commit 1c03d9c into project-chip:master Mar 30, 2022
tcarmelveilleux added a commit to tcarmelveilleux/connectedhomeip that referenced this pull request Mar 30, 2022
- Fixes the follow-up editorial comments from
  @bzbarsky-apple on project-chip#16737

- Unit tests still passa
- Cert tests pass
bzbarsky-apple pushed a commit that referenced this pull request Mar 31, 2022
* Quick editorial follow-ups on IPK for CASE

- Fixes the follow-up editorial comments from
  @bzbarsky-apple on #16737

- Unit tests still passa
- Cert tests pass

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
rochaferraz pushed a commit to rochaferraz/connectedhomeip that referenced this pull request Mar 31, 2022
* Implement CASE processing of IPK

Problem:
- IPK processing used placeholder IPK at innermost levels of
  CASE and never used the values set in GroupDataProvider as
  set by Commissioner with AddNOC or KeySetWrite cluster
  commands.
- IPK Processing requires significant state keeping by
  controllers and commissioners to work, and none of the
  plumbing existed

Changes:
- Fixed NOC Cluster setting of IPK in AddNOC that was using
  the wrong compressed fabric ID.
- Properly use GroupDataProvider to get IPK for controllers
  sending Sigma1
- Properly iterate through all IPK on receiving Sigma1, from
  GroupDataProvider
- Add plumbing to properly initialize GroupDataProvider at
  CHIPDeviceControllerFactory and Server
- Added a central point for a default IPK, that is at the very
  outermost level, rather than innermost level. A follow-up
  PR will allow reconfiguration of it for CHIP-tool. Code paths
  will properly use the OperationalCredentialsDelegate's IPK
  value passed in Callback, if you it's provided. Controllers and
  commissioners can setup their GroupDataProvider context to
  properly use the right group keys even without the
  follow-up to allow non-default IPK in chip-tool.
- Cleaned-up the loose ends around all the injection points

Testing done:
- Updated all necessary Unit tests
- Added IPK and Destination ID unit test cases from spec
- All cert tests still pass
- All unit tests still pass

Fixes project-chip#15583

* Restyled by clang-format

* Fix a few remaining TODOs

* First pass of fixing leftover CI

* Restyled by clang-format

* More CI fixes

* Restyled by clang-format

* Apply suggestions from code review

Co-authored-by: Michael Sandstedt <michael.sandstedt@gmail.com>

* Restyled by clang-format

* Revert pHYRate change

* Hook up IPKs on Darwin.

* Fix more CI on Python, Android, TV app

* Restyled by clang-format

* Apply review comment

* Fix Python repl

* Restyled by clang-format

* Fix shutdown of group data provider

* Fix Darwin and Android CI

* More fixing of Android CI

Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Michael Sandstedt <michael.sandstedt@gmail.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
rochaferraz pushed a commit to rochaferraz/connectedhomeip that referenced this pull request Mar 31, 2022
* Quick editorial follow-ups on IPK for CASE

- Fixes the follow-up editorial comments from
  @bzbarsky-apple on project-chip#16737

- Unit tests still passa
- Cert tests pass

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
tcarmelveilleux added a commit to tcarmelveilleux/connectedhomeip that referenced this pull request Apr 4, 2022
- `FabricTable::FindDestinationIDCandidate` is declared, but used nowhere
  since the IPK refactor of project-chip#16737, and not implemented either. It is
  100% dead code.
- Remove stale `FindDestinationIDCandidate` API
woody-apple pushed a commit that referenced this pull request Apr 5, 2022
- `FabricTable::FindDestinationIDCandidate` is declared, but used nowhere
  since the IPK refactor of #16737, and not implemented either. It is
  100% dead code.
- Remove stale `FindDestinationIDCandidate` API
chencheung pushed a commit to chencheung/connectedhomeip that referenced this pull request Apr 6, 2022
- `FabricTable::FindDestinationIDCandidate` is declared, but used nowhere
  since the IPK refactor of project-chip#16737, and not implemented either. It is
  100% dead code.
- Remove stale `FindDestinationIDCandidate` API
chencheung pushed a commit to chencheung/connectedhomeip that referenced this pull request Apr 6, 2022
- `FabricTable::FindDestinationIDCandidate` is declared, but used nowhere
  since the IPK refactor of project-chip#16737, and not implemented either. It is
  100% dead code.
- Remove stale `FindDestinationIDCandidate` API
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
* Implement CASE processing of IPK

Problem:
- IPK processing used placeholder IPK at innermost levels of
  CASE and never used the values set in GroupDataProvider as
  set by Commissioner with AddNOC or KeySetWrite cluster
  commands.
- IPK Processing requires significant state keeping by
  controllers and commissioners to work, and none of the
  plumbing existed

Changes:
- Fixed NOC Cluster setting of IPK in AddNOC that was using
  the wrong compressed fabric ID.
- Properly use GroupDataProvider to get IPK for controllers
  sending Sigma1
- Properly iterate through all IPK on receiving Sigma1, from
  GroupDataProvider
- Add plumbing to properly initialize GroupDataProvider at
  CHIPDeviceControllerFactory and Server
- Added a central point for a default IPK, that is at the very
  outermost level, rather than innermost level. A follow-up
  PR will allow reconfiguration of it for CHIP-tool. Code paths
  will properly use the OperationalCredentialsDelegate's IPK
  value passed in Callback, if you it's provided. Controllers and
  commissioners can setup their GroupDataProvider context to
  properly use the right group keys even without the
  follow-up to allow non-default IPK in chip-tool.
- Cleaned-up the loose ends around all the injection points

Testing done:
- Updated all necessary Unit tests
- Added IPK and Destination ID unit test cases from spec
- All cert tests still pass
- All unit tests still pass

Fixes project-chip#15583

* Restyled by clang-format

* Fix a few remaining TODOs

* First pass of fixing leftover CI

* Restyled by clang-format

* More CI fixes

* Restyled by clang-format

* Apply suggestions from code review

Co-authored-by: Michael Sandstedt <michael.sandstedt@gmail.com>

* Restyled by clang-format

* Revert pHYRate change

* Hook up IPKs on Darwin.

* Fix more CI on Python, Android, TV app

* Restyled by clang-format

* Apply review comment

* Fix Python repl

* Restyled by clang-format

* Fix shutdown of group data provider

* Fix Darwin and Android CI

* More fixing of Android CI

Co-authored-by: Restyled.io <commits@restyled.io>
Co-authored-by: Michael Sandstedt <michael.sandstedt@gmail.com>
Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
* Quick editorial follow-ups on IPK for CASE

- Fixes the follow-up editorial comments from
  @bzbarsky-apple on project-chip#16737

- Unit tests still passa
- Cert tests pass

* Restyled by clang-format

Co-authored-by: Restyled.io <commits@restyled.io>
andrei-menzopol pushed a commit to andrei-menzopol/connectedhomeip that referenced this pull request Apr 14, 2022
- `FabricTable::FindDestinationIDCandidate` is declared, but used nowhere
  since the IPK refactor of project-chip#16737, and not implemented either. It is
  100% dead code.
- Remove stale `FindDestinationIDCandidate` API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CASESession does not make use of real IPK
6 participants