idnits 2.17.00 (12 Aug 2021) /tmp/idnits6998/draft-ietf-suit-trust-domains-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The abstract seems to contain references ([I-D.ietf-suit-manifest]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- -- The document date (7 March 2022) is 68 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-17) exists of draft-ietf-suit-manifest-16 ** Downref: Normative reference to an Informational RFC: RFC 7228 ** Downref: Normative reference to an Informational RFC: RFC 9019 == Outdated reference: A later version (-04) exists of draft-ietf-suit-firmware-encryption-03 == Outdated reference: draft-ietf-suit-information-model has been published as RFC 9124 == Outdated reference: A later version (-17) exists of draft-ietf-teep-architecture-16 Summary: 3 errors (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SUIT B. Moran 3 Internet-Draft Arm Limited 4 Intended status: Standards Track 7 March 2022 5 Expires: 8 September 2022 7 SUIT Manifest Extensions for Multiple Trust Domains 8 draft-ietf-suit-trust-domains-00 10 Abstract 12 This specification describes extensions to the SUIT manifest format 13 (as defined in [I-D.ietf-suit-manifest]) for use in deployments with 14 multiple trust domains. A device has more than one trust domain when 15 it uses different trust anchors for different purposes or components 16 in the context of firmware update. 18 Status of This Memo 20 This Internet-Draft is submitted in full conformance with the 21 provisions of BCP 78 and BCP 79. 23 Internet-Drafts are working documents of the Internet Engineering 24 Task Force (IETF). Note that other groups may also distribute 25 working documents as Internet-Drafts. The list of current Internet- 26 Drafts is at https://datatracker.ietf.org/drafts/current/. 28 Internet-Drafts are draft documents valid for a maximum of six months 29 and may be updated, replaced, or obsoleted by other documents at any 30 time. It is inappropriate to use Internet-Drafts as reference 31 material or to cite them other than as "work in progress." 33 This Internet-Draft will expire on 8 September 2022. 35 Copyright Notice 37 Copyright (c) 2022 IETF Trust and the persons identified as the 38 document authors. All rights reserved. 40 This document is subject to BCP 78 and the IETF Trust's Legal 41 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 42 license-info) in effect on the date of publication of this document. 43 Please review these documents carefully, as they describe your rights 44 and restrictions with respect to this document. Code Components 45 extracted from this document must include Revised BSD License text as 46 described in Section 4.e of the Trust Legal Provisions and are 47 provided without warranty as described in the Revised BSD License. 49 Table of Contents 51 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 52 2. Conventions and Terminology . . . . . . . . . . . . . . . . . 3 53 3. Changes to SUIT Workflow Model . . . . . . . . . . . . . . . 5 54 4. Changes to Manifest Metadata Structure . . . . . . . . . . . 5 55 5. Delegation Chains . . . . . . . . . . . . . . . . . . . . . . 6 56 5.1. Delegation Chains . . . . . . . . . . . . . . . . . . . . 7 57 6. Dependencies . . . . . . . . . . . . . . . . . . . . . . . . 7 58 6.1. Changes to Required Checks . . . . . . . . . . . . . . . 8 59 6.2. Changes to Abstract Machine Description . . . . . . . . . 9 60 6.3. Changes to Special Cases of Component Index and Dependency 61 Index . . . . . . . . . . . . . . . . . . . . . . . . . . 10 62 6.4. Processing Dependencies . . . . . . . . . . . . . . . . . 10 63 6.4.1. Multiple Manifest Processors . . . . . . . . . . . . 11 64 6.5. Added and Modified Commands . . . . . . . . . . . . . . . 12 65 6.5.1. suit-directive-set-component-index . . . . . . . . . 12 66 6.5.2. suit-directive-set-dependency-index . . . . . . . . . 13 67 6.5.3. suit-directive-process-dependency . . . . . . . . . . 14 68 6.5.4. suit-directive-unlink . . . . . . . . . . . . . . . . 14 69 6.6. SUIT_Dependency Manifest Element . . . . . . . . . . . . 15 70 7. Creating Manifests . . . . . . . . . . . . . . . . . . . . . 16 71 7.1. Dependency Template . . . . . . . . . . . . . . . . . . . 16 72 7.1.1. Composite Manifests . . . . . . . . . . . . . . . . . 16 73 7.2. Encrypted Manifest Template . . . . . . . . . . . . . . . 17 74 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 18 75 8.1. SUIT Commands . . . . . . . . . . . . . . . . . . . . . . 18 76 9. Security Considerations . . . . . . . . . . . . . . . . . . . 18 77 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 18 78 10.1. Normative References . . . . . . . . . . . . . . . . . . 18 79 10.2. Informative References . . . . . . . . . . . . . . . . . 19 80 Appendix A. A. Full CDDL . . . . . . . . . . . . . . . . . . . 20 81 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 21 83 1. Introduction 85 Devices that go beyond single-signer update require more complex 86 rules for deploying firmware updates. For example, devices may 87 require: 89 * long-term trust anchors with a mechanism to delegate trust to 90 short term keys. 92 * software components from multiple software signing authorities. 94 * a mechanism to remove an uneeded component 96 * single-object dependencies 97 * a partly encrypted manifest so that distribution does not reveal 98 private information 100 These mechanisms are not part of the core manifest specification, but 101 they are needed for more advanced use cases, such as the architecture 102 described in [I-D.ietf-teep-architecture]. 104 This specification extends the SUIT Manifest specification 105 ([I-D.ietf-suit-manifest]). 107 2. Conventions and Terminology 109 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 110 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 111 "OPTIONAL" in this document are to be interpreted as described in 112 BCP 14 [RFC2119] [RFC8174] when, and only when, they appear in all 113 capitals, as shown here. 115 Additionally, the following terminology is used throughout this 116 document: 118 * SUIT: Software Update for the Internet of Things, also the IETF 119 working group for this standard. 121 * Payload: A piece of information to be delivered. Typically 122 Firmware for the purposes of SUIT. 124 * Resource: A piece of information that is used to construct a 125 payload. 127 * Manifest: A manifest is a bundle of metadata about the firmware 128 for an IoT device, where to find the firmware, and the devices to 129 which it applies. 131 * Envelope: A container with the manifest, an authentication wrapper 132 with cryptographic information protecting the manifest, 133 authorization information, and severable elements (see: TBD). 135 * Update: One or more manifests that describe one or more payloads. 137 * Update Authority: The owner of a cryptographic key used to sign 138 updates, trusted by Recipients. 140 * Recipient: The system, typically an IoT device, that receives and 141 processes a manifest. 143 * Manifest Processor: A component of the Recipient that consumes 144 Manifests and executes the commands in the Manifest. 146 * Component: An updatable logical block of the Firmware, Software, 147 configuration, or data of the Recipient. 149 * Component Set: A group of interdependent Components that must be 150 updated simultaneously. 152 * Command: A Condition or a Directive. 154 * Condition: A test for a property of the Recipient or its 155 Components. 157 * Directive: An action for the Recipient to perform. 159 * Trusted Invocation: A process by which a system ensures that only 160 trusted code is executed, for example secure boot or launching a 161 Trusted Application. 163 * A/B images: Dividing a Recipient's storage into two or more 164 bootable images, at different offsets, such that the active image 165 can write to the inactive image(s). 167 * Record: The result of a Command and any metadata about it. 169 * Report: A list of Records. 171 * Procedure: The process of invoking one or more sequences of 172 commands. 174 * Update Procedure: A procedure that updates a Recipient by fetching 175 dependencies and images, and installing them. 177 * Invocation Procedure: A procedure in which a Recipient verifies 178 dependencies and images, loading images, and invokes one or more 179 image. 181 * Software: Instructions and data that allow a Recipient to perform 182 a useful function. 184 * Firmware: Software that is typically changed infrequently, stored 185 in nonvolatile memory, and small enough to apply to [RFC7228] 186 Class 0-2 devices. 188 * Image: Information that a Recipient uses to perform its function, 189 typically firmware/software, configuration, or resource data such 190 as text or images. Also, a Payload, once installed is an Image. 192 * Slot: One of several possible storage locations for a given 193 Component, typically used in A/B image systems 195 * Abort: An event in which the Manifest Processor immediately halts 196 execution of the current Procedure. It creates a Record of an 197 error condition. 199 3. Changes to SUIT Workflow Model 201 The use of the features presented for use with multiple trust domains 202 requires some augmentation of the workflow presented in the SUIT 203 Manifest specification ([I-D.ietf-suit-manifest]): 205 One additional assumption is added for the Update Procedure: 207 * All dependency manifests should be present before any payload is 208 fetched. 210 One additional assumption is added to the Invocation Procedure: 212 * All dependencies must be validated prior to loading. 214 Two steps are added to the expected installation workflow of a 215 Recipient: 217 1. *Verify delegation chains* 219 2. Verify the signature of the manifest. 221 3. Verify the applicability of the manifest. 223 4. *Resolve dependencies.* 225 5. Fetch payload(s). 227 6. Install payload(s). 229 In addition, when multiple manifests are used for an update, each 230 manifest's steps occur in a lockstep fashion; all manifests have 231 dependency resolution performed before any manifest performs a 232 payload fetch, etc. 234 4. Changes to Manifest Metadata Structure 236 To accomodate the additional metadata needed to enable these 237 features, the envelope and manifest have several new elements added. 239 The Envelope gains two more elements: Delegation chains and 240 Integrated Dependencies The Common metadata section in the Manifest 241 also gains a list of dependencies. 243 The new metadata structure is shown below. 245 +-------------------------+ 246 | Envelope | 247 +-------------------------+ 248 | Delegation Chains | 249 | Authentication Block | 250 | Manifest --------------> +------------------------------+ 251 | Severable Elements | | Manifest | 252 | Human-Readable Text | +------------------------------+ 253 | COSWID | | Structure Version | 254 | Integrated Dependencies | | Sequence Number | 255 | Integrated Payloads | | Reference to Full Manifest | 256 +-------------------------+ +------ Common Structure | 257 | +---- Command Sequences | 258 +-------------------------+ | | | Digests of Envelope Elements | 259 | Common Structure | <--+ | +------------------------------+ 260 +-------------------------+ | 261 | Dependencies | +-> +-----------------------+ 262 | Component IDs | | Command Sequence | 263 | Common Command Sequence ---------> +-----------------------+ 264 +-------------------------+ | List of ( pairs of ( | 265 | * command code | 266 | * argument / | 267 | reporting policy | 268 | )) | 269 +-----------------------+ 271 5. Delegation Chains 273 Delegation Chains allow a Recipient to establish a chain of trust 274 from a Trust Anchor to the signer of a manifest by validating 275 delegation claims. Each delegation claim is a [RFC8392] CBOR Web 276 Tokens (CWTs). The first claim in each list is signed by a Trust 277 Anchor. Each subsequent claim in a list is signed by the public key 278 claimed in the preceding list element. The last element in each list 279 claims a public key that can be used to verify a signature in the 280 Authentication Block (See Sectino 5.2 of [I-D.ietf-suit-manifest]). 282 See Section 5.1 for more detail. 284 5.1. Delegation Chains 286 The suit-delegation element MAY carry one or more CBOR Web Tokens 287 (CWTs) [RFC8392], with [RFC8747] cnf claims. They can be used to 288 perform enhanced authorization decisions. The CWTs are arranged into 289 a list of lists. Each list starts with a CWT authorized by a Trust 290 Anchor, and finishes with a key used to authenticate the Manifest 291 (see Section 8.3 of [I-D.ietf-suit-manifest]). This allows an Update 292 Authority to delegate from a long term Trust Anchor, down through 293 intermediaries, to a delegate without any out-of-band provisioning of 294 Trust Anchors or intermediary keys. 296 A Recipient MAY choose to cache intermediaries and/or delegates. If 297 an Update Distributor knows that a targeted Recipient has cached some 298 intermediaries or delegates, it MAY choose to strip any cached 299 intermediaries or delegates from the Delegation Chains in order to 300 reduce bandwidth and energy. 302 6. Dependencies 304 A dependency is another SUIT_Envelope that describes additional 305 components. 307 Dependency manifests enable several additional use cases. In 308 particular, they enable two or more entities who are trusted for 309 different privileges to coordinate. This can be used in many 310 scenarios, for example: 312 * An IoT device may contain a processor in its radio in addition to 313 the primary processor. These two processors may have separate 314 firmware with separate signing authorities. Dependencies allow 315 the firmware for the primary processor to reference a manifest 316 signed by a different authority. 318 * A network operator may wish to provide local caching of update 319 payloads. The network operator overrides the URI of payload by 320 providing a dependent manifest that references the original 321 manifest, but replaces its URI. 323 * A device operator provides a device with some additional 324 configuration. The device operator wants to test their 325 configuration with each new firmware version before releasing it. 326 The configuration is delivered as a binary in the same way as a 327 firmware image. The device operator references the firmware 328 manifest from the firmware author in their own manifest which also 329 defines the configuration. 331 By using dependencies, components such as software, configuration, 332 models, and other resoruces authenticated by different trust anchors 333 can be delivered to devices. 335 6.1. Changes to Required Checks 337 This section augments the definitions in Required Checks 338 (Section 6.2) of [I-D.ietf-suit-manifest]. 340 More checks are required when handling dependencies. By default, any 341 signature of a dependency MUST be verified. However, there are some 342 exceptions to this rule: where a device supports only one level of 343 access (no ACLs defining which authorities have access to different 344 componetns), it MAY choose to skip signature verification of 345 dependencies, since they are referenced by digest. Where a device 346 differentiates between trust levels, such as with an ACL, it MAY 347 choose to defer the verification of signatures of dependencies until 348 the list of affected components is known so that it can skip 349 redundant signature verifications. For example, a dependency signed 350 by the same author as the dependent does not require a signature 351 verification. Similarly, if the signer of the dependent has full 352 rights to the device, according to the ACL, then no signature 353 verification is necessary on the dependency. 355 If the manifest contains more than one component and/or dependency, 356 each command sequence MUST begin with a Set Component Index or Set 357 Dependency Index command. 359 If a dependency is specified, then the manifest processor MUST 360 perform the following checks: 362 1. At the beginning of each section in the dependent: all previous 363 sections of each dependency have been executed. 365 2. At the end of each section in the dependent: The corresponding 366 section in each dependency has been executed. 368 If the interpreter does not support dependencies and a manifest 369 specifies a dependency, then the interpreter MUST reject the 370 manifest. 372 If a Recipient supports groups of interdependent components (a 373 Component Set), then it SHOULD verify that all Components in the 374 Component Set are specified by one update, that is: a single manifest 375 and all its dependencies that together: 377 1. have sufficient permissions imparted by their signatures 378 2. specify a digest and a payload for every Component in the 379 Component Set. 381 The single dependent manifest is sometimes called a Root Manifest. 383 6.2. Changes to Abstract Machine Description 385 This section augments the Abstract Machine Description (Section 6.4) 386 in [I-D.ietf-suit-manifest] With the addition of dependencies, some 387 changes are necessary to the abstract machine, outside the typical 388 scope of added commands. These changes alter the behaviour of an 389 existing command and way that the parser processes manifests: 391 * All commands may target dependency manifests as well as 392 components. To support this behaviour, there is a new command 393 instroduced: Set Dependency Index. This change works together 394 with Set Component Index to choose the object on which the 395 manifest is operating. 397 * Dependencies are processed in lock-step with the Root Manifest. 398 This means that every dependency's current command sequence must 399 be executed before a dependent's later command sequence may be 400 executed. For example, every dependency's Dependency Resolution 401 step MUST be executed before any dependent's payload fetch step. 403 The logic of Set Componment Index is modified as below: 405 As in [I-D.ietf-suit-manifest], To simplify the logic describing the 406 command semantics, the object "current" is used. It represents the 407 component identified by the Component Index or the dependency 408 identified by the Dependency Index: 410 current := components\[component-index\] 411 if component-index is not false 412 else dependencies\[dependency-index\] 414 As a result, Set Component Index is described as current := 415 components[arg]. The actual operation performed for Set Component 416 Index is described by the following pseudocode, however, because of 417 the definition of current (above), these are semantically equivalent. 419 component-index := arg 420 dependency-index := false 422 Similarly, Set Dependency Index is semantically equivalent to current 423 := dependencies[arg], but the actual operation performed is: 425 dependency-index := arg 426 component-index := false 428 Dependencies are identified by digest, but referenced in commands by 429 Dependency Index, the index into the array of Dependencies. 431 6.3. Changes to Special Cases of Component Index and Dependency Index 433 The considerations that apply in Special Cases of Component Index and 434 Dependency Index (Section 6.5) of [I-D.ietf-suit-manifest] are 435 augmented to include Dependency Index as well as Component Index. 437 The target(s) assigned for each command are defined by the following 438 pseudocode. 440 if component-index is true: 441 current-list = components 442 else if component-index is array: 443 current-list = [ components[idx] for idx in component-index ] 444 else if component-index is integer: 445 current-list = [ components[component-index] ] 446 else if dependency-index is true: 447 current-list = dependencies 448 else if dependency-index is array: 449 current-list = [ dependencies[idx] for idx in dependency-index ] 450 else: 451 current-list = [ dependencies[dependency-index] ] 452 for current in current-list: 453 cmd(current) 455 6.4. Processing Dependencies 457 As described in Section 6.1, each manifest must invoke each of its 458 dependencies' sections from the corresponding section of the 459 dependent. Any changes made to parameters by the dependency persist 460 in the dependent. 462 When a Process Dependency command is encountered, the interpreter 463 loads the dependency identified by the Current Dependency Index. The 464 interpreter first executes the common-sequence section of the 465 identified dependency, then it executes the section of the dependency 466 that corresponds to the currently executing section of the dependent. 468 If the specified dependency does not contain the current section, 469 Process Dependency succeeds immediately. 471 The Manifest Processor MUST also support a Dependency Index of True, 472 which applies to every dependency, as described in Section 6.3 473 The interpreter also performs the checks described in Section 6.1 to 474 ensure that the dependent is processing the dependency correctly. 476 6.4.1. Multiple Manifest Processors 478 When a system has multiple security domains, each domain might 479 require independent verification of authenticity or security 480 policies. Security domains might be divided by separation technology 481 such as Arm TrustZone, Intel SGX, or another TEE technology. 482 Security domains might also be divided into separate processors and 483 memory spaces, with a communication interface between them. 485 For example, an application processor may have an attached 486 communications module that contains a processor. The communications 487 module might require metadata signed by a specific Trust Authority 488 for regulatory approval. This may be a different Trust Authority 489 than the application processor. 491 When there are two or more security domains (see 492 [I-D.ietf-teep-architecture]), a manifest processor might be required 493 in each. The first manifest processor is the normal manifest 494 processor as described for the Recipient in Section 6 of 495 [I-D.ietf-suit-manifest]. The second manifest processor only 496 executes sections when the first manifest processor requests it. An 497 API interface is provided from the second manifest processor to the 498 first. This allows the first manifest processor to request a limited 499 set of operations from the second. These operations are limited to: 500 setting parameters, inserting an Envelope, invoking a Manifest 501 Command Sequence. The second manifest processor declares a prefix to 502 the first, which tells the first manifest processor when it should 503 delegate to the second. These rules are enforced by underlying 504 separation of privilege infrastructure, such as TEEs, or physical 505 separation. 507 When the first manifest processor encounters a dependency prefix, 508 that informs the first manifest processor that it should provide the 509 second manifest processor with the corresponding dependency Envelope. 510 This is done when the dependency is fetched. The second manifest 511 processor immediately verifies any authentication information in the 512 dependency Envelope. When a parameter is set for any component that 513 matches the prefix, this parameter setting is passed to the second 514 manifest processor via an API. As the first manifest processor works 515 through the Procedure (set of command sequences) it is executing, 516 each time it sees a Process Dependency command that is associated 517 with the prefix declared by the second manifest processor, it uses 518 the API to ask the second manifest processor to invoke that 519 dependency section instead. 521 This mechanism ensures that the two or more manifest processors do 522 not need to trust each other, except in a very limited case. When 523 parameter setting across security domains is used, it must be very 524 carefully considered. Only parameters that do not have an effect on 525 security properties should be allowed. The dependency manifest MAY 526 control which parameters are allowed to be set by using the Override 527 Parameters directive. The second manifest processor MAY also control 528 which parameters may be set by the first manifest processor by means 529 of an ACL that lists the allowed parameters. For example, a URI may 530 be set by a dependent without a substantial impact on the security 531 properties of the manifest. 533 6.5. Added and Modified Commands 535 All commands are modified in that they can also target dependencies. 536 However, Set Component Index has a larger modification. 538 +======================+=================================+ 539 | Command Name | Semantic of the Operation | 540 +======================+=================================+ 541 | Set Component Index | current := components[arg] | 542 +----------------------+---------------------------------+ 543 | Set Dependency Index | current := dependencies[arg] | 544 +----------------------+---------------------------------+ 545 | Set Parameters | current.params[k] := v if not k | 546 | | in params for-each k,v in arg | 547 +----------------------+---------------------------------+ 548 | Process Dependency | exec(current[common]); | 549 | | exec(current[current-segment]) | 550 +----------------------+---------------------------------+ 551 | Unlink | unlink(current) | 552 +----------------------+---------------------------------+ 554 Table 1 556 6.5.1. suit-directive-set-component-index 558 Set Component Index defines the component to which successive 559 directives and conditions will apply. The supplied argument MUST be 560 one of three types: 562 1. An unsigned integer (REQUIRED to implement in parser) 564 2. A boolean (REQUIRED to implement in parser ONLY IF 2 or more 565 components supported) 567 3. An array of unsigned integers (REQUIRED to implement in parser 568 ONLY IF 3 or more components supported) 570 If the following commands apply to ONE component, an unsigned integer 571 index into the component list is used. If the following commands 572 apply to ALL components, then the boolean value "True" is used 573 instead of an index. If the following commands apply to more than 574 one, but not all components, then an array of unsigned integer 575 indices into the component list is used. See Section 6.3 for more 576 details. 578 If the following commands apply to NO components, then the boolean 579 value "False" is used. When suit-directive-set-dependency-index is 580 used, suit-directive-set-component-index = False is implied. When 581 suit-directive-set-component-index is used, suit-directive-set- 582 dependency-index = False is implied. 584 If component index is set to True when a command is invoked, then the 585 command applies to all components, in the order they appear in suit- 586 common-components. When the Manifest Processor invokes a command 587 while the component index is set to True, it must execute the command 588 once for each possible component index, ensuring that the command 589 receives the parameters corresponding to that component index. 591 6.5.2. suit-directive-set-dependency-index 593 Set Dependency Index defines the manifest to which successive 594 directives and conditions will apply. The supplied argument MUST be 595 either a boolean or an unsigned integer index into the dependencies, 596 or an array of unsigned integer indices into the list of 597 dependencies. If the following directives apply to ALL dependencies, 598 then the boolean value "True" is used instead of an index. If the 599 following directives apply to NO dependencies, then the boolean value 600 "False" is used. When suit-directive-set-component-index is used, 601 suit-directive-set-dependency-index = False is implied. When suit- 602 directive-set-dependency-index is used, suit-directive-set-component- 603 index = False is implied. 605 If dependency index is set to True when a command is invoked, then 606 the command applies to all dependencies, in the order they appear in 607 suit-common-components. When the Manifest Processor invokes a 608 command while the dependency index is set to True, the Manifest 609 Processor MUST execute the command once for each possible dependency 610 index, ensuring that the command receives the parameters 611 corresponding to that dependency index. If the dependency index is 612 set to an array of unsigned integers, then the Manifest Processor 613 MUST execute the command once for each listed dependency index, 614 ensuring that the command receives the parameters corresponding to 615 that dependency index. 617 See Section 6.3 for more details. 619 Typical operations that require suit-directive-set-dependency-index 620 include setting a source URI or Encryption Information, invoking 621 "Fetch," or invoking "Process Dependency" for an individual 622 dependency. 624 6.5.3. suit-directive-process-dependency 626 Execute the commands in the common section of the current dependency, 627 followed by the commands in the equivalent section of the current 628 dependency. For example, if the current section is "fetch payload," 629 this will execute "common" in the current dependency, then "fetch 630 payload" in the current dependency. Once this is complete, the 631 command following suit-directive-process-dependency will be 632 processed. 634 If the current dependency is False, this directive has no effect. If 635 the current dependency is True, then this directive applies to all 636 dependencies. If the current section is "common," then the command 637 sequence MUST be terminated with an error. 639 When SUIT_Process_Dependency completes, it forwards the last status 640 code that occurred in the dependency. 642 6.5.3.1. suit-directive-set-parameters 644 suit-directive-set-parameters allows the manifest to configure 645 behavior of future directives by changing parameters that are read by 646 those directives. When dependencies are used, suit-directive-set- 647 parameters also allows a manifest to modify the behavior of its 648 dependencies. 650 If a parameter is already set, suit-directive-set-parameters will 651 skip setting the parameter to its argument. This provides the core 652 of the override mechanism, allowing dependent manifests to change the 653 behavior of a manifest. 655 suit-directive-set-parameters does not specify a reporting policy. 657 6.5.4. suit-directive-unlink 659 suit-directive-unlink marks the current component as unused in the 660 current manifest. This can be used to remove temporary storage or 661 remove components that are no longer needed. Example use cases: 663 * Temporary storage for encrypted download 665 * Temporary storage for verifying decompressed file before writing 666 to flash 668 * Removing Trusted Service no longer needed by Trusted Application 670 Once the current Command Sequence is complete, the manifest 671 processors checks each marked component to see whether any other 672 manifests have referenced it. Those marked components with no other 673 references are deleted. The manifest processor MAY choose to ignore 674 a Unlink directive depending on device policy. 676 suit-directive-unlink is OPTIONAL to implement in manifest 677 processors. 679 6.6. SUIT_Dependency Manifest Element 681 SUIT_Dependency specifies a manifest that describes a dependency of 682 the current manifest. The Manifest is identified, but the Recipient 683 should expect an Envelope when it acquires the dependency. This is 684 because the Manifest is the one invariant element of the Envelope, 685 where other elements may change by countersigning, adding 686 authentication blocks, or severing elements. 688 The suit-dependency-digest specifies the dependency manifest uniquely 689 by identifying a particular Manifest structure. This is identical to 690 the digest that would be present as the payload of any suit- 691 authentication-block in the dependency's Envelope. The digest is 692 calculated over the Manifest structure instead of the COSE 693 Sig_structure or Mac_structure. This is necessary to ensure that 694 removing a signature from a manifest does not break dependencies due 695 to missing signature elements. This is also necessary to support the 696 trusted intermediary use case, where an intermediary re-signs the 697 Manifest, removing the original signature, potentially with a 698 different algorithm, or trading COSE_Sign for COSE_Mac. 700 The suit-dependency-prefix element contains a 701 SUIT_Component_Identifier (see Section 8.4.5.1 of 702 [I-D.ietf-suit-manifest]). This specifies the scope at which the 703 dependency operates. This allows the dependency to be forwarded on 704 to a component that is capable of parsing its own manifests. It also 705 allows one manifest to be deployed to multiple dependent Recipients 706 without those Recipients needing consistent component hierarchy. 707 This element is OPTIONAL for Recipients to implement. 709 A dependency prefix can be used with a component identifier. This 710 allows complex systems to understand where dependencies need to be 711 applied. The dependency prefix can be used in one of two ways. The 712 first simply prepends the prefix to all Component Identifiers in the 713 dependency. 715 A dependency prefix can also be used to indicate when a dependency 716 manifest needs to be processed by a secondary manifest processor, as 717 described in Section 6.4.1. 719 7. Creating Manifests 721 This section details a set of templates for creating manifests. 722 These templates explain which parameters, commands, and orders of 723 commands are necessary to achieve a stated goal. 725 7.1. Dependency Template 727 The goal of the Dependency template is to obtain, verify, and process 728 a dependency manifest as appropriate. 730 The following commands are placed into the dependency resolution 731 sequence: 733 * Set Dependency Index directive (see Section 6.5.2) 735 * Set Parameters directive (see Section 6.5.3.1) for URI (see 736 Section 8.4.8.9 of [I-D.ietf-suit-manifest]) 738 * Fetch directive (see Section 8.4.10.4 of [I-D.ietf-suit-manifest]) 740 * Check Image Match condition (see Section 8.4.9.2 of 741 [I-D.ietf-suit-manifest] of [I-D.ietf-suit-manifest]) 743 * Process Dependency directive (see Section 6.5.3) 745 Then, the validate sequence contains the following operations: 747 * Set Dependency Index directive (see Section 6.5.2) 749 * Check Image Match condition (see Section 8.4.9.2 of 750 [I-D.ietf-suit-manifest]) 752 * Process Dependency directive (see Section 6.5.3) 754 NOTE: Any changes made to parameters in a dependency persist in the 755 dependent. 757 7.1.1. Composite Manifests 759 An implementer MAY choose to place a dependency's envelope in the 760 envelope of its dependent. The dependent envelope key for the 761 dependency envelope MUST NOT be a value between 0 and 24 and it MUST 762 NOT be used by any other envelope element in the dependent manifest. 764 The URI for a dependency enclosed in this way MUST be expressed as a 765 fragment-only reference, as defined in [RFC3986], Section 4.4. The 766 fragment identifier is the stringified envelope key of the 767 dependency. For example, an envelope that contains a dependency at 768 key 42 would use a URI "#42", key -73 would use a URI "#-73". 770 7.2. Encrypted Manifest Template 772 The goal of the Encrypted Manifest template is to fetch and decrypt a 773 manifest so that it can be used as a dependency. To use an encrypted 774 manifest, create a plaintext dependent, and add the encrypted 775 manifest as a dependency. The dependent can include very little 776 information. 778 NOTE: This template also requires the extensions defined in 779 [I-D.ietf-suit-firmware-encryption] 781 The following operations are placed into the dependency resolution 782 block: 784 * Set Dependency Index directive (see Section 6.5.2) 786 * Set Parameters directive (see Section 6.5.3.1) for 788 - URI (see Section 8.4.8.9 of [I-D.ietf-suit-manifest]) 790 - Encryption Info (See [I-D.ietf-suit-firmware-encryption]) 792 * Fetch directive (see Section 8.4.10.4 of [I-D.ietf-suit-manifest]) 794 * Check Image Match condition (see Section 8.4.9.2 of 795 [I-D.ietf-suit-manifest]) 797 * Process Dependency directive (see Section 6.5.3) 799 Then, the validate block contains the following operations: 801 * Set Dependency Index directive (see Section 6.5.2) 803 * Check Image Match condition (see Section 8.4.9.2 of 804 [I-D.ietf-suit-manifest]) 806 * Process Dependency directive (see Section 6.5.3) 808 A plaintext manifest and its encrypted dependency may also form a 809 composite manifest (Section 7.1.1). 811 8. IANA Considerations 813 IANA is requested to allocate the following numbers in the listed 814 registries: 816 8.1. SUIT Commands 818 +=======+============+===================================+=========+ 819 | Label | Name | Reference | | 820 +=======+============+===================================+=========+ 821 | 13 | Set | Section 6.5.2 | | 822 | | Dependency | | | 823 | | Index | | | 824 +-------+------------+-----------------------------------+---------+ 825 | 18 | Process | suit-directive-process-dependency | Section | 826 | | Dependency | | 6.5.3 | 827 +-------+------------+-----------------------------------+---------+ 828 | 19 | Set | Section 6.5.3.1 | | 829 | | Parameters | | | 830 +-------+------------+-----------------------------------+---------+ 831 | 33 | Unlink | Section 6.5.4 | | 832 +-------+------------+-----------------------------------+---------+ 834 Table 2 836 9. Security Considerations 838 This document is about a manifest format protecting and describing 839 how to retrieve, install, and invoke firmware images and as such it 840 is part of a larger solution for delivering firmware updates to IoT 841 devices. A detailed security treatment can be found in the 842 architecture [RFC9019] and in the information model 843 [I-D.ietf-suit-information-model] documents. 845 10. References 847 10.1. Normative References 849 [I-D.ietf-suit-manifest] 850 Moran, B., Tschofenig, H., Birkholz, H., and K. Zandberg, 851 "A Concise Binary Object Representation (CBOR)-based 852 Serialization Format for the Software Updates for Internet 853 of Things (SUIT) Manifest", Work in Progress, Internet- 854 Draft, draft-ietf-suit-manifest-16, 25 October 2021, 855 . 858 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 859 Requirement Levels", BCP 14, RFC 2119, 860 DOI 10.17487/RFC2119, March 1997, 861 . 863 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 864 Resource Identifier (URI): Generic Syntax", STD 66, 865 RFC 3986, DOI 10.17487/RFC3986, January 2005, 866 . 868 [RFC7228] Bormann, C., Ersue, M., and A. Keranen, "Terminology for 869 Constrained-Node Networks", RFC 7228, 870 DOI 10.17487/RFC7228, May 2014, 871 . 873 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 874 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 875 May 2017, . 877 [RFC8392] Jones, M., Wahlstroem, E., Erdtman, S., and H. Tschofenig, 878 "CBOR Web Token (CWT)", RFC 8392, DOI 10.17487/RFC8392, 879 May 2018, . 881 [RFC8747] Jones, M., Seitz, L., Selander, G., Erdtman, S., and H. 882 Tschofenig, "Proof-of-Possession Key Semantics for CBOR 883 Web Tokens (CWTs)", RFC 8747, DOI 10.17487/RFC8747, March 884 2020, . 886 [RFC9019] Moran, B., Tschofenig, H., Brown, D., and M. Meriac, "A 887 Firmware Update Architecture for Internet of Things", 888 RFC 9019, DOI 10.17487/RFC9019, April 2021, 889 . 891 10.2. Informative References 893 [I-D.ietf-suit-firmware-encryption] 894 Tschofenig, H., Housley, R., and B. Moran, "Firmware 895 Encryption with SUIT Manifests", Work in Progress, 896 Internet-Draft, draft-ietf-suit-firmware-encryption-03, 7 897 March 2022, . 900 [I-D.ietf-suit-information-model] 901 Moran, B., Tschofenig, H., and H. Birkholz, "A Manifest 902 Information Model for Firmware Updates in Internet of 903 Things (IoT) Devices", Work in Progress, Internet-Draft, 904 draft-ietf-suit-information-model-13, 8 July 2021, 905 . 908 [I-D.ietf-teep-architecture] 909 Pei, M., Tschofenig, H., Thaler, D., and D. Wheeler, 910 "Trusted Execution Environment Provisioning (TEEP) 911 Architecture", Work in Progress, Internet-Draft, draft- 912 ietf-teep-architecture-16, 28 February 2022, 913 . 916 Appendix A. A. Full CDDL 918 To be valid, the following CDDL MUST be appended to the SUIT Manifest 919 CDDL. The SUIT CDDL is defined in Appendix A of 920 [I-D.ietf-suit-manifest] 922 $$SUIT_Envelope_Extensions //= 923 (suit-delegation => bstr .cbor SUIT_Delegation) 924 $$SUIT_Envelope_Extensions //= SUIT_Integrated_Dependency 926 SUIT_Delegation = [ + [ + bstr .cbor CWT ] ] 928 CWT = SUIT_Authentication_Block 930 $$SUIT_severable-members-extensions //= 931 (suit-dependency-resolution => bstr .cbor SUIT_Command_Sequence) 933 SUIT_Integrated_Dependency = ( 934 suit-integrated-dependency-key => bstr .cbor SUIT_Envelope) 935 suit-integrated-dependency-key = tstr 937 $$severable-manifest-members-choice-extensions //= ( 938 suit-dependency-resolution => \ 939 bstr .cbor SUIT_Command_Sequence / SUIT_Digest) 941 $$SUIT_Common-extensions //= ( 942 suit-dependencies => SUIT_Dependencies 943 ) 945 SUIT_Dependencies = [ + SUIT_Dependency ] 947 SUIT_Dependency = { 948 suit-dependency-digest => SUIT_Digest, 949 ? suit-dependency-prefix => SUIT_Component_Identifier, 950 * $$SUIT_Dependency-extensions, 951 } 953 SUIT_Directive //= ( 954 suit-directive-set-dependency-index, IndexArg) 955 SUIT_Directive //= ( 956 suit-directive-process-dependency, SUIT_Rep_Policy) 957 SUIT_Directive //= (suit-directive-set-parameters, 958 {+ SUIT_Parameters}) 959 SUIT_Directive //= ( 960 suit-directive-unlink, SUIT_Rep_Policy) 962 suit-delegation = 1 963 suit-dependency-resolution = 7 965 suit-dependencies = 1 967 suit-dependency-digest = 1 968 suit-dependency-prefix = 2 970 suit-directive-set-dependency-index = 13 971 suit-directive-process-dependency = 18 972 suit-directive-set-parameters = 19 973 suit-directive-unlink = 33 975 Author's Address 977 Brendan Moran 978 Arm Limited 979 Email: Brendan.Moran@arm.com