-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Implement VID Verification in OpCreds cluster (2/2) #38469
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 VID Verification in OpCreds cluster (2/2) #38469
Conversation
- Add VVS/VVSC storage in PersistentStorageOpCertStore - Finished all attributes and commands in Opcreds cluster - Bumped Opcreds revision to 2 - Added all necessary testability features to matter_testing support for list subscriptions - NOTE: this includes project-chip#38445 temporarily until merged Testing done: - Integration tests through TC-OPCREDS-3.9 - More unit tests to follow, but coverage through TC-OPCREDS-3.9 is near exhaustive.
|
PR #38469: Size comparison from 7ecc28c to d258a5e Increases above 0.2%:
Full report (72 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
|
PR #38469: Size comparison from 56a0c43 to 3af1a87 Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
…to add-set-vid-verify-statement
|
PR #38469: Size comparison from 54ff531 to 1997d59 Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
- Fabric table was incorrectly read, which could lead to issues when the fabric table has more fields than before.
|
PR #38469: Size comparison from 54ff531 to f7d74a8 Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
src/app/clusters/operational-credentials-server/operational-credentials-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/operational-credentials-server/operational-credentials-server.cpp
Outdated
Show resolved
Hide resolved
src/app/clusters/operational-credentials-server/operational-credentials-server.cpp
Show resolved
Hide resolved
|
PR #38469: Size comparison from 54ff531 to 5f7f79c Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
cecille
left a comment
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.
if this is for OPCREDS-3.8, does the test do this part? * Ensure that only accessing fabric's VidVerificationStatement can be set/clear
src/python_testing/matter_testing_infrastructure/chip/testing/matter_testing.py
Show resolved
Hide resolved
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.
Follow ups on test comments are OK. Expect maybe for clarifying the test number.
|
PR #38469: Size comparison from 574cc67 to 5258cff Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
|
PR #38469: Size comparison from 574cc67 to 66dee3d Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
- The scripts did not factory reset properly so they were impacted by lack of hermeticity, causing a failure of CGEN-2.9 after unrelated master changes. - The method to find "commissioner's fabric" before some fabric removal was wrong in CGEN-2.9. Fixed the method to use CurrentFabricIndex
This reverts commit 66dee3d.
This reverts commit b188e36.
|
PR #38469: Size comparison from 1b5ddd2 to 300da1f Increases above 0.2%:
Full report (3 builds for cc32xx, stm32)
|
|
PR #38469: Size comparison from 1b5ddd2 to 0611d9b Increases above 0.2%:
Full report (75 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
| ReturnErrorOnFailure(BasicVidVerificationAssumptionsAreMet(fabricIndex)); | ||
| VerifyOrReturnError(vvsc.empty() || vvsc.size() <= Credentials::kMaxCHIPCertLength, CHIP_ERROR_INVALID_ARGUMENT); | ||
|
|
||
| // Can't try to set a VVSC if ICAC present. |
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.
The API did not document that this is the responsibility of the callee to check.
In general, it would be nice if the cluster implementation could do these checks instead of every opcert store backend having to do them... Not sure how viable that is.
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.
Will do
| ByteSpan vidVerificationStatement) | ||
| { | ||
| ReturnErrorOnFailure(BasicVidVerificationAssumptionsAreMet(fabricIndex)); | ||
| VerifyOrReturnError(vidVerificationStatement.empty() || |
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.
Again, it would be nice if this size check were just in the cluster...
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.
I can do that for sure. I was trying to cover more unit tests in the opcerstore since the cluster is not unit testable yet, due to legacy design, but it has an integration test that may suffice.
| static StorageKeyName FabricNOC(FabricIndex fabric) { return StorageKeyName::Formatted("f/%x/n", fabric); } | ||
| static StorageKeyName FabricICAC(FabricIndex fabric) { return StorageKeyName::Formatted("f/%x/i", fabric); } | ||
| static StorageKeyName FabricRCAC(FabricIndex fabric) { return StorageKeyName::Formatted("f/%x/r", fabric); } | ||
| static StorageKeyName FabricVVSC(FabricIndex fabric) { return StorageKeyName::Formatted("f/%x/vvvc", fabric); } |
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.
Why vvvc, not vvsc? Worth documenting if there is a good reason.
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.
It's a typo, will fix.
* Implement VID Verification in OpCreds cluster (2/2) - Add VVS/VVSC storage in PersistentStorageOpCertStore - Finished all attributes and commands in Opcreds cluster - Bumped Opcreds revision to 2 - Added all necessary testability features to matter_testing support for list subscriptions - NOTE: this includes project-chip#38445 temporarily until merged Testing done: - Integration tests through TC-OPCREDS-3.9 - More unit tests to follow, but coverage through TC-OPCREDS-3.9 is near exhaustive. * Restyled by clang-format * Restyled by autopep8 * Restyled by isort * Fix TC-CGEN-2.9 - Fabric table was incorrectly read, which could lead to issues when the fabric table has more fields than before. * Address review comments from cecille@ * Restyled by clang-format * Renamed TC-OPCREDS-3.9 to TC-OPCREDS-3.8 * Added comments to AttributeMatcher * Renamed test in TC_OPCREDS_3_8.py * Restyled by autopep8 * More logging in TC-CGEN-2.9 * Restyled by autopep8 * Restyled by isort * Add a verification against some node ID to diagnose CI * Restyled by clang-format * Fix hermeticity of TC-CGEN scripts in CI - The scripts did not factory reset properly so they were impacted by lack of hermeticity, causing a failure of CGEN-2.9 after unrelated master changes. - The method to find "commissioner's fabric" before some fabric removal was wrong in CGEN-2.9. Fixed the method to use CurrentFabricIndex * Add logging * Restyled by autopep8 * Revert "Restyled by clang-format" This reverts commit 66dee3d. * Revert "Add a verification against some node ID to diagnose CI" This reverts commit b188e36. * Use fix-cgen-2.9 * Update cgen --------- Co-authored-by: Restyled.io <[email protected]>
- Apply follow-ups requested by @bzbarsky-apple in project-chip#38469: - Fix vvvc/vvsc persisten storage key typo - Move the burden of ICAC/VVSC interlock to Fabric table - Document why Fabrics attribute is always reported after VVS/VVSC are touched during fail-safe - Fix documentation of classes to match above. - Minor fix of UpdateNOC handling when VVS/VVSC is involved Testing done: - Added exhaustive cases of fail-safe handling for VVS/VVSC to TestFabricTable.
* Small bugfix and test improvements for VID Verification - Apply follow-ups requested by @bzbarsky-apple in #38469: - Fix vvvc/vvsc persisten storage key typo - Move the burden of ICAC/VVSC interlock to Fabric table - Document why Fabrics attribute is always reported after VVS/VVSC are touched during fail-safe - Fix documentation of classes to match above. - Minor fix of UpdateNOC handling when VVS/VVSC is involved Testing done: - Added exhaustive cases of fail-safe handling for VVS/VVSC to TestFabricTable. * Restyled by whitespace * Restyled by clang-format * Add more coverage for storage usage * Minor comment fix * Restyled by whitespace * Restyled by clang-format * Apply suggestions from code review Co-authored-by: C Freeman <[email protected]> * Address review comments for VVS/VVSC tests * Restyled by clang-format --------- Co-authored-by: Restyled.io <[email protected]> Co-authored-by: C Freeman <[email protected]>
Changes
for list subscriptions
Testing
exhaustive.