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

Use node ID provided in the NOC #8826

Merged

Conversation

pan-apple
Copy link
Contributor

@pan-apple pan-apple commented Aug 5, 2021

Problem

Node ID and Fabric ID are assigned via operational certificates. Currently, the code is inferring these IDs from the received messages.

Change overview

Get node ID and fabric ID (combined as PeerID aka Operational ID) from the node operational certificate.
This change resulted in a lot of other cleanup

  1. Addition of new fabric to Fabric Table
  2. Use of fabric ID and node ID in SecureSessionMgr
  3. Not sending source and destination node ID in encrypted messages
  4. Controller and Server usage of Fabric Table to store the new fabrics

Testing

CASE, PASE and IM tests run as part of CI.
Also tested end to end flow using chip-tool, Python controller and iOS controller app.

@pan-apple pan-apple force-pushed the cleanup-nodeid-assigment branch from 929504f to b52b72f Compare August 6, 2021 00:19
@bzbarsky-apple
Copy link
Contributor

Due to changes in operational-credentials-cluster, ZAP files are regenerated, and hence changes in the generated code.

If possible, please break those out into a separate changeset.

@pan-apple
Copy link
Contributor Author

Due to changes in operational-credentials-cluster, ZAP files are regenerated, and hence changes in the generated code.

If possible, please break those out into a separate changeset.

I tried splitting it into two PRs. That was before I got it to a working state. Let me try again and see if it could be split.
The main issue is that some of the OpCreds cluster commands were not using fabric index correctly. And, this PR updates FabricTable implementation quite a bit. That spiraled down into updating OpCreds cluster.

Copy link
Contributor

@tcarmelveilleux tcarmelveilleux left a comment

Choose a reason for hiding this comment

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

Technical review complete. This is a great step in the right direction. Minor nits present and some follow-up issues were called-out as needing to be filed/fixed.

@pan-apple pan-apple changed the title Use node ID and fabric ID provided in the NOC Use node ID provided in the NOC Aug 11, 2021
@bzbarsky-apple bzbarsky-apple merged commit 6a36256 into project-chip:master Aug 11, 2021
@pan-apple pan-apple deleted the cleanup-nodeid-assigment branch August 11, 2021 21:49
nikita-s-wrk pushed a commit to nikita-s-wrk/connectedhomeip that referenced this pull request Sep 23, 2021
* Use node ID and fabric ID provided in the NOC

* update CHIPTool for modified opcreds cluster

* remove more checks for NodeID

* split cluster changes from the current PR

* rename functions and variables

* address review comments

* Fix build issues
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.

7 participants