-
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
Annotation of access control metadata to two clusters #11542
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,32 +19,35 @@ limitations under the License. | |
|
||
<struct name="FabricDescriptor"> | ||
<cluster code="0x003E"/> | ||
<item name="FabricIndex" type="INT8U"/> | ||
<item name="RootPublicKey" type="OCTET_STRING" length="65"/> | ||
<item name="VendorId" type="INT16U"/> <!-- Change INT16U to new type VendorID #2395 --> | ||
<item name="FabricId" type="FABRIC_ID"/> | ||
<item name="NodeId" type="NODE_ID"/> | ||
<item name="Label" type="CHAR_STRING" length="32"/> | ||
<item fieldId="0" name="FabricIndex" type="fabric_idx"/> | ||
<item fieldId="1" name="RootPublicKey" type="OCTET_STRING" length="65"/> | ||
<item fieldId="2" name="VendorId" type="INT16U"/> <!-- Change INT16U to new type VendorID #2395 --> | ||
<item fieldId="3" name="FabricId" type="FABRIC_ID"/> | ||
<item fieldId="4" name="NodeId" type="NODE_ID"/> | ||
<item fieldId="5" name="Label" type="CHAR_STRING" length="32"/> | ||
</struct> | ||
|
||
<enum name="NodeOperationalCertStatus" type="ENUM8"> | ||
<cluster code="0x003E"/> | ||
<item name="SUCCESS" value="0x00"/> | ||
<item name="InvalidPublicKey" value="0x01"/> | ||
<item name="InvalidNodeOpId" value="0x02"/> | ||
<item name="InvalidNOC" value="0x03"/> | ||
<item name="MissingCsr" value="0x04"/> | ||
<item name="TableFull" value="0x05"/> | ||
<item name="InsufficientPrivilege" value="0x08"/> | ||
<item name="FabricConflict" value="0x09"/> | ||
<item name="LabelConflict" value="0x0a"/> | ||
<item name="InvalidFabricIndex" value="0x0b"/> | ||
<item fieldId="0" name="SUCCESS" value="0x00"/> | ||
<item fieldId="1" name="InvalidPublicKey" value="0x01"/> | ||
<item fieldId="2" name="InvalidNodeOpId" value="0x02"/> | ||
<item fieldId="3" name="InvalidNOC" value="0x03"/> | ||
<item fieldId="4" name="MissingCsr" value="0x04"/> | ||
<item fieldId="5" name="TableFull" value="0x05"/> | ||
<item fieldId="6" name="MissingACL" value="0x06"/> | ||
<item fieldId="7" name="MissingIpk" value="0x07"/> | ||
<item fieldId="8" name="InsufficientPrivilege" value="0x08"/> | ||
<item fieldId="9" name="FabricConflict" value="0x09"/> | ||
<item fieldId="10" name="LabelConflict" value="0x0a"/> | ||
<item fieldId="11" name="InvalidFabricIndex" value="0x0b"/> | ||
</enum> | ||
|
||
<struct name="NOCStruct"> | ||
<cluster code="0x003E"/> | ||
<item name="FabricIndex" type="INT8U"/> | ||
<item name="NOC" type="OCTET_STRING"/> | ||
<item fieldId="0" name="FabricIndex" type="fabric_idx"/> | ||
<item fieldId="1" name="NOC" type="OCTET_STRING" length="400" isFabricSensitive="true"/> | ||
<item fieldId="2" name="ICAC" type="OCTET_STRING" length="400" isFabricSensitive="true" isNullable="true"/> | ||
</struct> | ||
|
||
<cluster> | ||
|
@@ -54,16 +57,38 @@ limitations under the License. | |
<define>OPERATIONAL_CREDENTIALS_CLUSTER</define> | ||
<description>This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics.</description> | ||
|
||
<attribute side="server" code="0x0001" define="FABRICS" type="ARRAY" entryType="FabricDescriptor" length="320" writable="false" optional="false">fabrics list</attribute> | ||
<attribute side="server" code="0x0002" define="SUPPORTED_FABRICS" type="INT8U" writable="false" optional="false">SupportedFabrics</attribute> | ||
<attribute side="server" code="0x0003" define="COMMISSIONED_FABRICS" type="INT8U" writable="false" optional="false">CommissionedFabrics</attribute> | ||
<attribute side="server" code="0x0000" define="NOCs" type="ARRAY" entryType="NOCStruct" length="320" writable="false" optional="false"> | ||
<description>NOCs</description> | ||
<access op="read" privilege="administer"/> | ||
<access modifier="fabric-scoped"/> | ||
</attribute> | ||
<attribute side="server" code="0x0001" define="FABRICS" type="ARRAY" entryType="FabricDescriptor" length="320" writable="false" optional="false"> | ||
<description>Fabrics</description> | ||
<access op="read" privilege="view"/> | ||
<access modifier="fabric-scoped"/> | ||
</attribute> | ||
<attribute side="server" code="0x0002" define="SUPPORTED_FABRICS" type="INT8U" writable="false" optional="false"> | ||
<description>SupportedFabrics</description> | ||
<access op="read" privilege="view"/> | ||
</attribute> | ||
<attribute side="server" code="0x0003" define="COMMISSIONED_FABRICS" type="INT8U" writable="false" optional="false"> | ||
<description>CommissionedFabrics</description> | ||
<access op="read" privilege="view"/> | ||
</attribute> | ||
<!-- 400 = 400 bytes for root cert --> | ||
<attribute side="server" code="0x0004" define="TRUSTED_ROOTS" type="ARRAY" entryType="OCTET_STRING" length="400" writable="false" optional="false">TrustedRootCertificates</attribute> | ||
<attribute side="server" code="0x0005" define="CURRENT_FABRIC_INDEX" type="fabric_idx" writable="false" optional="false">CurrentFabricIndex</attribute> | ||
<attribute side="server" code="0x0004" define="TRUSTED_ROOTS" type="ARRAY" entryType="OCTET_STRING" length="400" writable="false" optional="false"> | ||
Comment on lines
78
to
+79
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The 400 length for an array here doesn't make sense There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is the topic that needs group resolution :) |
||
<description>TrustedRootCertificates</description> | ||
<access op="read" privilege="view"/> | ||
</attribute> | ||
<attribute side="server" code="0x0005" define="CURRENT_FABRIC_INDEX" type="fabric_idx" writable="false" optional="false"> | ||
<description>CurrentFabricIndex</description> | ||
<access op="read" privilege="view"/> | ||
</attribute> | ||
|
||
<command source="client" code="0x00" name="AttestationRequest" optional="false"> | ||
<description>Sender is requesting attestation information from the receiver.</description> | ||
<arg name="AttestationNonce" type="OCTET_STRING"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="server" code="0x01" name="AttestationResponse" optional="false"> | ||
|
@@ -75,6 +100,7 @@ limitations under the License. | |
<command source="client" code="0x02" name="CertificateChainRequest" optional="false"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did the comment refer to the already existing response?
|
||
<description>Sender is requesting a device attestation certificate from the receiver.</description> | ||
<arg name="CertificateType" type="INT8U"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="server" code="0x03" name="CertificateChainResponse" optional="false"> | ||
|
@@ -85,6 +111,7 @@ limitations under the License. | |
<command source="client" code="0x04" name="OpCSRRequest" optional="false"> | ||
<description>Sender is requesting a certificate signing request (CSR) from the receiver.</description> | ||
<arg name="CSRNonce" type="OCTET_STRING"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<!-- TODO: Fix to match chip-spec:#3346 --> | ||
|
@@ -101,39 +128,45 @@ limitations under the License. | |
<arg name="IPKValue" type="OCTET_STRING"/> | ||
<arg name="CaseAdminNode" type="NODE_ID"/> | ||
<arg name="AdminVendorId" type="INT16U"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="client" code="0x07" name="UpdateNOC" response="NOCResponse" optional="false"> | ||
<description>Sender is requesting to update the node operational certificates.</description> | ||
<arg name="NOCValue" type="OCTET_STRING"/> | ||
<arg name="ICACValue" type="OCTET_STRING" optional="true"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="server" code="0x08" name="NOCResponse" optional="false"> | ||
<description>Response to AddNOC or UpdateNOC commands.</description> | ||
<arg name="StatusCode" type="INT8U"/> | ||
<arg name="FabricIndex" type="INT8U"/> | ||
<arg name="FabricIndex" type="fabric_idx"/> | ||
<arg name="DebugText" type="CHAR_STRING"/> | ||
Comment on lines
143
to
145
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need the field IDs for these args There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. None of the cluster xml files include a fieldId in the attributes. To make sure I understand the requirement, is this format correct?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The last commit made the above assumption. If incorrect, we can rollback the changes and work on determining the right format. |
||
</command> | ||
|
||
<command source="client" code="0x09" name="UpdateFabricLabel" response="NOCResponse" optional="false"> | ||
<description>This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute.</description> | ||
<arg name="Label" type="CHAR_STRING" length="32"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="client" code="0x0a" name="RemoveFabric" response="NOCResponse" optional="false"> | ||
<description>This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data.</description> | ||
<arg name="FabricIndex" type="INT8U"/> | ||
<arg name="FabricIndex" type="fabric_idx"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="client" code="0x0b" name="AddTrustedRootCertificate" optional="false"> | ||
<description>This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation.</description> | ||
<arg name="RootCertificate" type="OCTET_STRING"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
<command source="client" code="0x0c" name="RemoveTrustedRootCertificate" optional="false"> | ||
<description>This command SHALL remove a Trusted Root CA Certificate, provided as its CHIP Certificate representation.</description> | ||
<arg name="TrustedRootIdentifier" type="OCTET_STRING"/> | ||
<access op="invoke" privilege="administer"/> | ||
</command> | ||
|
||
</cluster> | ||
|
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
isFabricSensitive
an alias for the equivalent of anaccess
tag?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 was suggested on Nov 1st: https://csamembers.slack.com/archives/C02FTN42KEE/p1635797498010800?thread_ts=1635795804.009300&cid=C02FTN42KEE