-
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
[Android] Commissioner attestation delegate should be able to override success and failure #23173
[Android] Commissioner attestation delegate should be able to override success and failure #23173
Conversation
…d on client/user; Commissioner attestation delegate should be able to override success
PR #23173: Size comparison from 2c9cd92 to 11b5724 Increases (4 builds for bl602, cc13x2_26x2, telink)
Decreases (5 builds for bl602, bl702, cc13x2_26x2, esp32)
Full report (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from bc6b438 to 5ed16c0 Increases (4 builds for bl702, cc13x2_26x2, telink)
Decreases (5 builds for cc13x2_26x2, nrfconnect, psoc6, qpg)
Full report (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from bc6b438 to d36248a Increases (3 builds for cc13x2_26x2, esp32)
Decreases (10 builds for bl602, bl702, cc13x2_26x2, psoc6, telink)
Full report (38 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from 9292923 to e5972ae Increases (3 builds for bl702, cc13x2_26x2, esp32)
Decreases (8 builds for bl602, cc13x2_26x2, esp32, nrfconnect, psoc6, telink)
Full report (48 builds for bl602, bl702, cc13x2_26x2, cyw30739, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
@panliming-tuya |
src/controller/java/src/chip/devicecontroller/DeviceAttestationDelegate.java
Outdated
Show resolved
Hide resolved
We do not need to dynamically pull anything from DCL in SDK. The device attestation process in AutoCommissioner is already async: the DeviceAttestationVerifier is called asynchronously. However, you are right that See
The Device Attestation Verifier is what could be bridged to Java. Overall, the flow could be something like:
The general concept:
Regarding the CD trust store, there is already a set of Well-known keys. The CdWellKnownKeysTrustStore used by default should be good enough for a while. Overall, I agree that these Java APIs are cumbersome. However, unless someone is willing to help rewrite them to "flow-through" with a frameworked design that works for everyone, we have to keep going incrementally. |
PR #23173: Size comparison from 04c20f6 to 9d915df Increases (3 builds for cc13x2_26x2, telink)
Decreases (8 builds for cc13x2_26x2, esp32, psoc6, telink)
Full report (42 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from ff845ba to 993b5cf Increases (3 builds for bl602, psoc6)
Decreases (7 builds for bl702, cyw30739, k32w, nrfconnect, psoc6, telink)
Full report (46 builds for bl602, bl702, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from ac82038 to 2b094c8 Increases (7 builds for bl702, esp32, nrfconnect, psoc6, telink)
Decreases (5 builds for bl602, bl702, psoc6, telink)
Full report (42 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
This PR has been updated to implement the DeviceAttestationDelegate only (Post-allow), this part is fully aligned with iOS side. I create issue #24297 to track the follow-up work which implement a DeviceAttestationVerifier in Java to allow user to overwrite the DefaultDACVerifier |
PR #23173: Size comparison from 7f668cd to 9ef054d Increases (5 builds for cc13x2_26x2, esp32, telink)
Decreases (8 builds for bl602, cc13x2_26x2, esp32, nrfconnect, psoc6, telink)
Full report (53 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from 2ba9901 to e2448ec Increases (5 builds for cyw30739, esp32, psoc6, telink)
Decreases (8 builds for bl602, bl702, psoc6, telink)
Full report (43 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
PR #23173: Size comparison from cb430db to 8b14201 Increases (6 builds for cc13x2_26x2, esp32, psoc6, telink)
Decreases (11 builds for bl602, bl702, cc13x2_26x2, nrfconnect, psoc6, qpg, telink)
Full report (47 builds for bl602, bl702, cc13x2_26x2, cyw30739, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
852806a
to
9e6211b
Compare
PR #23173: Size comparison from e7acdf7 to 9e6211b Increases (10 builds for bl702, esp32, k32w, nrfconnect, psoc6, qpg, telink)
Decreases (2 builds for esp32, telink)
Full report (54 builds for bl602, bl702, cc13x2_26x2, cyw30739, efr32, esp32, k32w, linux, mbed, nrfconnect, psoc6, qpg, telink)
|
…e success and failure (project-chip#23173) * [Android] Added mechanism to override device attestation failure based on client/user; Commissioner attestation delegate should be able to override success * platform jar keep name of method parameters * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format * Restyled by gn * fix copyright * fix and modify comments * Use setters instead of adding parameters to methods * fix NetworkCredentials NPE * Do not expose deviceController raw pointer * add sample * Create AttestationTrustStoreBridge when we know we have PAA certs. * fix jni method * fix certs loss of scope and add some comments * implement destructor * fix destructor crash * revoke vscode setting change * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format * fix conflict * add unit of failSafeExpiryTimeout * add sample code * Restyled by whitespace * Restyled by google-java-format * Restyled by clang-format * fix comments * remove android attestation trust store * restyle * Fix compile error in java-matter-controller Co-authored-by: Restyled.io <[email protected]> Co-authored-by: panliming-tuya <[email protected]> Co-authored-by: Yufeng Wang <[email protected]>
Issue Being Resolved
The issues #22318 #16681 have been fixed on the Darwin, but not on Android.
Therefore, I implemented the features on the Android based on the implementation of the Darwin.
Change overview
Implementation of the following two PRs in Android platform.
#22321
#17028
DeviceAttestationDelegate
add an optional override to use the new flowAttestationDeviceInfo
object to hold a copy of the device informationTesting
I modified the vendor id of all-cluster-app and flashed M5 Stack with the changes.