idnits 2.17.1 draft-ietf-sfc-nsh-integrity-03.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 : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (January 22, 2021) is 1188 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) == Missing Reference: 'ThisDocument' is mentioned on line 1168, but not defined ** Downref: Normative reference to an Informational RFC: RFC 7665 ** Downref: Normative reference to an Informational RFC: RFC 8877 == Outdated reference: A later version (-13) exists of draft-ietf-intarea-tunnels-10 Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 SFC M. Boucadair 3 Internet-Draft Orange 4 Intended status: Standards Track T. Reddy 5 Expires: July 26, 2021 McAfee 6 D. Wing 7 Citrix 8 January 22, 2021 10 Integrity Protection for the Network Service Header (NSH) and Encryption 11 of Sensitive Context Headers 12 draft-ietf-sfc-nsh-integrity-03 14 Abstract 16 This specification adds integrity protection directly to the Network 17 Service Header (NSH) used for Service Function Chaining (SFC). Also, 18 this specification allows to encrypt sensitive metadata that is 19 carried in the NSH. 21 Status of This Memo 23 This Internet-Draft is submitted in full conformance with the 24 provisions of BCP 78 and BCP 79. 26 Internet-Drafts are working documents of the Internet Engineering 27 Task Force (IETF). Note that other groups may also distribute 28 working documents as Internet-Drafts. The list of current Internet- 29 Drafts is at https://datatracker.ietf.org/drafts/current/. 31 Internet-Drafts are draft documents valid for a maximum of six months 32 and may be updated, replaced, or obsoleted by other documents at any 33 time. It is inappropriate to use Internet-Drafts as reference 34 material or to cite them other than as "work in progress." 36 This Internet-Draft will expire on July 26, 2021. 38 Copyright Notice 40 Copyright (c) 2021 IETF Trust and the persons identified as the 41 document authors. All rights reserved. 43 This document is subject to BCP 78 and the IETF Trust's Legal 44 Provisions Relating to IETF Documents 45 (https://trustee.ietf.org/license-info) in effect on the date of 46 publication of this document. Please review these documents 47 carefully, as they describe your rights and restrictions with respect 48 to this document. Code Components extracted from this document must 49 include Simplified BSD License text as described in Section 4.e of 50 the Trust Legal Provisions and are provided without warranty as 51 described in the Simplified BSD License. 53 Table of Contents 55 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 56 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 57 3. Assumptions and Basic Requirements . . . . . . . . . . . . . 4 58 4. Design Overview . . . . . . . . . . . . . . . . . . . . . . . 6 59 4.1. Supported Security Services . . . . . . . . . . . . . . . 6 60 4.1.1. Encrypt All or a Subset of Context Headers . . . . . 7 61 4.1.2. Integrity Protection . . . . . . . . . . . . . . . . 7 62 4.2. One Secret Key, Two Security Services . . . . . . . . . . 9 63 4.3. Mandatory-to-Implement Authenticated Encryption and HMAC 64 Algorithms . . . . . . . . . . . . . . . . . . . . . . . 10 65 4.4. Key Management . . . . . . . . . . . . . . . . . . . . . 10 66 4.5. New NSH Variable-Length Context Headers . . . . . . . . . 11 67 4.6. Encapsulation of NSH within NSH . . . . . . . . . . . . . 11 68 5. New NSH Variable-Length Context Headers . . . . . . . . . . . 12 69 5.1. MAC#1 Context Header . . . . . . . . . . . . . . . . . . 13 70 5.2. MAC#2 Context Header . . . . . . . . . . . . . . . . . . 15 71 6. Timestamp Format . . . . . . . . . . . . . . . . . . . . . . 17 72 7. Processing Rules . . . . . . . . . . . . . . . . . . . . . . 18 73 7.1. Generic Behavior . . . . . . . . . . . . . . . . . . . . 18 74 7.2. MAC NSH Data Generation . . . . . . . . . . . . . . . . . 19 75 7.3. Encrypted NSH Metadata Generation . . . . . . . . . . . . 20 76 7.4. Timestamp for Replay Attack . . . . . . . . . . . . . . . 21 77 7.5. NSH Data Validation . . . . . . . . . . . . . . . . . . . 22 78 7.6. Decryption of NSH Metadata . . . . . . . . . . . . . . . 23 79 8. MTU Considerations . . . . . . . . . . . . . . . . . . . . . 23 80 9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 81 9.1. MAC#1 . . . . . . . . . . . . . . . . . . . . . . . . . . 25 82 9.2. MAC#2 . . . . . . . . . . . . . . . . . . . . . . . . . . 25 83 9.3. Time Synchronization . . . . . . . . . . . . . . . . . . 26 84 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 26 85 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 86 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 87 12.1. Normative References . . . . . . . . . . . . . . . . . . 26 88 12.2. Informative References . . . . . . . . . . . . . . . . . 27 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 29 91 1. Introduction 93 Many advanced Service Functions (SFs) are enabled for the delivery of 94 value-added services. Typically, SFs are used to meet various 95 service objectives such as IP address sharing, avoiding covert 96 channels, detecting Denial-of-Service (DoS) attacks and protecting 97 network infrastructures against them, network slicing, etc. Because 98 of the proliferation of such advanced SFs together with complex 99 service deployment constraints that demand more agile service 100 delivery procedures, operators need to rationalize their service 101 delivery logics and master their complexity while optimising service 102 activation time cycles. The overall problem space is described in 103 [RFC7498]. 105 [RFC7665] presents a data plane architecture addressing the 106 problematic aspects of existing service deployments, including 107 topological dependence and configuration complexity. It also 108 describes an architecture for the specification, creation, and 109 maintenance of Service Function Chains (SFCs) within a network. That 110 is, how to define an ordered set of SFs and ordering constraints that 111 must be applied to packets/flows selected as a result of traffic 112 classification. [RFC8300] specifies the SFC encapsulation: Network 113 Service Header (NSH). 115 The NSH data is unauthenticated and unencrypted [RFC8300], forcing a 116 service topology that requires security and privacy to use a 117 transport encapsulation that supports such features. Note that some 118 transport encapsulation (e.g., IPsec) only provide hop-by-hop 119 security between two SFC data plane elements (e.g., two Service 120 Function Forwarders (SFFs), SFF to SF) and do not provide SF-to-SF 121 security of NSH metadata. For example, if IPsec is used, SFFs or SFs 122 within a Service Function Path (SFP) not authorized to access the 123 privacy-sensitive metadata will have access to the metadata. As a 124 reminder, the metadata referred to is an information that is inserted 125 by Classifiers or intermediate SFs and shared with downstream SFs; 126 such information is not visible to the communication endpoints 127 (Section 4.9 of [RFC7665]). 129 The lack of such capability was reported during the development of 130 [RFC8300] and [RFC8459]. The reader may refer to Section 3.2.1 of 131 [I-D.arkko-farrell-arch-model-t] for a discussion on the need for 132 more awareness about attacks from within closed domains. 134 This specification fills that gap. Concretely, this document adds 135 integrity protection and optional encryption of sensitive metadata 136 directly to the NSH (Section 4); integrity protects the packet 137 payload and provides replay protection (Section 7.4). Thus, the NSH 138 does not have to rely upon an underlying transport encapsulation for 139 security and confidentiality. 141 This specification introduces new Variable-Length Context Headers to 142 carry fields necessary for integrity protected NSH headers and 143 encrypted Context Headers (Section 5). This specification is only 144 applicable to NSH MD Type 0x02 (Section 2.5 of [RFC8300]). MTU 145 considerations are discussed in Section 8. 147 This specification limits thus access to an information along an SFP 148 to entities that have a need to interpret it. 150 2. Terminology 152 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 153 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 154 "OPTIONAL" in this document are to be interpreted as described in BCP 155 14 [RFC2119] [RFC8174] when, and only when, they appear in all 156 capitals, as shown here. 158 This document makes use of the terms defined in [RFC7665] and 159 [RFC8300]. 161 The document defines the following terms: 163 o SFC data plane element: Refers to NSH-aware SF, SFF, SFC Proxy, or 164 Classifier as defined in the SFC data plane architecture [RFC7665] 165 and further refined in [RFC8300]. 167 o SFC control element: A logical entity that instructs one or more 168 SFC data plane elements on how to process NSH packets within an 169 SFC-enabled domain. 171 o Key Identifier: A key identifier used to identify and deliver keys 172 to authorized entities. See for example, 'kid' usage in 173 [RFC7635]. 175 o NSH data: The NSH is composed of a Base Header, a Service Path 176 Header, and optional Context Headers. NSH data refers to all the 177 above headers and the packet or frame on which the NSH is imposed 178 to realize an SFP. 180 o NSH imposer: Refers to an SFC data plane element that is entitled 181 to impose the NSH with the Context Headers defined in this 182 document. 184 3. Assumptions and Basic Requirements 186 Section 2 of [RFC8300] specifies that the NSH data can be spread over 187 three headers: 189 o Base Header: Provides information about the service header and the 190 payload protocol. 192 o Service Path Header: Provides path identification and location 193 within an SFP. 195 o Context Header(s): Carries metadata (i.e., context data) along a 196 service path. 198 The NSH allows to share context information (a.k.a., metadata) with 199 downstream NSH-aware data elements on a per SFC/SFP basis. To that 200 aim: 202 The control plane is used to instruct the Classifier about the set 203 of context information to be supplied for a given service function 204 chain. 206 The control plane is also used to instruct an NSH-aware SF about 207 any metadata it needs to attach to packets for a given service 208 function chain. This instruction may occur any time during the 209 validity lifetime of an SFC/SFP. The control plane may indicate, 210 for a given service function chain, an order for consuming a set 211 of contexts supplied in a packet. 213 An NSH-aware SF can also be instructed about the behavior it 214 should adopt after consuming a context information that was 215 supplied in the NSH. For example, the context can be maintained, 216 updated, or stripped. 218 An SFC Proxy may be instructed about the behavior it should adopt 219 to process the context information that was supplied in the NSH on 220 behalf of an NSH-unaware SF (e.g., the context can be maintained 221 or stripped). The SFC Proxy may also be instructed to add some 222 new context information into the NSH on behalf of an NSH-unaware 223 SF. 225 In reference to Figure 1, 227 o Classifiers, NSH-aware SFs, and SFC proxies are entitled to update 228 the Context Header(s). 230 o Only NSH-aware SFs and SFC proxies are entitled to update the 231 Service Path Header. 233 o SFFs are entitled to modify the Base Path header (TTL value, for 234 example). Nevertheless, SFFs are not supposed to act on the 235 Context Headers or look into the content of the Context Headers. 237 Thus, the following requirements: 239 o Only Classifiers, NSH-aware SFs, and SFC proxies MUST be able to 240 encrypt and decrypt a given Context Header. 242 o Both encrypted and unencrypted Context Headers MAY be included in 243 the same NSH. That is, some Context Headers may be protected 244 while others do not need to be protected. 246 o The solution MUST provide integrity protection for the Service 247 Path Header. 249 o The solution MAY provide integrity protection for the Base Header. 250 The implications of disabling such checks are discussed in 251 Section 9.1. 253 +----------------+-----------------------------+-------------------+ 254 | | Insert, remove, or replace | Update the NSH | 255 | | the NSH | | 256 | | | | 257 | SFC Data Plane +---------+---------+---------+---------+---------+ 258 | Element | | | |Decrement| Update | 259 | | Insert | Remove | Replace | Service | Context | 260 | | | | | Index |Header(s)| 261 +================+=========+=========+=========+=========+=========+ 262 | | + | | + | | + | 263 | Classifier | | | | | | 264 +----------------+---------+---------+---------+---------+---------+ 265 |Service Function| | + | | | | 266 |Forwarder (SFF) | | | | | | 267 +----------------+---------+---------+---------+---------+---------+ 268 |Service Function| | | | + | + | 269 | (SF) | | | | | | 270 +----------------+---------+---------+---------+---------+---------+ 271 | | + | + | | + | + | 272 | SFC Proxy | | | | | | 273 +----------------+---------+---------+---------+---------+---------+ 275 Figure 1: Summary of NSH Actions 277 4. Design Overview 279 4.1. Supported Security Services 281 This specification provides the functions described in the following 282 subsections. 284 4.1.1. Encrypt All or a Subset of Context Headers 286 The solution allows to encrypt all or a subset of NSH Context Headers 287 by Classifiers, NSH-aware SFs, and SFC proxies. 289 As depicted in Table 1, SFFs are not involved in data encryption. 290 This document enforces this design approach by encrypting Context 291 Headers with keys that are not supplied to SFFs, thus enforcing this 292 limitation by protocol (rather than requirements language). 294 +-----------------+------------------------------+------------------+ 295 | Data Plane | Base and Service Headers | Metadata | 296 | Element | Encryption | Encryption | 297 +-----------------+------------------------------+------------------+ 298 | Classifier | No | Yes | 299 | SFF | No | No | 300 | NSH-aware SF | No | Yes | 301 | SFC Proxy | No | Yes | 302 | NSH-unaware SF | No | No | 303 +-----------------+------------------------------+------------------+ 305 Table 1: Encryption Function Supported by SFC Data Plane Elements 307 The SFC control plane is assumed to instruct the Classifier(s), NSH- 308 aware SFs, and SFC proxies with the set of Context Headers (privacy- 309 sensitive metadata, typically) that must be encrypted. Encryption 310 keying material is only provided to these SFC data elements. 312 The control plane may also indicate the set of SFC data plane 313 elements that are entitled to supply a given Context Header (e.g., in 314 reference to their identifiers as assigned within the SFC-enabled 315 domain). It is out of the scope of this document to elaborate on how 316 such instructions are provided to the appropriate SFC data plane 317 elements, nor to detail the structure used to store the instructions. 319 The Service Path Header (Section 2 of [RFC8300]) is not encrypted 320 because SFFs use Service Index (SI) in conjunction with Service Path 321 Identifier (SPI) for determining the next SF in the path. 323 4.1.2. Integrity Protection 325 The solution provides integrity protection for the NSH data. Two 326 levels of assurance (LoAs) are supported. 328 A first level of assurance where all NSH data except the Base Header 329 are integrity protected (Figure 2). In this case, the NSH imposer 330 may be a Classifier, an NSH-aware SF, or an SFC Proxy. SFFs are not 331 thus provided with authentication material. Further details are 332 discussed in Section 5.1. 334 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 335 | Transport Encapsulation | 336 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 337 | Base Header | | 338 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ N 339 | | Service Path Header | S 340 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ H 341 | | Context Header(s) | | 342 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 343 | | Original Packet | 344 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 345 | 346 +------Scope of integrity protected data 348 Figure 2: First Level of Assurance 350 A second level of assurance where all NSH data, including the Base 351 Header, are integrity protected (Figure 3). In this case, the NSH 352 imposer may be a Classifier, an NSH-aware SF, an SFF, or an SFC 353 Proxy. Further details are provided in Section 5.2. 355 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 356 | Transport Encapsulation | 357 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 358 | | Base Header | | 359 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ N 360 | | Service Path Header | S 361 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ H 362 | | Context Header(s) | | 363 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+... 364 | | Original Packet | 365 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 366 | 367 +----Scope of integrity protected data 369 Figure 3: Second Level of Assurance 371 The integrity protection scope is explicitly signaled to NSH-aware 372 SFs and SFC proxies in the NSH by means of a dedicated MD Type 373 (Section 5). 375 In both levels of assurance, the unencrypted Context Headers and the 376 packet on which the NSH is imposed are subject to integrity 377 protection. 379 Table 2 lists the roles of SFC data plane elements in providing 380 integrity protection for the NSH. 382 +--------------------+----------------------------------+ 383 | Data Plane Element | Integrity Protection | 384 +--------------------+----------------------------------+ 385 | Classifier | Yes | 386 | SFF | No (first LoA); Yes (second LoA) | 387 | NSH-aware SF | Yes | 388 | SFC Proxy | Yes | 389 | NSH-unaware SF | No | 390 +--------------------+----------------------------------+ 392 Table 2: Integrity Protection Supported by SFC Data Plane Elements 394 4.2. One Secret Key, Two Security Services 396 The authenticated encryption algorithm defined in [RFC7518] is used 397 to provide NSH data integrity and to encrypt the Context Headers that 398 carry privacy-sensitive metadata. 400 The authenticated encryption algorithm provides a unified encryption 401 and authentication operation which turns plaintext into authenticated 402 ciphertext and vice versa. The generation of secondary keys MAC_KEY 403 and ENC_KEY from the secret key (K) is discussed in Section 5.2.2.1 404 of [RFC7518]: 406 o The ENC_KEY is used for encrypting the Context Headers and the 407 message integrity of the NSH data is calculated using the MAC_KEY. 409 o If the Context Headers are not encrypted, the Hashed Message 410 Authentication Mode (HMAC) algorithm discussed in [RFC4868] is 411 used to integrity protect the NSH data. 413 The advantage of using the authenticated encryption algorithm is that 414 NSH-aware SFs and SFC proxies only need to re-compute the message 415 integrity of the NSH data after decrementing the Service Index (SI) 416 and do not have to re-compute the ciphertext. The other advantage is 417 that SFFs do not have access to the ENC_KEY and cannot act on the 418 encrypted Context Headers and, only in case of the second level of 419 assurance, SFFs do have access to the MAC_KEY. Similarly, an NSH- 420 aware SF or SFC Proxy not allowed to decrypt the Context Headers will 421 not have access to the ENC_KEY. 423 The authenticated encryption algorithm or HMAC algorithm to be used 424 by SFC data plane elements is typically controlled using the SFC 425 control plane. Mandatory to implement authenticated encryption and 426 HMAC algorithms are listed in Section 4.3. 428 The authenticated encryption process takes as input four octet 429 strings: a secret key (K), a plaintext (P), Additional Authenticated 430 Data (A) (which contains the data to be authenticated, but not 431 encrypted), and an Initialization Vector (IV). The ciphertext value 432 (E) and the Authentication Tag value (T) are provided as outputs. 434 In order to decrypt and verify, the cipher takes as input K, IV, A, 435 T, and E. The output is either the plaintext or an error indicating 436 that the decryption failed as described in Section 5.2.2.2 of 437 [RFC7518]. 439 4.3. Mandatory-to-Implement Authenticated Encryption and HMAC 440 Algorithms 442 Classifiers, NSH-aware SFs, and SFC proxies MUST implement the 443 AES_128_CBC_HMAC_SHA_256 algorithm and SHOULD implement the 444 AES_192_CBC_HMAC_SHA_384 and AES_256_CBC_HMAC_SHA_512 algorithms. 446 Classifiers, NSH-aware SFs, and SFC proxies MUST implement the HMAC- 447 SHA-256-128 algorithm and SHOULD implement the HMAC-SHA-384-192 and 448 HMAC-SHA-512-256 algorithms. 450 SFFs MAY implement the aforementioned cipher suites and HMAC 451 algorithms. 453 Note: The use of AES-GCM + HMAC may have CPU and packet size 454 implications (need for a second 128-bit authentication tag). 456 4.4. Key Management 458 The procedure for the allocation/provisioning of secret keys (K) and 459 authenticated encryption algorithm or MAC_KEY and HMAC algorithm is 460 outside the scope of this specification. As such, this specification 461 does not mandate the support of any specific mechanism. 463 The documents does not assume nor preclude the following: 465 o The same keying material is used for all the service functions 466 used within an SFC-enabled domain. 468 o Distinct keying material is used per SFP by all involved SFC data 469 path elements. 471 o Per-tenant keys are used. 473 In order to accommodate deployments relying upon keying material per 474 SFC/SFP and also the need to update keys after encrypting NSH data 475 for certain amount of time, this document uses key identifier (kid) 476 to unambiguously identify the appropriate keying material. Doing so 477 allows to address the problem of synchronization of keying material. 479 Additional information on manual vs. automated key management and 480 when one should be used over the other can be found in [RFC4107]. 482 4.5. New NSH Variable-Length Context Headers 484 New NSH Variable-Length Context Headers are defined in Section 5 for 485 NSH data integrity protection and, optionally, encryption of Context 486 Headers carrying privacy-sensitive metadata. Concretely, an NSH 487 imposer includes (1) the key identifier to identify the keying 488 material, (2) the timestamp to protect against replay attacks 489 (Section 7.4), and (3) the Message Authentication Code (MAC) for the 490 target NSH data (depending on the integrity protection scope) 491 calculated using the MAC_KEY and optionally Context Headers encrypted 492 using ENC_KEY. 494 An SFC data plane element that needs to check the integrity of the 495 NSH data uses MAC_KEY and the HMAC algorithm for the key identifier 496 being carried in the NSH. 498 An NSH-aware SF or SFC Proxy that needs to decrypt some Context 499 Headers uses ENC_Key and the decryption algorithm for the key 500 identifier being carried in the NSH. 502 Section 7 specifies the detailed procedure. 504 4.6. Encapsulation of NSH within NSH 506 As discussed in [RFC8459], an SFC-enabled domain (called, upper-level 507 domain) may be decomposed into many sub-domains (called, lower-level 508 domains). In order to avoid maintaining state to restore back upper- 509 lower NSH information at the boundaries of lower-level domains, two 510 NSH levels are used: an Upper-NSH which is imposed at the boundaries 511 of the upper-level domain and a Lower-NSH that is pushed by the 512 Classifier of a lower-level domain in front of the original NSH 513 (Figure 4). As such, the Upper-NSH information is carried along the 514 lower-level chain without modification. The packet is forwarded in 515 the top-level domain according to the Upper-NSH, while it is 516 forwarded according to the Lower-NSH in a lower-level domain. 518 +---------------------------------+ 519 | Transport Encapsulation | 520 +->+---------------------------------+ 521 | | Lower-NSH Header | 522 | +---------------------------------+ 523 | | Upper-NSH Header | 524 | +---------------------------------+ 525 | | Original Packet | 526 +->+---------------------------------+ 527 | 528 | 529 +----Scope of NSH security protection 530 provided by a lower-level domain 532 Figure 4: Encapsulation of NSH within NSH 534 SFC data plane elements of a lower-level domain includes the Upper- 535 NSH when computing the MAC. 537 Keying material used at the upper-level domain SHOULD NOT be the same 538 as the one used by a lower-level domain. 540 5. New NSH Variable-Length Context Headers 542 This section specifies the format of new Variable-Length Context 543 headers that are used for NSH integrity protection and, optionally, 544 Context Headers encryption. 546 In particular, this section defines two "MAC and Encrypted Metadata" 547 Context Headers; each having specific deployment constraints. Unlike 548 Section 5.1, the level of assurance provided in Section 5.2 requires 549 sharing MAC_KEY with SFFs. Both Context headers have the same format 550 as shown in Section 5. 552 0 1 2 3 553 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 554 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 555 | Metadata Class | Type |U| Length | 556 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 557 | Key Length | Key Identifier (Variable) ~ 558 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 559 ~ Timestamp (8 bytes) ~ 560 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 561 | IV Length | Initialization Vector (Variable) ~ 562 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 563 | | 564 | Message Authentication Code and optional Encrypted | 565 ~ Context Headers ~ 566 | | 567 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 569 Figure 5: MAC and Encrypted Metadata Context Header 571 The "MAC and Encrypted Metadata" Context Headers are padded out to a 572 multiple of 4 bytes as per Section 2.2 of [RFC8300]. 574 5.1. MAC#1 Context Header 576 MAC#1 Context Header is a variable-length Context Header that carries 577 the Message Authentication Code (MAC) for the Service Path Header, 578 Context Headers, and the inner packet on which NSH is imposed, 579 calculated using MAC_KEY and optionally Context Headers encrypted 580 using ENC_KEY. The scope of the integrity protection provided by 581 this Context Header is depicted in Figure 6. 583 This MAC scheme does not require sharing MAC_KEY with SFFs. It does 584 not require to re-compute the MAC by each SFF because of TTL 585 processing. Section 9.1 discusses the possible threat associated 586 with this level of assurance. 588 0 1 2 3 589 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 590 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 591 |Ver|O|U| TTL | Length |U|U|U|U|MD Type| Next Protocol | 592 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--+ 593 | Service Path Identifier | Service Index | | 594 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 595 | | | 596 ~ Variable-Length Unencrypted Context Headers (opt.) ~ | 597 | | | 598 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 599 | Metadata Class | Type |U| Length | | 600 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 601 | Key Length | Key Identifier ~ | 602 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 603 ~ Timestamp (8 bytes) ~ | 604 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 605 | IV Length | Initialization Vector ~ | 606 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 607 | ~ Context Headers to encrypt (opt.) ~ | 608 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 609 | | | | 610 | ~ Inner Packet on which NSH is imposed ~ | 611 | | | | 612 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--| 613 | | 614 | | 615 | | 616 | Integrity Protection Scope ----+ 617 +----Encrypted Data 619 Figure 6: Scope of MAC#1 621 In reference to Figure 5, the description of the fields is as 622 follows: 624 o Metadata Class: MUST be set to 0x0 (Section 2.5.1 of [RFC8300]). 626 o Type: TBD1 (See Section 10) 628 o U: Unassigned bit (Section 2.5.1 of [RFC8300]). 630 o Length: Variable. Padding considerations are discussed in 631 Section 2.5.1 of [RFC8300]. 633 o Key Length: Variable. Carries the length of the key identifier. 635 o Key Identifier: Carries a variable length Key Identifier object 636 used to identify and deliver keys to SFC data plane elements. 637 This identifier is helpful to accommodate deployments relying upon 638 keying material per SFC/SFP. The key identifier helps in 639 resolving the problem of synchronization of keying material. 641 o Timestamp: Carries an unsigned 64-bit integer value that is 642 expressed in seconds relative to 1970-01-01T00:00Z in UTC time. 643 See Section 6 for more details. 645 o IV Length: Carries the length of the IV (Section 5.2 of 646 [RFC7518]). If encryption is not used, IV length is set to zero 647 (that is, no "Initialization Vector" is included). 649 o Initialization Vector: Carries the IV for authenticated encryption 650 algorithm as discussed in Section 5.2 of [RFC7518]. 652 o The Additional Authenticated Data (defined in [RFC7518]) MUST be 653 the Service Path header, the unencrypted Context headers, and the 654 inner packet on which the NSH is imposed . 656 o Message Authentication Code covering the entire NSH data excluding 657 the Base header. 659 5.2. MAC#2 Context Header 661 MAC#2 Context Header is a variable-length Context Header that carries 662 the MAC for the entire NSH data calculated using MAC_KEY and 663 optionally Context Headers encrypted using ENC_KEY. The scope of the 664 integrity protection provided by this Context Header is depicted in 665 Figure 7. 667 0 1 2 3 668 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 669 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--+ 670 |Ver|O|U| TTL | Length |U|U|U|U|MD Type| Next Protocol | | 671 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 672 | Service Path Identifier | Service Index | | 673 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 674 | | | 675 ~ Variable-Length Unencrypted Context Headers (opt.) ~ | 676 | | | 677 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 678 | Metadata Class | Type |U| Length | | 679 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 680 | Key Length | Key Identifier ~ | 681 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 682 ~ Timestamp (8 bytes) ~ | 683 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 684 | IV Length | Initialization Vector | | 685 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 686 | ~ Context Headers to encrypt (opt.) ~ | 687 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 688 | | | | 689 | ~ Inner Packet on which NSH is imposed ~ | 690 | | | | 691 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--| 692 | | 693 | | 694 | | 695 | Integrity Protection Scope ----+ 696 +----Encrypted Data 698 Figure 7: Scope of MAC#2 700 In reference to Figure 5, the description of the fields is as 701 follows: 703 o Metadata Class: MUST be set to 0x0 (Section 2.5.1 of [RFC8300]). 705 o Type: TBD2 (See Section 10) 707 o U: Unassigned bit (Section 2.5.1 of [RFC8300]). 709 o Length: Variable. Padding considerations are discussed in 710 Section 2.5.1 of [RFC8300]. 712 o Key Length: See Section 5.1. 714 o Key Identifier: See Section 5.1. 716 o Timestamp: See Section 6. 718 o IV Length: See Section 5.1. 720 o Initialization Vector: See Section 5.1. 722 o The Additional Authenticated Data (defined in [RFC7518]) MUST be 723 the entire NSH data (i.e., including the Base Header) excluding 724 the Context Headers to be encrypted. 726 o Message Authentication Code covering the entire NSH data and 727 optional encrypted Context Headers. 729 6. Timestamp Format 731 This section follows the template provided in Section 3 of [RFC8877]. 733 The format of the Timestamp field introduced in Section 5 is depicted 734 in Figure 8. 736 0 1 2 3 737 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 738 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 739 | Seconds | 740 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 741 | Fraction | 742 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 744 Figure 8: Timestamp Field Format 746 Timestamp field format: 748 Seconds: specifies the integer portion of the number of seconds 749 since the epoch. 751 + Size: 32 bits. 753 + Units: seconds. 755 Fraction: specifies the fractional portion of the number of 756 seconds since the epoch. 758 + Size: 32 bits. 760 + Units: the unit is 2^(-32) seconds, which is roughly equal to 761 233 picoseconds. 763 Epoch: 765 The epoch is 1970-01-01T00:00Z in UTC time. 767 Leap seconds: 769 This timestamp format is affected by leap seconds. The timestamp 770 represents the number of seconds elapsed since the epoch minus the 771 number of leap seconds. 773 Resolution: 775 The resolution is 2^(-32) seconds. 777 Wraparound: 779 This time format wraps around every 2^32 seconds, which is roughly 780 136 years. The next wraparound will occur in the year 2106. 782 Synchronization aspects: 784 It is assumed that SFC data plane elements are synchronized to UTC 785 using a synchronization mechanism that is outside the scope of 786 this document. In typical deployments SFC data plane elements use 787 NTP [RFC5905] for synchronization. Thus, the timestamp may be 788 derived from the NTP-synchronized clock, allowing the timestamp to 789 be measured with respect to the clock of an NTP server. Since the 790 NTP time format is affected by leap seconds, the current timestamp 791 format is similarly affected. Therefore, the value of a timestamp 792 during or slightly after a leap second may be temporarily 793 inaccurate. 795 7. Processing Rules 797 The following subsections describe the processing rules for integrity 798 protected NSH and optionally encrypted Context Headers. 800 7.1. Generic Behavior 802 This document adheres to the recommendations in [RFC8300] for 803 handling the Context Headers at both ingress and egress SFC boundary 804 nodes (i.e., to strip the entire NSH, including Context Headers). 806 Failures of a classifier to inject the Context Headers defined in 807 this document SHOULD be logged locally while a notification alarm MAY 808 be sent to an SFC control element. Failures of an NSH-aware node to 809 validate the integrity of the NSH data MUST cause that packet to be 810 discarded while a notification alarm MAY be sent to an SFC control 811 element. The details of sending notification alarms (i.e., the 812 parameters affecting the transmission of the notification alarms 813 depend on the information in the context header such as frequency, 814 thresholds, and content in the alarm) SHOULD be configurable by the 815 SFC control plane. 817 NSH-aware SFs and SFC proxies MAY be instructed to strip some 818 encrypted Context Headers from the packet or to pass the data to the 819 next SF in the service function chain after processing the content of 820 the Context Headers. If no instruction is provided, the default 821 behavior for intermediary NSH-aware nodes is to maintain such Context 822 Headers so that the information can be passed to next NSH-aware hops. 823 NSH-aware SFs and SFC proxies MUST re-apply the integrity protection 824 if any modification is made to the Context Headers (strip a Context 825 Header, update the content of an existing Context Header, insert a 826 new Context Header). 828 An NSH-aware SF or SFC Proxy that is not allowed to decrypt any 829 Context Headers MUST NOT be given access to the ENC_KEY. 831 Otherwise, an NSH-aware SF or SFC Proxy that receives encrypted 832 Context Headers, for which it is not allowed to consume a specific 833 Context Header it decrypts (but consumes others), MUST keep that 834 Context Header unaltered when forwarding the packet upstream. 836 Only one instance of "MAC and Encrypted Metadata" Context Header 837 (Section 5) is allowed. If multiple instances of "MAC and Encrypted 838 Metadata" Context Header are included in an NSH packet, the SFC data 839 element MUST process the first instance and ignore subsequent 840 instances, and MAY log or increase a counter for this event as per 841 Section 2.5.1 of [RFC8300]. 843 MTU and fragmentation considerations are discussed in Section 8. 845 7.2. MAC NSH Data Generation 847 If the Context Headers are not encrypted, the HMAC algorithm 848 discussed in [RFC4868] is used to integrity protect the target NSH 849 data. An NSH imposer inserts a "MAC and Encrypted Metadata" Context 850 Header for integrity protection (Section 5). 852 The NSH imposer computes the message integrity for the target NSH 853 data (depending on the integrity protection scope discussed in 854 Section 5) using MAC_KEY and HMAC algorithm. It inserts the MAC in 855 the "MAC and Encrypted Metadata" Context Header. The length of the 856 MAC is decided by the HMAC algorithm adopted for the particular key 857 identifier. 859 The Message Authentication Code (T) computation process can be 860 illustrated as follows: 862 T = HMAC-SHA-256-128(MAC_KEY, A) 864 An entity in the SFP that intends to update the NSH MUST follow the 865 above behavior to maintain message integrity of the NSH for 866 subsequent validations. 868 7.3. Encrypted NSH Metadata Generation 870 An NSH imposer can encrypt Context Headers carrying privacy-sensitive 871 metadata, i.e., encrypted and unencrypted metadata may be carried 872 simultaneously in the same NSH packet (Figure 9). 874 0 1 2 3 875 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 876 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 877 |Ver|O|U| TTL | Length |U|U|U|U|MD Type| Next Protocol | 878 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 879 | Service Path Identifier | Service Index | 880 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 881 | | 882 ~ Variable-Length Unencrypted Context Headers (opt.) ~ 883 | | 884 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 885 ~ Key Identifier ~ 886 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 887 ~ Timestamp ~ 888 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 889 | | 890 ~ MAC and Encrypted Context Headers ~ 891 | | 892 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 894 Figure 9: NSH with Encrypted and Unencrypted Metadata 896 In an SFC-enabled domain where pervasive monitoring [RFC7258] is 897 possible, all Context Headers carrying privacy-sensitive metadata 898 MUST be encrypted; doing so, privacy-sensitive metadata is not 899 revealed to attackers. Privacy specific threats are discussed in 900 Section 5.2 of [RFC6973]. 902 Using K and authenticated encryption algorithm, the NSH imposer 903 encrypts the Context Headers (as set by the control plane Section 3), 904 computes the message integrity for the target NSH data, and inserts 905 the resulting payload in the "MAC and Encrypted Metadata" Context 906 Header (Section 5). The entire Context Header carrying a privacy- 907 sensitive metadata is encrypted (that is, including the MD Class, 908 Type, Length, and associated metadata of each Context Header). 910 The message Authentication Tag (T) and ciphertext (E) computation 911 process can be illustrated as follows: 913 MAC_KEY = initial MAC_KEY_LEN octets of K, 914 ENC_KEY = final ENC_KEY_LEN octets of K, 915 E = CBC-PKCS7-ENC(ENC_KEY, P), 916 M = MAC(MAC_KEY, A || IV || E || AL), 917 T = initial T_LEN octets of M. 918 MAC and Encrypted Metadata = E || T 920 As specified in [RFC7518], the octet string (AL) is equal to the 921 number of bits in the Additional Authenticated Data (A) expressed as 922 a 64-bit unsigned big-endian integer. 924 An authorized entity in the SFP that intends to update the content of 925 an encrypted Context Header or needs to add a new encrypted Context 926 Header MUST also follow the aforementioned behavior. 928 An SFF or NSH-aware SF or SFC Proxy that only has access to the 929 MAC_KEY, but not the ENC_KEY, computes the message Authentication Tag 930 (T) after decrementing the TTL (by the SFF) or SI (by an SF or SFC 931 Proxy) and replaces the Authentication Tag in the NSH with the 932 computed Authentication Tag. Similarly, an NSH-aware SF (or SFC 933 Proxy) that does not modify the encrypted Context headers also 934 follows the aforementioned behavior. 936 The message Authentication Tag (T) computation process can be 937 illustrated as follows: 939 M = MAC(MAC_KEY, A || IV || E || AL), 940 T = initial T_LEN octets of M. 942 7.4. Timestamp for Replay Attack 944 The Timestamp imposed by an initial Classifier is left untouched 945 along an SFP. However, it can be updated when reclassification 946 occurs (Section 4.8 of [RFC7665]). The same considerations for 947 setting the Timestamp are followed in both initial classification and 948 reclassification (Section 6). 950 The received NSH is accepted by an NSH-aware node if the Timestamp 951 (TS) in the NSH is recent enough to the reception time of the NSH 952 (TSrt). The following formula is used for this check: 954 -Delta < (TSrt - TS) < +Delta 956 The Delta interval is a configurable parameter. The default value 957 for the allowed Delta is 2 seconds. Special care should be taken 958 when setting very low Delta values as this may lead to dropping 959 legitimate traffic. If the timestamp is not within the boundaries, 960 then the SFC data plane element receiving such packet MUST discard 961 the NSH message. 963 Replay attacks within the Delta window may be detected by an NSH- 964 aware node by recording a unique value derived, for example, from the 965 NSH data and Original packet (e.g., using SHA2). Such NSH-aware node 966 will detect and reject duplicates. If for legitimate service 967 reasons, some flows have to be duplicated but still share portion of 968 an SFP with the original flow, legitimate duplicate packets will be 969 tagged by NSH-aware nodes involved in that segment as replay packets 970 unless sufficient entropy is added to the duplicate packet. 972 Note: Within the timestamp delta window, defining a sequence 973 number to protect against replay attacks may be considered. In 974 such mode, NSH-aware nodes must discard packets with duplicate 975 sequence numbers within the timestamp delta window. However, in 976 deployments with several instances of the same SF (e.g., cluster 977 or load-balanced SFs), a mechanism to coordinate among those 978 instances to discard duplicate sequence numbers is required. 979 Because the coordination mechanism to comply with this requirement 980 is service-specific, this document does not include this 981 protection. 983 All SFC data plane elements must be synchronized among themselves. 984 These elements may be synchronized to a global reference time. 986 7.5. NSH Data Validation 988 When an SFC data plane element receives an NSH packet, it MUST first 989 ensure that a "MAC and Encrypted Metadata" Context Header is 990 included. It MUST silently discard the message if the timestamp is 991 invalid (Section 7.4). It MUST log an error at least once per the 992 SPI for which the "MAC and Encrypted Metadata" Context Header is 993 missing. 995 If the timestamp check is successfully passed, the SFC data plane 996 element proceeds then with NSH data integrity validation. The SFC 997 data plane element computes the message integrity for the target NSH 998 data (depending on the integrity protection scope discussed in 999 Section 5) using the MAC_KEY and HMAC algorithm for the key 1000 identifier. If the value of the newly generated digest is identical 1001 to the one enclosed in the NSH, the SFC data plane element is certain 1002 that the NSH data has not been tampered and validation is therefore 1003 successful. Otherwise, the NSH packet MUST be discarded. 1005 7.6. Decryption of NSH Metadata 1007 If entitled to consume a supplied encrypted Context Header, an NSH- 1008 aware SF or SFC Proxy decrypts metadata using (K) and decryption 1009 algorithm for the key identifier in the NSH. 1011 Authenticated encryption algorithm has only a single output, either a 1012 plaintext or a special symbol (FAIL) that indicates that the inputs 1013 are not authentic (Section 5.2.2.2 of [RFC7518]). 1015 8. MTU Considerations 1017 The SFC architecture prescribes that additional information be added 1018 to packets to: 1020 o Identify SFPs: this is typically the NSH Base Header and Service 1021 Path Header. 1023 o Carry metadata such those defined in Section 5. 1025 o Steer the traffic along the SFPs: transport encapsulation. 1027 This added information increases the size of the packet to be carried 1028 along an SFP. 1030 Aligned with Section 5 of [RFC8300], it is RECOMMENDED for network 1031 operators to increase the underlying MTU so that NSH traffic is 1032 forwarded within an SFC-enabled domain without fragmentation. The 1033 available underlying MTU should be taken into account by network 1034 operators when providing SFs with the required Context Headers to be 1035 injected per SFP and the size of the data to be carried in these 1036 Context Headers. 1038 If the underlying MTU cannot be increased to accommodate the NSH 1039 overhead, network operators may rely upon a transport encapsulation 1040 protocol with the required fragmentation handling. The impact of 1041 activating such feature on SFFs should be carefully assessed by 1042 network operators (Section 5.6 of [RFC7665]). 1044 When dealing with MTU issues, network operators should consider the 1045 limitations of various transport encapsulations such as those 1046 discussed in [I-D.ietf-intarea-tunnels]. 1048 9. Security Considerations 1050 Data plane SFC-related security considerations, including privacy, 1051 are discussed in Section 6 of [RFC7665] and Section 8 of [RFC8300]. 1052 In particular, Section 8.2.2 of [RFC8300] states that attached 1053 metadata (i.e., Context Headers) should be limited to that necessary 1054 for correct operation of the SFP. Also, that section indicates that 1055 [RFC8165] discusses metadata considerations that operators can take 1056 into account when using NSH. 1058 The guidelines for cryptographic key management are discussed in 1059 [RFC4107]. 1061 The interaction between the SFC data plane elements and a key 1062 management system MUST NOT be transmitted in clear since this would 1063 completely destroy the security benefits of the integrity protection 1064 solution defined in this document. The secret key (K) must have an 1065 expiration time assigned as the latest point in time before which the 1066 key may be used for integrity protection of NSH data and encryption 1067 of Context Headers. Prior to the expiration of the secret key, all 1068 participating NSH-aware nodes SHOULD have the control plane 1069 distribute a new key identifier and associated keying material so 1070 that when the secret key is expired, those nodes are prepared with 1071 the new secret key. This allows the NSH imposer to switch to the new 1072 key identifier as soon as necessary. It is RECOMMENDED that the next 1073 key identifier and associated keying material be distributed by the 1074 control plane well prior to the secret key expiration time. 1076 NSH data are exposed to several threats: 1078 o A man-in-the-middle attacker modifying the NSH data. 1080 o Attacker spoofing the NSH data. 1082 o Attacker capturing and replaying the NSH data. 1084 o Data carried in Context Headers revealing privacy-sensitive 1085 information to attackers. 1087 o Attacker replacing the packet on which the NSH is imposed with a 1088 bogus packet. 1090 In an SFC-enabled domain where the above attacks are possible, (1) 1091 NSH data MUST be integrity-protected and replay-protected, and (2) 1092 privacy-sensitive NSH metadata MUST be encrypted for confidentiality 1093 preservation purposes. The Base and Service Path headers are not 1094 encrypted. 1096 MACs with two levels of assurance are defined in Section 5. 1097 Considerations specific to each level of assurance are discussed in 1098 Sections 9.1 and 9.2. 1100 The attacks discussed in [I-D.nguyen-sfc-security-architecture] are 1101 handled owing to the solution specified in this document, except for 1102 attacks dropping packets. Such attacks can be detected relying upon 1103 statistical analysis; such analysis is out of scope of this document. 1104 Also, if SFFs are not involved in the integrity checks, a misbehaving 1105 SFF which decrements SI while this should be done by an SF (SF bypass 1106 attack) will be detected by an upstream SF because the integrity 1107 check will fail. 1109 Some events are logged locally with notification alerts sent by NSH- 1110 aware nodes to a Control Element. These events SHOULD be rate 1111 limited. 1113 The solution specified in this document does not provide data origin 1114 authentication. 1116 In order to detect compromised nodes, it is assumed that appropriate 1117 mechanisms to monitor and audit an SFC-enabled domain to detect 1118 misbehavior and to deter misuse are in place. Compromised nodes can 1119 thus be withdrawn from active service function chains using 1120 appropriate control plane mechanisms. 1122 9.1. MAC#1 1124 An active attacker can potentially modify the Base header (e.g., 1125 decrement the TTL so the next SFF in the SFP discards the NSH 1126 packet). In the meantime, an active attacker can also drop NSH 1127 packets. As such, this attack is not considered an attack against 1128 the security mechanism specified in the document. 1130 No device other than the NSH-aware SFs in the SFC-enabled domain 1131 should be able to update the integrity protected NSH data. 1132 Similarly, no device other than the NSH-aware SFs and SFC proxies in 1133 the SFC-enabled domain should be able to decrypt and update the 1134 Context Headers carrying privacy-sensitive metadata. In other words, 1135 if the NSH-aware SFs and SFC proxies in the SFC-enabled domain are 1136 considered fully trusted to act on the NSH data, only these elements 1137 can have access to privacy-sensitive NSH metadata and the keying 1138 material used to integrity protect NSH data and encrypt Context 1139 Headers. 1141 9.2. MAC#2 1143 SFFs can detect whether an illegitimate node has altered the content 1144 of the Base header. Such messages must be discarded with appropriate 1145 logs and alarms generated (see Section 7.1). 1147 9.3. Time Synchronization 1149 Section 5.6 of [RFC8633] describes best current practices to be 1150 considered in deployments where SFC data plane elements use NTP for 1151 time synchronization purposes. 1153 Also, a mechanism to provide cryptographic security for NTP is 1154 specified in [RFC8915]. 1156 10. IANA Considerations 1158 This document requests IANA to assign the following types from the 1159 "NSH IETF-Assigned Optional Variable-Length Metadata Types" (0x0000 1160 IETF Base NSH MD Class) registry available at: 1161 https://www.iana.org/assignments/nsh/nsh.xhtml#optional-variable- 1162 length-metadata-types. 1164 +-------+-------------------------------+----------------+ 1165 | Value | Description | Reference | 1166 +=======+===============================+================+ 1167 | TBD1 | MAC and Encrypted Metadata #1 | [ThisDocument] | 1168 | TBD2 | MAC and Encrypted Metadata #2 | [ThisDocument] | 1169 +-------+-------------------------------+----------------+ 1171 11. Acknowledgements 1173 This document was edited as a follow up to the discussion in 1174 IETF#104: https://datatracker.ietf.org/meeting/104/materials/slides- 1175 104-sfc-sfc-chair-slides-01 (slide 7). 1177 Thanks to Joel Halpern, Christian Jacquenet, Dirk von Hugo, Tal 1178 Mizrahi, Daniel Migault, Diego Lopez, and Greg Mirsky for the 1179 comments. 1181 Many thanks to Steve Hanna for the valuable secdir review. 1183 12. References 1185 12.1. Normative References 1187 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1188 Requirement Levels", BCP 14, RFC 2119, 1189 DOI 10.17487/RFC2119, March 1997, 1190 . 1192 [RFC4107] Bellovin, S. and R. Housley, "Guidelines for Cryptographic 1193 Key Management", BCP 107, RFC 4107, DOI 10.17487/RFC4107, 1194 June 2005, . 1196 [RFC4868] Kelly, S. and S. Frankel, "Using HMAC-SHA-256, HMAC-SHA- 1197 384, and HMAC-SHA-512 with IPsec", RFC 4868, 1198 DOI 10.17487/RFC4868, May 2007, 1199 . 1201 [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, 1202 DOI 10.17487/RFC7518, May 2015, 1203 . 1205 [RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function 1206 Chaining (SFC) Architecture", RFC 7665, 1207 DOI 10.17487/RFC7665, October 2015, 1208 . 1210 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1211 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1212 May 2017, . 1214 [RFC8300] Quinn, P., Ed., Elzur, U., Ed., and C. Pignataro, Ed., 1215 "Network Service Header (NSH)", RFC 8300, 1216 DOI 10.17487/RFC8300, January 2018, 1217 . 1219 [RFC8877] Mizrahi, T., Fabini, J., and A. Morton, "Guidelines for 1220 Defining Packet Timestamps", RFC 8877, 1221 DOI 10.17487/RFC8877, September 2020, 1222 . 1224 12.2. Informative References 1226 [I-D.arkko-farrell-arch-model-t] 1227 Arkko, J. and S. Farrell, "Challenges and Changes in the 1228 Internet Threat Model", draft-arkko-farrell-arch-model- 1229 t-04 (work in progress), July 2020. 1231 [I-D.ietf-intarea-tunnels] 1232 Touch, J. and M. Townsley, "IP Tunnels in the Internet 1233 Architecture", draft-ietf-intarea-tunnels-10 (work in 1234 progress), September 2019. 1236 [I-D.nguyen-sfc-security-architecture] 1237 Nguyen, T. and M. Park, "A Security Architecture Against 1238 Service Function Chaining Threats", draft-nguyen-sfc- 1239 security-architecture-00 (work in progress), November 1240 2019. 1242 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1243 "Network Time Protocol Version 4: Protocol and Algorithms 1244 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1245 . 1247 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1248 Morris, J., Hansen, M., and R. Smith, "Privacy 1249 Considerations for Internet Protocols", RFC 6973, 1250 DOI 10.17487/RFC6973, July 2013, 1251 . 1253 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 1254 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 1255 2014, . 1257 [RFC7498] Quinn, P., Ed. and T. Nadeau, Ed., "Problem Statement for 1258 Service Function Chaining", RFC 7498, 1259 DOI 10.17487/RFC7498, April 2015, 1260 . 1262 [RFC7635] Reddy, T., Patil, P., Ravindranath, R., and J. Uberti, 1263 "Session Traversal Utilities for NAT (STUN) Extension for 1264 Third-Party Authorization", RFC 7635, 1265 DOI 10.17487/RFC7635, August 2015, 1266 . 1268 [RFC8165] Hardie, T., "Design Considerations for Metadata 1269 Insertion", RFC 8165, DOI 10.17487/RFC8165, May 2017, 1270 . 1272 [RFC8459] Dolson, D., Homma, S., Lopez, D., and M. Boucadair, 1273 "Hierarchical Service Function Chaining (hSFC)", RFC 8459, 1274 DOI 10.17487/RFC8459, September 2018, 1275 . 1277 [RFC8633] Reilly, D., Stenn, H., and D. Sibold, "Network Time 1278 Protocol Best Current Practices", BCP 223, RFC 8633, 1279 DOI 10.17487/RFC8633, July 2019, 1280 . 1282 [RFC8915] Franke, D., Sibold, D., Teichel, K., Dansarie, M., and R. 1283 Sundblad, "Network Time Security for the Network Time 1284 Protocol", RFC 8915, DOI 10.17487/RFC8915, September 2020, 1285 . 1287 Authors' Addresses 1289 Mohamed Boucadair 1290 Orange 1291 Rennes 35000 1292 France 1294 Email: mohamed.boucadair@orange.com 1296 Tirumaleswar Reddy 1297 McAfee, Inc. 1298 Embassy Golf Link Business Park 1299 Bangalore, Karnataka 560071 1300 India 1302 Email: TirumaleswarReddy_Konda@McAfee.com 1304 Dan Wing 1305 Citrix Systems, Inc. 1306 USA 1308 Email: dwing-ietf@fuggles.com