Skip to content
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

Detect provisional in cmd and attributes, also zap regen. #37692

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 25 additions & 2 deletions examples/camera-app/camera-common/camera-app.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1883,12 +1883,14 @@ cluster OperationalCredentials = 62 {
fabric_id fabricID = 3;
node_id nodeID = 4;
char_string<32> label = 5;
optional octet_string<85> vidVerificationStatement = 6;
fabric_idx fabricIndex = 254;
}

fabric_scoped struct NOCStruct {
fabric_sensitive octet_string noc = 1;
nullable fabric_sensitive octet_string icac = 2;
octet_string noc = 1;
nullable octet_string icac = 2;
optional octet_string vvsc = 3;
fabric_idx fabricIndex = 254;
}

Expand Down Expand Up @@ -1963,6 +1965,23 @@ cluster OperationalCredentials = 62 {
octet_string rootCACertificate = 0;
}

request struct SetVidVerificationStatementRequest {
optional vendor_id vendorID = 0;
optional octet_string vidVerificationStatement = 1;
optional octet_string vvsc = 2;
}

request struct SignVidVerificationRequestRequest {
fabric_idx fabricIndex = 0;
octet_string<32> clientChallenge = 1;
}

response struct SignVidVerificationResponse = 14 {
fabric_idx fabricIndex = 0;
int8u fabricBindingVersion = 1;
octet_string signature = 2;
}

/** Sender is requesting attestation information from the receiver. */
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
/** Sender is requesting a device attestation certificate from the receiver. */
Expand All @@ -1979,6 +1998,10 @@ cluster OperationalCredentials = 62 {
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
/** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */
fabric command access(invoke: administer) SetVidVerificationStatement(SetVidVerificationStatementRequest): DefaultSuccess = 12;
/** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */
command access(invoke: administer) SignVidVerificationRequest(SignVidVerificationRequestRequest): SignVidVerificationResponse = 13;
}

/** The Group Key Management Cluster is the mechanism by which group keys are managed. */
Expand Down
27 changes: 25 additions & 2 deletions examples/chef/devices/rootnode_rainsensor_a7aa5d7738.matter
Original file line number Diff line number Diff line change
Expand Up @@ -1333,12 +1333,14 @@ cluster OperationalCredentials = 62 {
fabric_id fabricID = 3;
node_id nodeID = 4;
char_string<32> label = 5;
optional octet_string<85> vidVerificationStatement = 6;
fabric_idx fabricIndex = 254;
}

fabric_scoped struct NOCStruct {
fabric_sensitive octet_string noc = 1;
nullable fabric_sensitive octet_string icac = 2;
octet_string noc = 1;
nullable octet_string icac = 2;
optional octet_string vvsc = 3;
fabric_idx fabricIndex = 254;
}

Expand Down Expand Up @@ -1413,6 +1415,23 @@ cluster OperationalCredentials = 62 {
octet_string rootCACertificate = 0;
}

request struct SetVidVerificationStatementRequest {
optional vendor_id vendorID = 0;
optional octet_string vidVerificationStatement = 1;
optional octet_string vvsc = 2;
}

request struct SignVidVerificationRequestRequest {
fabric_idx fabricIndex = 0;
octet_string<32> clientChallenge = 1;
}

response struct SignVidVerificationResponse = 14 {
fabric_idx fabricIndex = 0;
int8u fabricBindingVersion = 1;
octet_string signature = 2;
}

/** Sender is requesting attestation information from the receiver. */
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
/** Sender is requesting a device attestation certificate from the receiver. */
Expand All @@ -1429,6 +1448,10 @@ cluster OperationalCredentials = 62 {
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
/** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */
fabric command access(invoke: administer) SetVidVerificationStatement(SetVidVerificationStatementRequest): DefaultSuccess = 12;
/** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */
command access(invoke: administer) SignVidVerificationRequest(SignVidVerificationRequestRequest): SignVidVerificationResponse = 13;
}

/** The Group Key Management Cluster is the mechanism by which group keys are managed. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1333,12 +1333,14 @@ cluster OperationalCredentials = 62 {
fabric_id fabricID = 3;
node_id nodeID = 4;
char_string<32> label = 5;
optional octet_string<85> vidVerificationStatement = 6;
fabric_idx fabricIndex = 254;
}

fabric_scoped struct NOCStruct {
fabric_sensitive octet_string noc = 1;
nullable fabric_sensitive octet_string icac = 2;
octet_string noc = 1;
nullable octet_string icac = 2;
optional octet_string vvsc = 3;
fabric_idx fabricIndex = 254;
}

Expand Down Expand Up @@ -1413,6 +1415,23 @@ cluster OperationalCredentials = 62 {
octet_string rootCACertificate = 0;
}

request struct SetVidVerificationStatementRequest {
optional vendor_id vendorID = 0;
optional octet_string vidVerificationStatement = 1;
optional octet_string vvsc = 2;
}

request struct SignVidVerificationRequestRequest {
fabric_idx fabricIndex = 0;
octet_string<32> clientChallenge = 1;
}

response struct SignVidVerificationResponse = 14 {
fabric_idx fabricIndex = 0;
int8u fabricBindingVersion = 1;
octet_string signature = 2;
}

/** Sender is requesting attestation information from the receiver. */
command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0;
/** Sender is requesting a device attestation certificate from the receiver. */
Expand All @@ -1429,6 +1448,10 @@ cluster OperationalCredentials = 62 {
command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10;
/** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */
command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11;
/** This command SHALL be used to update any of the accessing fabric's associated VendorID, VidVerificatioNStatement or VVSC (Vendor Verification Signing Certificate). */
fabric command access(invoke: administer) SetVidVerificationStatement(SetVidVerificationStatementRequest): DefaultSuccess = 12;
/** This command SHALL be used to request that the server authenticate the fabric associated with the FabricIndex given. */
command access(invoke: administer) SignVidVerificationRequest(SignVidVerificationRequestRequest): SignVidVerificationResponse = 13;
}

/** The Group Key Management Cluster is the mechanism by which group keys are managed. */
Expand Down
6 changes: 6 additions & 0 deletions scripts/py_matter_idl/matter_idl/lint/lint_rules_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ def DecodeClusterFromXml(element: xml.etree.ElementTree.Element):
if 'optional' in attr.attrib and attr.attrib['optional'] == 'true':
continue

if 'apiMaturity' in attr.attrib and attr.attrib['apiMaturity'] == 'provisional':
continue

# when introducing access controls, the content of attributes may either be:
# <attribute ...>myName</attribute>
# or
Expand All @@ -112,6 +115,9 @@ def DecodeClusterFromXml(element: xml.etree.ElementTree.Element):
if 'optional' in cmd.attrib and cmd.attrib['optional'] == 'true':
continue

if 'apiMaturity' in cmd.attrib and cmd.attrib['apiMaturity'] == 'provisional':
continue

required_commands.append(RequiredCommand(
name=cmd.attrib["name"], code=parseNumberString(cmd.attrib['code'])))

Expand Down
Loading