-
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 partial validation of DAC and CD (for external cloud or custom app based validation) #21725
Conversation
…station verification logic to allow cloud verifier to leverage it
…station verification logic to allow cloud verifier to leverage it
src/credentials/attestation_verifier/DefaultDeviceAttestationVerifier.h
Outdated
Show resolved
Hide resolved
Fast tracking, given this has had enough time for review |
} | ||
|
||
exit: | ||
onCompletion->mCall(onCompletion->mContext, attestationError); // TODO: is this check getting done? |
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.
Can you revisit this TODO?
namespace chip { | ||
namespace Credentials { | ||
|
||
class PartialDACVerifier : public DefaultDACVerifier |
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.
This file is missing docs and comments about the limitations
// As per specifications section 11.22.5.1. Constant RESP_MAX | ||
constexpr size_t kMaxResponseLength = 900; | ||
|
||
void PartialDACVerifier::VerifyAttestationInformation(const DeviceAttestationVerifier::AttestationInfo & info, |
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.
This method is missing comments about the limitations
@@ -202,8 +203,13 @@ CHIP_ERROR AndroidOperationalCredentialsIssuer::CallbackGenerateNOCChain(const B | |||
jbyteArray javaCsr; | |||
JniReferences::GetInstance().N2J_ByteArray(env, csr.data(), csr.size(), javaCsr); | |||
|
|||
P256PublicKey pubkey; | |||
ReturnErrorOnFailure(VerifyCertificateSigningRequest(csr.data(), csr.size(), pubkey)); | |||
// TODO: verify signed by DAC creds? |
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.
Is this TODO intended to remain?
|
||
if (useCallback) | ||
{ | ||
// if we are assigning a callback, then make the device commissioner delegate verification to the cloud |
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.
There is no cloud involved. Suggest removing the word cloud
if (useCallback) | ||
{ | ||
// if we are assigning a callback, then make the device commissioner delegate verification to the cloud | ||
wrapper->Controller()->SetDeviceAttestationVerifier(wrapper->GetPartialDACVerifier()); |
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.
This forces usage of "PartialDACVerifier" for auto-commissioner all the time, which may override a prior call to SetDeviceAttestationVerifier
. This is not explained in the API contract of the method
…app based validation) (project-chip#21725) * Draft: Allow partial validation of DAC and CD (when PAA list is not local) * Draft: Allow partial validation of DAC and CD (when PAA list is not local) * Move cloud attestation to a separate class, re-structure default attestation verification logic to allow cloud verifier to leverage it * straggler * address feedback * address feedback * straggler * fix builds, integration tests
When PAA list is not local, clients will want to perform as much local validation as possible.
Problem
Change overview
Testing