-
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
controller/python: add device attestation revocation support #37134
base: master
Are you sure you want to change the base?
controller/python: add device attestation revocation support #37134
Conversation
Added the required changes in the python binding. Added the cli option to matter testing framework for setting the dac revocation set path.
Changed Files
|
PR #37134: Size comparison from e6e9614 to df97121 Full report (56 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
PR #37134: Size comparison from e6e9614 to 5cf1981 Full report (71 builds for bl602, bl702, bl702l, cc13x4_26x4, cc32xx, cyw30739, efr32, esp32, linux, nrfconnect, nxp, psoc6, qpg, stm32, telink, tizen)
|
@@ -2018,7 +2018,7 @@ class ChipDeviceController(ChipDeviceControllerBase): | |||
''' | |||
|
|||
def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, adminVendorId: int, catTags: typing.List[int] = [ | |||
], paaTrustStorePath: str = "", useTestCommissioner: bool = False, fabricAdmin: typing.Optional[FabricAdmin.FabricAdmin] = None, name: str = '', keypair: typing.Optional[p256keypair.P256Keypair] = None): | |||
], paaTrustStorePath: str = "", dacRevocationSetPath: str = "", useTestCommissioner: bool = False, fabricAdmin: typing.Optional[FabricAdmin.FabricAdmin] = None, name: str = '', keypair: typing.Optional[p256keypair.P256Keypair] = None): |
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.
would you mind moving this to the end of the arguments list so it doesn't break anyone if they were using ordered arguments?
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.
+1
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.
Conditional approval
@@ -2018,7 +2018,7 @@ class ChipDeviceController(ChipDeviceControllerBase): | |||
''' | |||
|
|||
def __init__(self, opCredsContext: ctypes.c_void_p, fabricId: int, nodeId: int, adminVendorId: int, catTags: typing.List[int] = [ | |||
], paaTrustStorePath: str = "", useTestCommissioner: bool = False, fabricAdmin: typing.Optional[FabricAdmin.FabricAdmin] = None, name: str = '', keypair: typing.Optional[p256keypair.P256Keypair] = None): | |||
], paaTrustStorePath: str = "", dacRevocationSetPath: str = "", useTestCommissioner: bool = False, fabricAdmin: typing.Optional[FabricAdmin.FabricAdmin] = None, name: str = '', keypair: typing.Optional[p256keypair.P256Keypair] = None): | |||
super().__init__( |
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.
My approval is with the assumption:
- Ordering comment above it addressed
- controller/python: add device attestation revocation support #37134 lands first so people can replicate your test
const char * paaTrustStorePath, bool useTestCommissioner, | ||
bool enableServerInteractions, CASEAuthTag * caseAuthTags, uint32_t caseAuthTagLen, | ||
chip::python::pychip_P256Keypair * operationalKey) | ||
const char * paaTrustStorePath, const char * dacRevocationSetPath, |
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.
Please do not add this argument and let's configure the commissioner instance separately
chip::Credentials::DeviceAttestationRevocationDelegate * dacRevocationDelegate = | ||
GetAttestationRevocationDelegate(dacRevocationSetPath); |
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 is what should be moved to a new API in ChipDeviceController
chip::Credentials::DeviceAttestationRevocationDelegate * dacRevocationDelegate = | ||
GetAttestationRevocationDelegate(dacRevocationSetPath); | ||
chip::Credentials::DeviceAttestationVerifier * dacVerifier = | ||
chip::Credentials::GetDefaultDACVerifier(testingRootStore, dacRevocationDelegate); |
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.
Now I see that coupling the DAC revocation delegate to the default DAC verifier is what causes you to have to do this. It should still be possible to UPDATE the config of the DefaultDACVerifier, without needing to initially provide an instance of DAC revocation delegate. Suggest passing nullptr here.
Testing
NOTE: Used the
dac-provider-test-vectors
from #37122