SACM Working Group | H. Birkholz |
Internet-Draft | Fraunhofer SIT |
Intended status: Standards Track | J. Fitzgerald-McKay |
Expires: April 26, 2019 | Department of Defense |
C. Schmidt | |
The MITRE Corporation | |
D. Waltermire | |
NIST | |
October 23, 2018 |
Concise Software Identifiers
draft-ietf-sacm-coswid-07
This document defines a concise representation of ISO/IEC 19770-2:2015 Software Identification (SWID) tags that are interoperable with the XML schema definition of ISO/IEC 19770-2:2015 and augmented for application in Constrained-Node Networks. Next to the inherent capability of SWID tags to express arbitrary context information, Concise SWID (CoSWID) tags support the definition of additional semantics via well-defined data definitions incorporated by extension points.
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."
This Internet-Draft will expire on April 26, 2019.
Copyright (c) 2018 IETF Trust and the persons identified as the document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Simplified BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Simplified BSD License.
SWID tags have several use-applications including but not limited to:
SWID tags, as defined in ISO-19770-2:2015 [SWID], provide a standardized XML-based record format that identifies and describes a specific release of a software component. Different software components, and even different releases of a particular software component, each have a different SWID tag record associated with them. SWID tags are meant to be flexible and able to express a broad set of metadata about a software component.
While there are very few required fields in SWID tags, there are many optional fields that support different use scenarios. While a SWID tag consisting of only required fields might be a few hundred bytes in size, a tag containing many of the optional fields can be many orders of magnitude larger. Thus, real-world instances of SWID tags can be fairly large, and the communication of SWID tags in use-applications such as those described earlier can cause a large amount of data to be transported. This can be larger than acceptable for constrained devices and networks. Concise SWID (CoSWID) tags significantly reduce the amount of data transported as compared to a typical SWID tag. This reduction is enabled through the use of CBOR, which maps human-readable labels of that content to more concise integer labels (indices). The use of CBOR to express SWID information in CoSWID tags allows both CoSWID and SWID tags to be part of an enterprise security solution for a wider range of endpoints and environments.
In addition to defining the format of a SWID tag record, ISO/IEC 19770-2:2015 defines requirements concerning the SWID tag lifecycle. Specifically, when a software component is installed on an endpoint, that product’s SWID tag is also installed. Likewise, when the product is uninstalled or replaced, the SWID tag is deleted or replaced, as appropriate. As a result, ISO/IEC 19770-2:2015 describes a system wherein there is a correspondence between the set of installed software components on an endpoint, and the presence of the correspondingsponding SWID tags for these components on that endpoint. CoSWIDs share the same lifecycle requirements as a SWID tag.
The following is an excerpt (with some modifications and reordering) from NIST Interagency Report (NISTIR) 8060: Guidelines for the Creation of Interoperable SWID Tags [SWID-GUIDANCE], which describes the tag types used within the lifecycle defined in ISO-19770-2:2015.
+------------+ v | Installation Product Product Product Product Media -> Installed -> Patched -> Upgraded -> Removed Deployed Corpus Primary Primary xPrimary xPrimary Supplemental Supplemental xSupplemental xSuplemental Patch xPatch Primary Supplemental
Figure 1: Use of Tag Types in the Software Lifecycle
Note: While not fully illustrated in the figure, supplemental tags can be associated with any corpus, primary, or patch tag to provide additional metadata about an installer, installed software, or installed patch respectively.
Each of the different SWID and CoSWID tag types provide different sets of information. For example, a “corpus tag” is used to describe a software component’s installation image on an installation media, while a “patch tag” is meant to describe a patch that modifies some other software component.
This document defines the CoSWID format, a more concise representation of SWID information in the Concise Binary Object Representation (CBOR) [RFC7049]. This is described via the Concise Data Definition Language (CDDL) [I-D.ietf-cbor-cddl]. The resulting CoSWID data definition is interoperable with the XML schema definition of ISO-19770-2:2015 [SWID]. The vocabulary, i.e., the CDDL names of the types and members used in the CoSWID data definition, are mapped to more concise labels represented as small integer values. The names used in the CDDL data definition and the mapping to the CBOR representation using integer labels is based on the vocabulary of the XML attribute and element names defined in ISO/IEC 19770-2:2015.
The corresponding CoSWID data definition includes two kinds of augmentation.
The key words “MUST”, “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”, “RECOMMENDED”, “NOT RECOMMENDED”, “MAY”, and “OPTIONAL” in this document are to be interpreted as described in RFC 2119, BCP 14 [RFC2119].
The following is a CDDL representation for a CoSWID tag. This CDDL represetation is intended to be parallel to the XML schema definition in the ISO/IEC 19770-2:2015 [SWID] specification, allowing both SWID and CoSWID tags to represent a common set of SWID information and to support all SWID tag use cases. To achieve this end, the CDDL representation includes every SWID tag field and attribute. The CamelCase notation used in the XML schema definition is changed to a hyphen-separated notation (e.g. ResourceCollection is named resource-collection in the CoSWID data definition). This deviation from the original notation used in the XML representation reduces ambiguity when referencing certain attributes in corresponding textual descriptions. An attribute referred by its name in CamelCase notation explicitly relates to XML SWID tags, an attribute referred by its name in hyphen-separated notation explicitly relates to CoSWID tags. This approach simplifies the composition of further work that reference both XML SWID and CoSWID documents.
Human-readable names of members in the CDDL data definition are mapped to integer indices via a block of rules at the bottom of the definition. The 67 character strings of the SWID vocabulary that would have to be stored or transported in full if using the original vocabulary are replaced.
In CBOR, an array is encoded using bytes that identify the array, and the array’s length or stop point (see [RFC7049]). To make items that support 1 or more values, the following CDDL notion is used.
_name_ = (_label_: _data_ / [ 2* _data_ ])
The CDDL above allows for a more effecient CBOR encoding of the data when a single value is used by avoiding the need to first encode the array. An array is used for two or more values. This modeling pattern is used frequently in the CoSWID CDDL data definition in such cases.
The following subsections describe the different parts of the CoSWID model.
The CDDL for the main concise-software-identity object is as follows:
concise-software-identity = { global-attributes, tag-id, tag-version, ? corpus, ? patch, ? supplemental, swid-name, ? software-version, ? version-scheme, ? media, ? software-meta-entry, ? entity-entry, ? link-entry, ? ( payload-entry / evidence-entry ), ? any-element-entry, } tag-id = (0: text) swid-name = (1: text) entity-entry = (2: entity / [ 2* entity ]) evidence-entry = (3: evidence) link-entry = (4: link / [ 2* link ]) software-meta-entry = (5: software-meta / [ 2* software-meta ]) payload-entry = (6: payload) any-element-entry = (7: any-element-map / [ 2* any-element-map ]) corpus = (8: bool) patch = (9: bool) media = (10: text) supplemental = (11: bool) tag-version = (12: integer) software-version = (13: text) version-scheme = (14: text)
The following describes each child item of the concise-software-identity object model.
The operational model for SWID and CoSWID tags introduced in Section 1.1. The following rules can be used to determine the type of a CoSWID tag.
A tag that does not match one of the above rules MUST be considered an invalid, unsupported tag type.
If a patch modifies the version number or the descriptive metadata of the software, then a new tag representing these details SHOULD be installed, and the old tag SHOULD be removed.
The global-attributes group provides a list of items including an optional language definition to support the processing of text-string values and an unbounded set of any-attribute items allowing for additional items to be provided as a general point of extension in the model.
The CDDL for the global-attributes is as follows:
global-attributes = ( ? lang, * any-attribute, ) label = text / int any-attribute = ( label => text / int / [ 2* text ] / [ 2* int ] ) lang = (15: text)
The following describes each child item of this object.
The CDDL for the any-element-entry object is as follows:
any-element-map = { global-attributes, * label => any-element-map / [ 2* any-element-map ], } any-element-entry = (7: any-element-map / [ 2* any-element-map ])
The following describes each child item of this object.
The CDDL for the entity object is as follows:
entity = { global-attributes, entity-name, ? reg-id, role, ? thumbprint, extended-data, } any-uri = text extended-data = (30: any-element-map / [ 2* any-element-map ]) entity-name = (31: text) reg-id = (32: any-uri) role = (33: text / [2* text]) thumbprint = (34: hash-entry)
The following describes each child item of this object.
The CDDL for the link object is as follows:
link = { global-attributes, ? artifact, href, ? media ? ownership, rel, ? media-type, ? use, } artifact = (37: text) href = (38: any-uri) media = (10: any-uri) ownership = (39: "shared" / "private" / "abandon") rel = (40: text) media-type = (41: text) use = (42: "optional" / "required" / "recommended")
The following describes each child item of this object.
The CDDL for the software-meta object is as follows:
software-meta = { global-attributes, ? activation-status, ? channel-type, ? colloquial-version, ? description, ? edition, ? entitlement-data-required, ? entitlement-key, ? generator, ? persistent-id, ? product, ? product-family, ? revision, ? summary, ? unspsc-code, ? unspsc-version, } activation-status = (43: text) channel-type = (44: text) colloquial-version = (45: text) description = (46: text) edition = (47: text) entitlement-data-required = (48: bool) entitlement-key = (49: text) generator = (50: text) persistent-id = (51: text) product = (52: text) product-family = (53: text) revision = (54: text) summary = (55: text) unspsc-code = (56: text) unspsc-version = (57: text)
The following describes each child item of this object.
CoSWID add explicit support for the representation of hash entries using algorithms that are registered at the Named Information Hash Algorithm Registry via the hash-entry member (label 58).
hash-entry = (58: [ hash-alg-id: int, hash-value: bstr ] )
The number used as a value for hash-alg-id MUST refer an ID in the Named Information Hash Algorithm Registry; other hash algorithms MUST NOT be used. The hash-value MUST represent the raw hash value of the hashed resource generated using the hash algorithm indicated by the hash-alg-id.
A list of items both used in evidence (discovered by an inventory process) and payload (installed in a system entity) content of a CoSWID tag document to structure and differentiate the content of specific CoSWID tag types. Potential content includes directories, files, processes, resources or firmwares.
The CDDL for the resource-collection group is as follows:
resource-collection = ( ? directory-entry, ? file-entry, ? process-entry, ? resource-entry ) directory = { filesystem-item, path-elements, } file = { filesystem-item, ? size, ? file-version, ? hash-entry, } process = { global-attributes, process-name, ? pid, } resource = { global-attributes, type, } filesystem-item = ( global-attributes, ? key, ? location, fs-name, ? root, ) directory-entry = (16: directory / [ 2* directory ]) file-entry = (17: file / [ 2* file ]) process-entry = (18: process / [ 2* process ]) resource-entry = (19: resource / [ 2* resource ]) size = (20: integer) file-version = (21: text) key = (22: bool) location = (23: text) fs-name = (24: text) root = (25: text) path-elements = (26: { * file-entry, * directory-entry, } ) process-name = (27: text) pid = (28: integer) type = (29: text)
The following describes each child item or group for these groups.
The CDDL for the payload object is as follows:
payload = { global-attributes, resource-collection, * $$payload-extension }
The following describes each child item of this object.
The CDDL for the evidence object is as follows:
evidence = { global-attributes, resource-collection, ? date, ? device-id, * $$evidence-extension } date = (35: time) device-id = (36: text)
The following describes each child item of this object.
In order to create a valid CoSWID document the structure of the corresponding CBOR message MUST adhere to the following CDDL data definition.
concise-software-identity = { global-attributes, tag-id, tag-version, ? corpus, ? patch, ? supplemental, swid-name, ? software-version, ? version-scheme, ? media, ? software-meta-entry, entity-entry, ? link-entry, ? ( payload-entry // evidence-entry ), * $$coswid-extension } any-uri = text label = text / int any-attribute = ( label => text / int / [ 2* text ] / [ 2* int ] ) global-attributes = ( ? lang, * any-attribute, ) resource-collection = ( ? directory-entry, ? file-entry, ? process-entry, ? resource-entry ) file = { filesystem-item, ? size, ? file-version, ? hash-entry, } filesystem-item = ( global-attributes, ? key, ? location, fs-name, ? root, ) directory = { filesystem-item, path-elements, } process = { global-attributes, process-name, ? pid, } resource = { global-attributes, type, } entity = { global-attributes, entity-name, ? reg-id, role, ? thumbprint, * $$entity-extension, } evidence = { global-attributes, resource-collection, ? date, ? device-id, * $$evidence-extension } link = { global-attributes, ? artifact, href, ? media ? ownership, rel, ? media-type, ? use, } software-meta = { global-attributes, ? activation-status, ? channel-type, ? colloquial-version, ? description, ? edition, ? entitlement-data-required, ? entitlement-key, ? generator, ? persistent-id, ? product, ? product-family, ? revision, ? summary, ? unspsc-code, ? unspsc-version, } payload = { global-attributes, resource-collection, * $$payload-extension } tag-id = (0: text) swid-name = (1: text) entity-entry = (2: entity / [ 2* entity ]) evidence-entry = (3: evidence) link-entry = (4: link / [ 2* link ]) software-meta-entry = (5: software-meta / [ 2* software-meta ]) payload-entry = (6: payload) corpus = (8: bool) patch = (9: bool) media = (10: [ + [ media-expression, ? [ media-operation, media-expression, ] ] ]) media-operation = text media-expression = media-environment / [ media-prefix, media-environment, media-attribute, media-value, ] media-prefix = text media-environment = text media-attribute = text media-value = text supplemental = (11: bool) tag-version = (12: integer) software-version = (13: text) version-scheme = (14: version-schemes / extended-value) version-schemes = multipartnumeric / multipartnumeric-suffix / alphanumeric / decimal / semver multipartnumeric = 1 multipartnumeric-suffix = 2 alphanumeric = 3 decimal = 4 semver = 16384 lang = (15: text) directory-entry = (16: directory / [ 2* directory ]) file-entry = (17: file / [ 2* file ]) process-entry = (18: process / [ 2* process ]) resource-entry = (19: resource / [ 2* resource ]) size = (20: integer) file-version = (21: text) key = (22: bool) location = (23: text) fs-name = (24: text) root = (25: text) path-elements = (26: { * file-entry, * directory-entry, } ) process-name = (27: text) pid = (28: integer) type = (29: text) entity-name = (31: text) reg-id = (32: any-uri) role = (33: roles / extended-value / [ 2* roles / extended-value ] ) extended-value = text / uint roles= aggregator / distributor / licensor / software-creator / tag-creator aggregator=0 distributor=1 licensor=2 software-creator=3 tag-creator=4 thumbprint = (34: [ hash-alg-id: int, hash-value: bstr, ] ) date = (35: time) device-id = (36: text) artifact = (37: text) href = (38: any-uri) ownership = (39: shared / private / abandon / extended-value ) shared=0 private=1 abandon=2 rel = (40: rels / extended-value ) rels = ancestor / component / feature / installationmedia / packageinstaller / parent / patches / requires / see-also / supersedes / rel-supplemental ancestor=0 component=1 feature=2 installationmedia=3 packageinstaller=4 parent=5 patches=6 requires=7 see-also=8 supersedes=9 rel-supplemental=10 media-type = (41: text) use = (42: optional / required / recommended / extended-value ) optional=0 required=1 recommended=2 activation-status = (43: text) channel-type = (44: text) colloquial-version = (45: text) description = (46: text) edition = (47: text) entitlement-data-required = (48: bool) entitlement-key = (49: text) generator = (50: text) persistent-id = (51: text) product = (52: text) product-family = (53: text) revision = (54: text) summary = (55: text) unspsc-code = (56: text) unspsc-version = (57: text) hash-entry = (58: [ hash-alg-id: int, hash-value: bstr, ] )
The following are an initial set of values for use in the version-scheme item for the version schemes defined in the ISO/IEC 19770-2:2015 [SWID] specification. Index value in parens indicates the index value to use in the version-scheme item.
The values above are registered in the “SWID/CoSWID Version Schema Values” registry defined in section Section 4.1. Additional valid values will likely be registered over time in this registry.
The following table indicates the index value to use for the entity roles defined in the ISO/IEC 19770-2:2015 [SWID] specification.
Index | Role Name |
---|---|
0 | Reserved |
1 | tagCreator |
2 | softwareCreator |
3 | aggregator |
4 | distributor |
5 | licensor |
The values above are registered in the “SWID/CoSWID Entity Role Values” registry defined in section Section 4.2. Additional valid values will likely be registered over time. Additionally, the index values 226 through 255 have been reserved for private use.
This document will include requests to IANA:
This document has a number of IANA considerations, as described in the following subsections.
This document uses unsigned 16-bit index values to version-scheme item values. The initial set of version-scheme values are derived from the textual version scheme names defined in the ISO/IEC 19770-2:2015 specification [SWID].
This document defines a new a new registry entitled “SWID/CoSWID Version Schema Values”. Future registrations for this registry are to be made based on [RFC8126] as follows:
Range | Registration Procedures |
---|---|
0-16383 | Standards Action |
16384-32767 | Specification Required |
32768-65535 | Reserved for Private Use |
Initial registrations for the SWID/CoSWID Version Schema Values registry are provided below.
Index | Role Name | Specification |
---|---|---|
0 | Reserved | |
1 | multipartnumeric | See Section 3.1 |
2 | multipartnumeric+suffix | See Section 3.1 |
3 | alphanumeric | See Section 3.1 |
4 | decimal | See Section 3.1 |
5-16383 | Unassigned | |
16384 | semver | [SEMVER] |
16385-32767 | Unassigned | |
32768-65535 | Reserved for Private Use |
This document uses unsigned 8-bit index values to represent entity-role values. The initial set of Entity roles are derived from the textual role names defined in the ISO/IEC 19770-2:2015 specification [SWID].
This document defines a new a new registry entitled “SWID/CoSWID Entity Role Values”. Future registrations for this registry are to be made based on [RFC8126] as follows:
Range | Registration Procedures |
---|---|
0-31 | Standards Action |
32-127 | Specification Required |
128-255 | Reserved for Private Use |
Initial registrations for the SWID/CoSWID Entity Role Values registry are provided below.
Index | Role Name | Specification |
---|---|---|
0 | Reserved | |
1 | tagCreator | See Section 3.2 |
2 | softwareCreator | See Section 3.2 |
3 | aggregator | See Section 3.2 |
4 | distributor | See Section 3.2 |
5 | licensor | See Section 3.2 |
6-49 | Unassigned | |
50-225 | Unassigned | |
225-255 | Reserved for Private Use |
Type name: application
Subtype name: swid+cbor
Required parameters: none
Optional parameters: none
Encoding considerations: Must be encoded as using [RFC7049]. See RFC-AAAA for details.
Security considerations: See Section 5 of RFC-AAAA.
Interoperability considerations: Applications MAY ignore any key value pairs that they do not understand. This allows backwards compatible extensions to this specification.
Published specification: RFC-AAAA
Applications that use this media type: The type is used by Software asset management systems, Vulnerability assessment systems, and in applications that use remote integrity verification.
Fragment identifier considerations: Fragment identification for application/swid+cbor is supported by using fragment identifiers as specified by RFC-AAAA. [Section to be defined]
Additional information:
Magic number(s): first five bytes in hex: da 53 57 49 44
File extension(s): coswid
Macintosh file type code(s): none
Macintosh Universal Type Identifier code: org.ietf.coswid conforms to public.data
Person & email address to contact for further information: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Intended usage: COMMON
Restrictions on usage: None
Author: Henk Birkholz <henk.birkholz@sit.fraunhofer.de>
Change controller: IESG
IANA is requested to assign a CoAP Content-Format ID for the CoSWID media type in the “CoAP Content-Formats” sub-registry, from the “IETF Review or IESG Approval” space (256..999), within the “CoRE Parameters” registry [RFC7252]:
Media type | Encoding | ID | Reference |
---|---|---|---|
application/swid+cbor | - | TBDcf | RFC-AAAA |
IANA is requested to allocate a tag in the CBOR Tags Registry, preferably with the specific value requested:
Tag | Data Item | Semantics |
---|---|---|
1398229316 | map | Concise Software Identifier (CoSWID) [RFC-AAAA] |
SWID and CoSWID tags contain public information about software components and, as such, do not need to be protected against disclosure on an endpoint. Similarly, SWID tags are intended to be easily discoverable by applications and users on an endpoint in order to make it easy to identify and collect all of an endpoint’s SWID tags. As such, any security considerations regarding SWID tags focus on the application of SWID tags to address security challenges, and the possible disclosure of the results of those applications.
A signed SWID tag whose signature has been validated can be relied upon to be unchanged since it was signed. If the SWID tag was created by the software provider, is signed, and the software provider can be authenticated as the originator of the signature, then the tag can be considered authoritative. In this way, an authoritative SWID tag contains information about a software product provided by the maintainer of the product, who is expected to be an expert in their own product. Thus, authoritative SWID tags can be trusted to represent authoritative information about the software product. Having an authoritative SWID tag can be useful when the information in the tag needs to be trusted, such as when the tag is being used to convey reference integrity measurements for software components. By contrast, the data contained in unsigned tags cannot be trusted to be unmodified.
SWID tags are designed to be easily added and removed from an endpoint along with the installation or removal of software components. On endpoints where addition or removal of software components is tightly controlled, the addition or removal of SWID tags can be similarly controlled. On more open systems, where many users can manage the software inventory, SWID tags may be easier to add or remove. On such systems, it may be possible to add or remove SWID tags in a way that does not reflect the actual presence or absence of corresponding software components. Similarly, not all software products automatically install SWID tags, so products may be present on an endpoint without providing a corresponding SWID tag. As such, any collection of SWID tags cannot automatically be assumed to represent either a complete or fully accurate representation of the software inventory of the endpoint. However, especially on devices that more strictly control the ability to add or remove applications, SWID tags are an easy way to provide an preliminary understanding of that endpoint’s software inventory.
Any report of an endpoint’s SWID tag collection provides information about the software inventory of that endpoint. If such a report is exposed to an attacker, this can tell them which software products and versions thereof are present on the endpoint. By examining this list, the attacker might learn of the presence of applications that are vulnerable to certain types of attacks. As noted earlier, SWID tags are designed to be easily discoverable by an endpoint, but this does not present a significant risk since an attacker would already need to have access to the endpoint to view that information. However, when the endpoint transmits its software inventory to another party, or that inventory is stored on a server for later analysis, this can potentially expose this information to attackers who do not yet have access to the endpoint. As such, it is important to protect the confidentiality of SWID tag information that has been collected from an endpoint, not because those tags individually contain sensitive information, but because the collection of SWID tags and their association with an endpoint reveals information about that endpoint’s attack surface.
Finally, both the ISO-19770-2:2015 XML schema definition and the Concise SWID data definition allow for the construction of “infinite” SWID tags or SWID tags that contain malicious content with the intent if creating non-deterministic states during validation or processing of SWID tags. While software product vendors are unlikely to do this, SWID tags can be created by any party and the SWID tags collected from an endpoint could contain a mixture of vendor and non-vendor created tags. For this reason, tools that consume SWID tags ought to treat the tag contents as potentially malicious and should employ input sanitizing on the tags they ingest.
Changes from version 06 to version 07:
Changes from version 05 to version 06:
Changes from version 04 to version 05:
Changes from version 03 to version 04:
Changes from version 02 to version 03:
Changes from version 01 to version 02:
Changes from version 00 to version 01:
Changes since adopted as a WG I-D -00:
Changes from version 00 to version 01:
Changes from version 01 to version 02:
NOTE: this appendix is subject to revision based potential convergence of:
The ISO-19770-2:2015 specification of SWID tags assumes the existence of a file system a software component is installed and stored in. In the case of constrained-node networks [RFC7228] or network equipment this assumption might not apply. Concise software instances in the form of (modular) firmware are often stored directly on a block device that is a hardware component of the constrained-node or network equipment. Multiple differentiable block devices or segmented block devices that contain parts of modular firmware components (potentially each with their own instance version) are already common at the time of this writing.
The optional attributes that annotate a firmware package address specific characteristics of pieces of firmware stored directly on a block-device in contrast to software deployed in a file-system. In essence, trees of relative path-elements expressed by the directory and file structure in CoSWID tags are typically unable to represent the location of a firmware on a constrained-node (small thing). The composite nature of firmware and also the actual composition of small things require a set of attributes to address the identification of the correct component in a composite thing for each individual piece of firmware. A single component also potentially requires a number of distinct firmware parts that might depend on each other (versions). These dependencies can be limited to the scope of the component itself or extend to the scope of a larger composite device. In addition, it might not be possible (or feasible) to store a CoSWID tag document (permanently) on a small thing along with the corresponding piece of firmware.
To address the specific characteristics of firmware, the extension points $$payload-extension and $$evidence-extension are used to allow for an additional type of resource description—firmware-entry—thereby increasing the self-descriptiveness and flexibility of CoSWID. The optional use of the extension points $$payload-extension and $$evidence-extension in respect to firmware MUST adhere to the following CDDL data definition.
<CODE BEGINS> $$payload-extension //= (suit.manifest-entry,) $$evidence-extension //= (suit.manifest-entry,) suit-manifest = { suit.manifest-version, suit.digest-info, suit.text-reference, suit.nonce, suit.sequence-number, ? suit.pre-condition, ? suit.post-condition, ? suit.directives, ? suit.resources, ? suit.processors, ? suit.targets, ? suit.extensions, } suit.manifest-entry = (59: suit-manifest / [ 2* suit-manifest ] ) suit.manifest-version = (60: 1) suit.digest-info = (61: [ suit.digest-algorithm, ? suit.digest-parameters, ] ) suit.digest-algorithm = uint suit.digest-parameters = bytes suit.text-reference = (62: bytes) suit.nonce = (63: bytes) suit.sequence-number = (64: uint) suit.pre-condition = (suit.id-condition // suit.time-condition // suit.image-condition // suit.custom-condition) suit.post-condition = (suit.image-condition // suit.custom-condition) suit.id-condition = (65: [ + [ suit.vendor / suit.class / suit.device, suit.uuid, ] ] ) suit.vendor = 0 suit.class = 1 suit.device = 2 suit.uuid = bstr .size 16 suit.time-condition = (66: [ + [ suit.install-after / suit.best-before, suit.timestamp, ] ] ) suit.install-after = 0 suit.best-before = 1 suit.timestamp = uint .size 8 suit.image-condition = (67: [ + [ suit.current-content / suit.not-current-content, suit.storage-identifier, ? suit.digest, ] ] ) suit.current-content = 0 suit.not-current-content = 1 suit.digest = bytes suit.storage-identifier = bytes suit.custom-condition = (68: [ nint, suit.condition-parameters, ] ) suit.condition-parameters = bytes suit.directives = (69: { + int => bytes } ) suit.resources = (70: [ + [ suit.resource-type, suit.uri-list, suit.digest, suit.onode, ? suit.size, ] ] ) suit.resource-type = suit.payload / suit.dependency / suit.key / suit.alias suit.payload = 0 suit.dependency = 1 suit.key = 2 suit.alias = 3 suit.uri-list = { + int => text } suit.size = uint suit.onode = bytes suit.processors = (71: [ + [ suit.decrypt / suit.decompress / suit.undiff / suit.relocate / suit.unrelocate, suit.parameters, suit.inode, suit.onode, ] ] ) suit.decrypt = 0 suit.decompress = 1 suit.undiff = 2 suit.relocate = 3 suit.unrelocate = 4 suit.parameters = bytes suit.inode = bytes suit.targets = (72: [ + [ suit.component-id, suit.storage-identifier, suit.inode, ? suit.encoding, ] ] ) suit.component-id = [ + bytes ] suit.encoding = bytes suit.extensions = (73: { + int => bytes } ) <CODE ENDS>
The members of the firmware group that constitutes the content of the firmware-entry is based on the metadata about firmware Described in [RFC4108]. As with every semantic differentiation that is supported by the resource-collection type, the use of firmware-entry is optional. It is REQUIRED not to instantiate more than one firmware-entry, as the firmware group is used in a map and therefore only allows for unique labels.
The optional cms-firmware-package member allows to include the actual firmware in the CoSWID tag that also expresses its metadata as a byte-string. This option enables a CoSWID tag to be used as a container or wrapper that composes both firmware and its metadata in a single document (which again can be signed, encrypted and/or compressed). In consequence, a CoSWID tag about firmware can be conveyed as an identifying document across endpoints or used as a reference integrity measurement as usual. Alternatively, it can also convey an actual piece of firmware, serve its intended purpose as a SWID tag and then - due to the lack of a location to store it - be discarded.
SWID tags, as defined in the ISO-19770-2:2015 XML schema, can include cryptographic signatures to protect the integrity of the SWID tag. In general, tags are signed by the tag creator (typically, although not exclusively, the vendor of the software component that the SWID tag identifies). Cryptographic signatures can make any modification of the tag detectable, which is especially important if the integrity of the tag is important, such as when the tag is providing reference integrity measurements for files.
The ISO-19770-2:2015 XML schema uses XML DSIG to support cryptographic signatures. CoSWID tags require a different signature scheme than this. COSE (CBOR Object Signing and Encryption) provides the required mechanism [RFC8152]. Concise SWID can be wrapped in a COSE Single Signer Data Object (cose-sign1) that contains a single signature. The following CDDL defines a more restrictive subset of header attributes allowed by COSE tailored to suit the requirements of Concise SWID.
<CODE BEGINS> signed-coswid = #6.997(COSE-Sign1-coswid) ; see TBS7 in current COSE I-D label = int / tstr ; see COSE I-D 1.4. values = any ; see COSE I-D 1.4. unprotected-signed-coswid-header = { 1 => int, ; algorithm identifier 3 => "application/coswid", ; request for CoAP IANA registry to become an int * label => values, } protected-signed-coswid-header = { 4 => bstr, ; key identifier * label => values, } COSE-Sign1-coswid = [ protected: bstr .cbor protected-signed-coswid-header, unprotected: unprotected-signed-coswid-header, payload: bstr .cbor concise-software-identity, signature: bstr, ] <CODE ENDS>