All-Devices Providers#
This directory contains all-devices-app providers that implement or wrap core
Matter SDK provider interfaces.
They provide clean separation between the application data model, POSIX test simulator overrides (such as dynamic CLI options), and platform hardware delegates.
Provider Overview#
Provider Class |
Base SDK Interface |
Description |
|---|---|---|
Handles Device Attestation Credentials (DAC, PAI, CD, and DAC private key signing). In POSIX test/simulation environments, supports loading test credentials from a JSON vector file ( |
||
Provides fixed labels, user labels, supported locales, and calendar types across dynamic endpoints in |
||
Wraps the underlying platform |
DAC Test Vector JSON Schema#
When supplying a custom test vector file via --dac_provider <path>, the JSON
file is parsed by TestHarnessDACProvider
(src/app/tests/suites/credentials/TestHarnessDACProvider.cpp).
The supported JSON keys are:
JSON Key |
Type |
Description |
|---|---|---|
|
Hex String |
DER-encoded Device Attestation Certificate (DAC). |
|
Hex String |
32-byte P-256 ECDSA private key scalar used to sign the device attestation challenge. |
|
Hex String (Optional) |
65-byte uncompressed P-256 public key corresponding to |
|
Hex String |
DER-encoded Product Attestation Intermediate (PAI) certificate. |
|
Hex String |
CMS-signed DER-encoded Certification Declaration (CD) payload. |
|
Hex String (Optional) |
Optional firmware information payload. |
|
Integer (Optional) |
Expected Product ID matching the test vector. |
|
String (Optional) |
Human-readable description of the test scenario. |
|
Boolean (Optional) |
Indicates whether the test vector is expected to pass or fail attestation. |
Pre-Existing Test Vectors#
Pre-existing test vector JSON files are available in the Matter SDK repository
under:
credentials/development/attestation/
Examples:
Test Credentials for VID=0xFFF1 PID=0x8000:
credentials/development/attestation/TestCredentials-FFF1-8000.jsonTest Credentials for VID=0xFFF2 PID=0x8001:
credentials/development/attestation/TestCredentials-FFF2-8001.json
Example invocation:
./out/linux-x64-all-devices-clang/all-devices-app \
--dac_provider credentials/development/attestation/TestCredentials-FFF1-8000.json \
--vendor-id 0xFFF1 \
--product-id 0x8000
Production vs. Simulation Usage#
1. Device Attestation Credentials (DAC)#
In real commercial products, DAC private keys must never be stored in plaintext JSON files or memory accessible to user space.
Simulation / Test Harnesses (POSIX): The POSIX entrypoint (
posix/main.cpp) initializesAllDevicesExampleDACProviderwithAppOptions::GetConfig().dacProviderto allow test runners (such as WOCA and Python certification scripts) to supply test vectors dynamically.Embedded MCUs (ESP32, Silicon Labs, Nordic): Hardware platforms initialize a
FactoryDataProvider(which reads from secure flash or NVM) and register it at boot.Commercial Linux Gateways: Real products replace
AllDevicesExampleDACProviderwith a provider that delegates signing directly to a Hardware Secure Element (e.g.,ATECC608, NXPSE050), TPM, or platform Secure Enclave / TrustZone (TrustyDACProvider).
2. Device Instance Info#
AllDevicesExampleDeviceInstanceInfoProviderImpl demonstrates the decorator
pattern: it intercepts basic info queries to allow CLI customization during
development while forwarding hardware-level queries (such as rotating device ID,
serial numbers, and manufacturing dates) to the underlying platform delegate.