-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Allow for split commissioner / admin topology #14261
Merged
msandstedt
merged 9 commits into
project-chip:master
from
msandstedt:13501-allow-split-commissioner-admin
Jan 27, 2022
Merged
Allow for split commissioner / admin topology #14261
msandstedt
merged 9 commits into
project-chip:master
from
msandstedt:13501-allow-split-commissioner-admin
Jan 27, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
msandstedt
force-pushed
the
13501-allow-split-commissioner-admin
branch
from
January 25, 2022 21:00
bfa240f
to
7539d35
Compare
It is possible to implement Matter commissioning such that a commissioner node is not on any fabric, and delegates operational communication and invocation of the CommissioningComplete command to a different administrator node. In this configuration, the commissioner only communicates by PASE and may not ever have received operational credentials. To support such a configuration, this commit amends the commissioner to accept initialization to the kUndefinedFabricIndex. In this configuration, the commissioner does not bootstrap itself with any credentials, and is capable of conducting the commissioning procedure until these are needed. When it is found that credentials aren't available, the commissioner gracefully discontinues commissioning. Because CASESessionManager is using fabric association for operational discovery, discontinuation of the commissioning sequence occurs at attempted operational discovery. Fixes project-chip#13501
msandstedt
force-pushed
the
13501-allow-split-commissioner-admin
branch
from
January 25, 2022 21:02
7539d35
to
c34cf0b
Compare
pullapprove
bot
requested review from
anush-apple,
balducci-apple,
Byungjoo-Lee,
bzbarsky-apple,
carol-apple,
cecille,
chrisdecenzo,
chshu,
chulspro,
Damian-Nordic,
dhrishi,
electrocucaracha,
emargolis,
erjiaqing,
franck-apple,
gjc13,
hawk248,
jelderton,
jepenven-silabs,
jmartinez-silabs,
LuDuda,
lzgrablic02 and
mspang
January 25, 2022 21:03
PR #14261: Size comparison from de95567 to 354c8f3 Increases (1 build for linux)
Full report (15 builds for cyw30739, efr32, k32w, linux, p6, qpg, telink)
|
bzbarsky-apple
approved these changes
Jan 25, 2022
Co-authored-by: Boris Zbarsky <[email protected]>
PR #14261: Size comparison from de95567 to 8bec479 Increases above 0.2%:
Increases (36 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
Decreases (1 build for linux)
Full report (42 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
Previously, chip-tool had reused fabric ID as fabric index, and was specifying both during commissioner initialization. This is brittle though because it is not practical for chip-tool to always know the fabric index ahead of time before initialization. This commit changes the commissioner to no longer accept a fabric index for initialization. Instead, the operational key pair and NOC chain are optionally passed. If present, these are added or merged into the fabric table. Merge works by identifying an existing, matching fabric in the table by comparing root public key and fabric ID. Once the new certificates are merged, the fabric index is extracted from the fabric table.
tcarmelveilleux
approved these changes
Jan 27, 2022
woody-apple
approved these changes
Jan 27, 2022
PR #14261: Size comparison from 8d75845 to daa3113 Increases (17 builds for cyw30739, esp32, k32w, linux, nrfconnect, p6, qpg, telink)
Full report (32 builds for cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, p6, qpg, telink)
|
wbschiller
approved these changes
Jan 27, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work!
saurabhst
approved these changes
Jan 27, 2022
selissia
pushed a commit
to selissia/connectedhomeip
that referenced
this pull request
Jan 28, 2022
It is possible to implement Matter commissioning such that a commissioner node is not on any fabric, and delegates operational communication and invocation of the CommissioningComplete command to a different administrator node. In this configuration, the commissioner only communicates by PASE and may not ever have received operational credentials. However, such an architecture is not currently supported, as commissioner instances must self-commission to a fabric as a part of initialization. To support such a split commissioner / admin architecture, this amends the commissioner to accept initialization without operational credentials. In this configuration, the commissioner is capable of conducting the commissioning procedure until these are needed. When it is found that credentials aren't available, the commissioner gracefully discontinues commissioning. As part of this change set, fabric index is also no longer specified as part of controller or commissioner initialization. chip-tool had previously specified a fabric index and reused this as fabric ID. That is brittle though because it is not always practical for chip-tool to know the fabric index ahead of time before initialization. Instead, the operational key pair and NOC chain are optionally passed to commissioner / controller initialization. If passed, these are added or merged into the fabric table. Merge works by identifying an existing, matching fabric by comparing root public key and fabric ID. Once the new certificates are merged or added, the controller / commissioner extracts the fabric index from the fabric table. Fixes project-chip#13501
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Problem
It is possible to implement Matter commissioning such that a commissioner node is not on any fabric, and delegates operational communication and invocation of the CommissioningComplete command to a different
administrator node. In this configuration, the commissioner only communicates by PASE and may not ever have received operational credentials. However, the sdk does not allow for such an architecture as commissioner instances must currently self-commission to a fabric as a part of initialization.
Change overview
To support such a split commissioner / admin architecture, this amends the commissioner to accept initialization without operational credentials. In this configuration, the commissioner is capable of conducting the commissioning procedure until these are needed. When it is found that credentials aren't available, the commissioner gracefully discontinues commissioning.
Fixes #13501
Testing
All current integration and unit tests pass. To provide coverage for the new non-fabric-associated commissioner configuration, an additional null-fabric-commissioner identity has been added to chip-tool. When selected, and given an operational credentials delegate that specifies an admin subject for the AddNOC command, this can commission up until operational discovery and operational channel communication.