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

Remove controller API for device pairing without security #10935

Merged

Conversation

pan-apple
Copy link
Contributor

Problem

This pairing mode was added as an interim solution while device commissioning was designed and implemented. It should be removed now, since PASE and CASE code is in place and functionally tested.

Change overview

Remove the controller API that allowed controller apps to pair with a device using test security keys. Update controller apps and framework to handle the removal of the test API.

Testing

The API was being used by chip-tool, iOS framework, and JNI layer.
Tested the tools to ensure they continue to function after the removal of the API.

@github-actions
Copy link

github-actions bot commented Oct 25, 2021

PR #10935: Size comparison from 93fef33 to a622201

8 builds (for k32w, p6, qpg, telink)
platform target config section 93fef33 a622201 change % change
k32w lock-app k32w061+debug .bss 69196 69196 0 0.0
.data 1864 1864 0 0.0
.text 515140 515140 0 0.0
shell k32w061+debug .bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359572 359572 0 0.0
lighting-app k32w061+se05x+release .bss 78712 78712 0 0.0
.data 1900 1900 0 0.0
.text 613776 613776 0 0.0
p6 lock-app default .bss 67176 67176 0 0.0
.data 2416 2416 0 0.0
.heap 963752 963752 0 0.0
.text 1126088 1126088 0 0.0
qpg lighting-app qpg6100+debug .bss 52416 52416 0 0.0
.data 1000 1000 0 0.0
.text 485044 485044 0 0.0
lock-app qpg6100+debug .bss 51360 51360 0 0.0
.data 956 956 0 0.0
.text 461264 461264 0 0.0
persistent-storage-app qpg6100+debug .bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149900 149900 0 0.0
telink lighting-app tlsr9518adk80d bss 69940 69940 0 0.0
noinit 33216 33216 0 0.0
text 457672 457672 0 0.0
12 builds (for efr32, linux)
platform target config section 93fef33 a622201 change % change
efr32 lighting-app BRD4161A .bss 113684 113684 0 0.0
.data 1752 1752 0 0.0
.text 735816 735816 0 0.0
lock-app BRD4161A .bss 111540 111540 0 0.0
.data 1712 1712 0 0.0
.text 715080 715080 0 0.0
window-app BRD4161A .bss 111852 111852 0 0.0
.data 1716 1716 0 0.0
.text 715876 715876 0 0.0
lighting-app BRD4161A+rpc .bss 130188 130188 0 0.0
.data 1852 1852 0 0.0
.text 723232 723232 0 0.0
linux all-clusters-app debug .bss 50160 50160 0 0.0
.data 978 978 0 0.0
.data.rel.ro 60640 60640 0 0.0
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 134517 134517 0 0.0
.text 1354018 1354018 0 0.0
chip-tool debug .bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 94624 94288 -336 -0.4
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 207396 207220 -176 -0.1
.text 3624245 3620581 -3664 -0.1
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110344 110344 0 0.0
.text 1023714 1023714 0 0.0
ota-requestor-app debug .bss 205696 205696 0 0.0
.data 752 752 0 0.0
.data.rel.ro 25832 25832 0 0.0
.dynamic 592 592 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 128424 128264 -160 -0.1
.text 1142146 1142146 0 0.0
shell debug .bss 16136 16136 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36496 36496 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 76495 76495 0 0.0
.text 599458 599458 0 0.0
tv-app debug .bss 215536 215536 0 0.0
.data 2032 2032 0 0.0
.data.rel.ro 57424 57424 0 0.0
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 152072 151896 -176 -0.1
.text 1454338 1454338 0 0.0
bridge-app debug+rpc .bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27112 27112 0 0.0
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 109740 109740 0 0.0
.text 1064293 1064293 0 0.0
lighting-app debug+rpc .bss 41176 41176 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 53808 53808 0 0.0
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 126897 126897 0 0.0
.text 1262178 1262178 0 0.0
16 builds (for esp32, mbed, nrfconnect)
platform target config section 93fef33 a622201 change % change
esp32 all-clusters-app c3devkit .dram0.bss 58232 58232 0 0.0
.dram0.data 16464 16464 0 0.0
.flash.rodata 198048 198048 0 0.0
.flash.text 874382 874382 0 0.0
.iram0.text 57564 57564 0 0.0
m5stack .dram0.bss 60736 60736 0 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 206808 206808 0 0.0
.flash.text 905451 905451 0 0.0
.iram0.text 125115 125115 0 0.0
mbed all-clusters-app CY8CPROTO_062_4343W+release .bss 179596 179596 0 0.0
.data 5192 5192 0 0.0
.heap 851656 851656 0 0.0
.text 1251216 1251216 0 0.0
lighting-app CY8CPROTO_062_4343W+release .bss 171060 171060 0 0.0
.data 5464 5464 0 0.0
.heap 859920 859920 0 0.0
.text 1219256 1219256 0 0.0
lock-app CY8CPROTO_062_4343W+release .bss 169980 169980 0 0.0
.data 5432 5432 0 0.0
.heap 861032 861032 0 0.0
.text 1197280 1197280 0 0.0
pigweed-app CY8CPROTO_062_4343W+release .bss 11760 11760 0 0.0
.data 4360 4360 0 0.0
.heap 1020328 1020328 0 0.0
.text 103064 103064 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 112136 112136 0 0.0
rodata 97100 97100 0 0.0
text 577204 577204 0 0.0
lock-app nrf52840dk_nrf52840 bss 111208 111208 0 0.0
rodata 93500 93500 0 0.0
text 558764 558764 0 0.0
pigweed-app nrf52840dk_nrf52840 bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 bss 111308 111308 0 0.0
rodata 94700 94700 0 0.0
text 561868 561868 0 0.0
pump-controller-app nrf52840dk_nrf52840 bss 111204 111204 0 0.0
rodata 93476 93476 0 0.0
text 558508 558508 0 0.0
shell nrf52840dk_nrf52840 bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520324 520324 0 0.0
lighting-app nrf52840dk_nrf52840+rpc bss 108376 108376 0 0.0
rodata 87876 87876 0 0.0
text 550396 550396 0 0.0
nrf5340dk_nrf5340_cpuapp bss 113508 113508 0 0.0
rodata 92340 92340 0 0.0
text 506676 506676 0 0.0
lock-app nrf5340dk_nrf5340_cpuapp bss 112580 112580 0 0.0
rodata 88760 88760 0 0.0
text 488228 488228 0 0.0
shell nrf5340dk_nrf5340_cpuapp bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440936 440936 0 0.0

@woody-apple
Copy link
Contributor

/rebase

@pullapprove pullapprove bot requested a review from selissia October 26, 2021 03:31
@github-actions
Copy link

github-actions bot commented Oct 26, 2021

PR #10935: Size comparison from 93fef33 to 99f05e3

5 builds (for p6, qpg, telink)
platform target config section 93fef33 99f05e3 change % change
p6 lock-app default .bss 67176 67184 8 0.0
.data 2416 2416 0 0.0
.heap 963752 963744 -8 -0.0
.text 1126088 1126288 200 0.0
qpg lighting-app qpg6100+debug .bss 52416 52416 0 0.0
.data 1000 1000 0 0.0
.text 485044 485240 196 0.0
lock-app qpg6100+debug .bss 51360 51368 8 0.0
.data 956 956 0 0.0
.text 461264 461460 196 0.0
persistent-storage-app qpg6100+debug .bss 27752 27752 0 0.0
.data 372 372 0 0.0
.text 149900 149900 0 0.0
telink lighting-app tlsr9518adk80d bss 69940 69944 4 0.0
noinit 33216 33216 0 0.0
text 457672 457772 100 0.0

Increases above 1.0% from 93fef33 to 99f05e3:

platform target config section 93fef33 99f05e3 change % change
linux ota-requestor-app debug .bss 205696 208320 2624 1.3
.init_array 512 520 8 1.6
tv-app debug .data.rel.ro 57424 58192 768 1.3
15 builds (for efr32, k32w, linux)
platform target config section 93fef33 99f05e3 change % change
efr32 lighting-app BRD4161A .bss 113684 113692 8 0.0
.data 1752 1752 0 0.0
.text 735816 736008 192 0.0
lock-app BRD4161A .bss 111540 111548 8 0.0
.data 1712 1712 0 0.0
.text 715080 715272 192 0.0
window-app BRD4161A .bss 111852 111860 8 0.0
.data 1716 1716 0 0.0
.text 715876 716172 296 0.0
lighting-app BRD4161A+rpc .bss 130188 130196 8 0.0
.data 1852 1852 0 0.0
.text 723232 723432 200 0.0
k32w lock-app k32w061+debug .bss 69196 69196 0 0.0
.data 1864 1864 0 0.0
.text 515140 515336 196 0.0
shell k32w061+debug .bss 63256 63256 0 0.0
.data 672 672 0 0.0
.text 359572 359572 0 0.0
lighting-app k32w061+se05x+release .bss 78712 78720 8 0.0
.data 1900 1900 0 0.0
.text 613776 613972 196 0.0
linux all-clusters-app debug .bss 50160 50160 0 0.0
.data 978 978 0 0.0
.data.rel.ro 60640 60800 160 0.3
.dynamic 592 592 0 0.0
.got 4088 4088 0 0.0
.init 27 27 0 0.0
.init_array 512 512 0 0.0
.rodata 134517 134517 0 0.0
.text 1354018 1357522 3504 0.3
chip-tool debug .bss 17680 17680 0 0.0
.data 1584 1584 0 0.0
.data.rel.ro 94624 94560 -64 -0.1
.dynamic 592 592 0 0.0
.got 4368 4368 0 0.0
.init 27 27 0 0.0
.init_array 416 416 0 0.0
.rodata 207396 207860 464 0.2
.text 3624245 3649381 25136 0.7
ota-provider-app debug .bss 37440 37440 0 0.0
.data 752 752 0 0.0
.data.rel.ro 24488 24488 0 0.0
.dynamic 592 592 0 0.0
.got 4016 4016 0 0.0
.init 27 27 0 0.0
.init_array 440 440 0 0.0
.rodata 110344 110344 0 0.0
.text 1023714 1024306 592 0.1
ota-requestor-app debug .bss 205696 208320 2624 1.3
.data 752 752 0 0.0
.data.rel.ro 25832 25928 96 0.4
.dynamic 592 592 0 0.0
.got 4144 4144 0 0.0
.init 27 27 0 0.0
.init_array 512 520 8 1.6
.rodata 128424 128840 416 0.3
.text 1142146 1146258 4112 0.4
shell debug .bss 16136 16136 0 0.0
.data 242 242 0 0.0
.data.rel.ro 36496 36496 0 0.0
.dynamic 592 592 0 0.0
.got 3528 3528 0 0.0
.init 27 27 0 0.0
.init_array 336 336 0 0.0
.rodata 76495 76495 0 0.0
.text 599458 599458 0 0.0
tv-app debug .bss 215536 215568 32 0.0
.data 2032 2032 0 0.0
.data.rel.ro 57424 58192 768 1.3
.dynamic 592 592 0 0.0
.got 4408 4408 0 0.0
.init 27 27 0 0.0
.init_array 608 608 0 0.0
.rodata 152072 151896 -176 -0.1
.text 1454338 1455010 672 0.0
bridge-app debug+rpc .bss 51856 51856 0 0.0
.data 976 976 0 0.0
.data.rel.ro 27112 27272 160 0.6
.dynamic 592 592 0 0.0
.got 3952 3952 0 0.0
.init 27 27 0 0.0
.init_array 400 400 0 0.0
.rodata 109740 109740 0 0.0
.text 1064293 1064885 592 0.1
lighting-app debug+rpc .bss 41176 41176 0 0.0
.data 1106 1106 0 0.0
.data.rel.ro 53808 53968 160 0.3
.dynamic 608 608 0 0.0
.got 4112 4112 0 0.0
.init 27 27 0 0.0
.init_array 528 528 0 0.0
.rodata 126897 126897 0 0.0
.text 1262178 1262770 592 0.0
4 builds (for mbed)
platform target config section 93fef33 99f05e3 change % change
mbed all-clusters-app CY8CPROTO_062_4343W+release .bss 179596 179604 8 0.0
.data 5192 5192 0 0.0
.heap 851656 851648 -8 -0.0
.text 1251216 1251712 496 0.0
lighting-app CY8CPROTO_062_4343W+release .bss 171060 171060 0 0.0
.data 5464 5464 0 0.0
.heap 859920 859920 0 0.0
.text 1219256 1219416 160 0.0
lock-app CY8CPROTO_062_4343W+release .bss 169980 169988 8 0.0
.data 5432 5432 0 0.0
.heap 861032 861024 -8 -0.0
.text 1197280 1197448 168 0.0
pigweed-app CY8CPROTO_062_4343W+release .bss 11760 11760 0 0.0
.data 4360 4360 0 0.0
.heap 1020328 1020328 0 0.0
.text 103064 103064 0 0.0
12 builds (for esp32, nrfconnect)
platform target config section 93fef33 99f05e3 change % change
esp32 all-clusters-app c3devkit .dram0.bss 58232 58232 0 0.0
.dram0.data 16464 16464 0 0.0
.flash.rodata 198048 198176 128 0.1
.flash.text 874382 874842 460 0.1
.iram0.text 57564 57564 0 0.0
m5stack .dram0.bss 60736 60744 8 0.0
.dram0.data 32084 32084 0 0.0
.flash.rodata 206808 206928 120 0.1
.flash.text 905451 905919 468 0.1
.iram0.text 125115 125115 0 0.0
nrfconnect lighting-app nrf52840dk_nrf52840 bss 112136 112136 0 0.0
rodata 97100 97200 100 0.1
text 577204 577296 92 0.0
lock-app nrf52840dk_nrf52840 bss 111208 111208 0 0.0
rodata 93500 93600 100 0.1
text 558764 558856 92 0.0
pigweed-app nrf52840dk_nrf52840 bss 51824 51824 0 0.0
rodata 45776 45776 0 0.0
text 339456 339456 0 0.0
pump-app nrf52840dk_nrf52840 bss 111308 111308 0 0.0
rodata 94700 94800 100 0.1
text 561868 561960 92 0.0
pump-controller-app nrf52840dk_nrf52840 bss 111204 111208 4 0.0
rodata 93476 93576 100 0.1
text 558508 558600 92 0.0
shell nrf52840dk_nrf52840 bss 109072 109072 0 0.0
rodata 72536 72536 0 0.0
text 520324 520324 0 0.0
lighting-app nrf52840dk_nrf52840+rpc bss 108376 108380 4 0.0
rodata 87876 87976 100 0.1
text 550396 550488 92 0.0
nrf5340dk_nrf5340_cpuapp bss 113508 113512 4 0.0
rodata 92340 92440 100 0.1
text 506676 506768 92 0.0
lock-app nrf5340dk_nrf5340_cpuapp bss 112580 112584 4 0.0
rodata 88760 88860 100 0.1
text 488228 488320 92 0.0
shell nrf5340dk_nrf5340_cpuapp bss 110056 110056 0 0.0
rodata 67180 67180 0 0.0
text 440936 440936 0 0.0

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

This is not removing the server-side API yet, right? So the ESP32 RENDEZVOUS_MODE_BYPASS thing and whatnot?

@bzbarsky-apple
Copy link
Contributor

Also what about mentions of CONFIG_CHIP_BYPASS_RENDEZVOUS?

@pan-apple
Copy link
Contributor Author

Also what about mentions of CONFIG_CHIP_BYPASS_RENDEZVOUS?

There are some test apps (e.g. echo-requester/responder) that still rely on the server side to support the bypass mode. That'll be another cleanup we'll need to do at some point.

@pan-apple pan-apple merged commit 4eeffb6 into project-chip:master Oct 26, 2021
@pan-apple pan-apple deleted the remove-pairing-without-security branch October 26, 2021 16:12
JasonLiuZhuoCheng pushed a commit to JasonLiuZhuoCheng/connectedhomeip that referenced this pull request Oct 28, 2021
…ip#10935)

* Remove controller API for device pairing using test keys

* remove from Android/JNI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants