idnits 2.17.1 draft-ietf-sfc-nsh-integrity-05.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 (March 23, 2021) is 1129 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 1145, but not defined ** Downref: Normative reference to an Informational RFC: RFC 7665 == Outdated reference: A later version (-13) exists of draft-ietf-intarea-tunnels-10 Summary: 1 error (**), 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: September 24, 2021 McAfee 6 D. Wing 7 Citrix 8 March 23, 2021 10 Integrity Protection for the Network Service Header (NSH) and Encryption 11 of Sensitive Context Headers 12 draft-ietf-sfc-nsh-integrity-05 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 September 24, 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 . . . . . 6 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 . . . . . . . . . . . . . . . 22 79 8. MTU Considerations . . . . . . . . . . . . . . . . . . . . . 22 80 9. Security Considerations . . . . . . . . . . . . . . . . . . . 23 81 9.1. MAC#1 . . . . . . . . . . . . . . . . . . . . . . . . . . 25 82 9.2. MAC#2 . . . . . . . . . . . . . . . . . . . . . . . . . . 25 83 9.3. Time Synchronization . . . . . . . . . . . . . . . . . . 25 84 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 25 85 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 26 86 12. References . . . . . . . . . . . . . . . . . . . . . . . . . 26 87 12.1. Normative References . . . . . . . . . . . . . . . . . . 26 88 12.2. Informative References . . . . . . . . . . . . . . . . . 27 89 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 28 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 encapsulations (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) that are not authorized to 123 access the privacy-sensitive metadata will have access to the 124 metadata. As a reminder, the metadata referred to is an information 125 that is inserted by Classifiers or intermediate SFs and shared with 126 downstream SFs; such information is not visible to the communication 127 endpoints (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 NSH-supplied information 148 along an SFP to entities that have a need to interpret it. 150 It is out of the scope of this document to specify an NSH-aware 151 control plane solution. 153 2. Terminology 155 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 156 "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED", "MAY", and 157 "OPTIONAL" in this document are to be interpreted as described in BCP 158 14 [RFC2119] [RFC8174] when, and only when, they appear in all 159 capitals, as shown here. 161 This document makes use of the terms defined in [RFC7665] and 162 [RFC8300]. 164 The document defines the following terms: 166 SFC data plane element: Refers to NSH-aware SF, SFF, SFC Proxy, or 167 Classifier as defined in the SFC data plane architecture [RFC7665] 168 and further refined in [RFC8300]. 170 SFC control element: Is a logical entity that instructs one or more 171 SFC data plane elements on how to process NSH packets within an 172 SFC-enabled domain. 174 Key Identifier: Is used to identify and deliver keys to authorized 175 entities. See, for example, 'kid' usage in [RFC7635]. 177 NSH data: The NSH is composed of a Base Header, a Service Path 178 Header, and optional Context Headers. NSH data refers to all the 179 above headers and the packet or frame on which the NSH is imposed 180 to realize an SFP. 182 NSH imposer: Refers to an SFC data plane element that is entitled to 183 impose the NSH with the Context Headers defined in this document. 185 3. Assumptions and Basic Requirements 187 Section 2 of [RFC8300] specifies that the NSH data can be spread over 188 three headers: 190 o Base Header: Provides information about the service header and the 191 payload protocol. 193 o Service Path Header: Provides path identification and location 194 within an SFP. 196 o Context Header(s): Carries metadata (i.e., context data) along a 197 service path. 199 The NSH allows to share context information (a.k.a., metadata) with 200 downstream NSH-aware data plane elements on a per SFC/SFP basis. To 201 that aim: 203 The Classifier is instructed about the set of context information 204 to be supplied for a given service function chain. 206 An NSH-aware SF is instructed about any metadata it needs to 207 attach to packets for a given service function chain. This 208 instruction may occur any time during the validity lifetime of an 209 SFC/SFP. For a given service function chain, the NSH-aware SF is 210 also provided with an order for consuming a set of contexts 211 supplied in a packet. 213 An NSH-aware SF can also be instructed about the behavior it 214 should adopt after consuming context information that was supplied 215 in the NSH. For example, the context information can be 216 maintained, 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 information can be 221 maintained or stripped). The SFC Proxy may also be instructed to 222 add some new context information into the NSH on behalf of an NSH- 223 unaware 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 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 Classifier(s), NSH-aware SFs, and SFC proxies are instructed with the 308 set of Context Headers (privacy-sensitive metadata, typically) that 309 must be encrypted. Encryption keying material is only provided to 310 these SFC data plane elements. 312 The control plane may indicate the set of SFC data plane elements 313 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 The first level of assurance where all NSH data except the Base 329 Header are integrity protected (Figure 2). In this case, the NSH 330 imposer may be a Classifier, an NSH-aware SF, or an SFC Proxy. SFFs 331 are not thus provided with authentication material. Further details 332 are 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 The 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 protect the integrity of 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 Advanced Encryption Standard (AES) in Galois/ 454 Counter Mode (GCM) + HMAC may have CPU and packet size 455 implications (need for a second 128-bit authentication tag). 457 4.4. Key Management 459 The procedure for the allocation/provisioning of secret keys (K) and 460 authenticated encryption algorithm or MAC_KEY and HMAC algorithm is 461 outside the scope of this specification. As such, this specification 462 does not mandate the support of any specific mechanism. 464 The document does not assume nor preclude the following: 466 o The same keying material is used for all the service functions 467 used within an SFC-enabled domain. 469 o Distinct keying material is used per SFP by all involved SFC data 470 path elements. 472 o Per-tenant keys are used. 474 In order to accommodate deployments relying upon keying material per 475 SFC/SFP and also the need to update keys after encrypting NSH data 476 for a certain amount of time, this document uses key identifiers to 477 unambiguously identify the appropriate keying material. Doing so 478 allows to address the problem of synchronization of keying material. 480 Additional information on manual vs. automated key management and 481 when one should be used over the other can be found in [RFC4107]. 483 4.5. New NSH Variable-Length Context Headers 485 New NSH Variable-Length Context Headers are defined in Section 5 for 486 NSH data integrity protection and, optionally, encryption of Context 487 Headers carrying privacy-sensitive metadata. Concretely, an NSH 488 imposer includes (1) the key identifier to identify the keying 489 material, (2) the timestamp to protect against replay attacks 490 (Section 7.4), and (3) the Message Authentication Code (MAC) for the 491 target NSH data (depending on the integrity protection scope) 492 calculated using the MAC_KEY and optionally Context Headers encrypted 493 using ENC_KEY. 495 An SFC data plane element that needs to check the integrity of the 496 NSH data uses MAC_KEY and the HMAC algorithm for the key identifier 497 being carried in the NSH. 499 An NSH-aware SF or SFC Proxy that needs to decrypt some Context 500 Headers uses ENC_Key and the decryption algorithm for the key 501 identifier being carried in the NSH. 503 Section 7 specifies the detailed procedure. 505 4.6. Encapsulation of NSH within NSH 507 As discussed in [RFC8459], an SFC-enabled domain (called, upper-level 508 domain) may be decomposed into many sub-domains (called, lower-level 509 domains). In order to avoid maintaining state to restore back upper- 510 lower NSH information at the boundaries of lower-level domains, two 511 NSH levels are used: an Upper-NSH which is imposed at the boundaries 512 of the upper-level domain and a Lower-NSH that is pushed by the 513 Classifier of a lower-level domain in front of the original NSH 514 (Figure 4). As such, the Upper-NSH information is carried along the 515 lower-level chain without modification. The packet is forwarded in 516 the top-level domain according to the Upper-NSH, while it is 517 forwarded according to the Lower-NSH in a lower-level domain. 519 +---------------------------------+ 520 | Transport Encapsulation | 521 +->+---------------------------------+ 522 | | Lower-NSH Header | 523 | +---------------------------------+ 524 | | Upper-NSH Header | 525 | +---------------------------------+ 526 | | Original Packet | 527 +->+---------------------------------+ 528 | 529 | 530 +----Scope of NSH security protection 531 provided by a lower-level domain 533 Figure 4: Encapsulation of NSH within NSH 535 SFC data plane elements of a lower-level domain include the Upper-NSH 536 when computing the MAC. 538 Keying material used at the upper-level domain SHOULD NOT be the same 539 as the one used by a lower-level domain. 541 5. New NSH Variable-Length Context Headers 543 This section specifies the format of new Variable-Length Context 544 headers that are used for NSH integrity protection and, optionally, 545 Context Headers encryption. 547 In particular, this section defines two "MAC and Encrypted Metadata" 548 Context Headers; each having specific deployment constraints. Unlike 549 Section 5.1, the level of assurance provided in Section 5.2 requires 550 sharing MAC_KEY with SFFs. Both Context headers have the same format 551 as shown in Figure 5. 553 0 1 2 3 554 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 555 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 556 | Metadata Class | Type |U| Length | 557 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 558 | Key Length | Key Identifier (Variable) ~ 559 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 560 ~ Timestamp (8 bytes) ~ 561 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 562 | IV Length | Initialization Vector (Variable) ~ 563 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 564 | Message Authentication Code and optional Encrypted | 565 ~ Context Headers (Variable) ~ 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 ~ Variable-Length Unencrypted Context Headers (opt.) ~ | 596 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 597 | Metadata Class | Type |U| Length | | 598 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 599 | Key Length | Key Identifier (Variable) ~ | 600 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 601 ~ Timestamp (8 bytes) ~ | 602 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 603 | IV Length | Initialization Vector (Variable) ~ | 604 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 605 | ~ Encrypted Context Headers (opt.) ~ | 606 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 607 | ~ Message Authentication Code ~ | 608 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 609 | | | | 610 | ~ Inner Packet on which NSH is imposed ~ | 611 | | | | 612 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--| 613 | | 614 | Integrity Protection Scope ----+ 615 +----Encrypted Data 617 Figure 6: Scope of MAC#1 619 In reference to Figure 5, the description of the fields is as 620 follows: 622 Metadata Class: MUST be set to 0x0 (Section 2.5.1 of [RFC8300]). 624 Type: TBD1 (See Section 10) 626 U: Unassigned bit (Section 2.5.1 of [RFC8300]). 628 Length: Variable. Padding considerations are discussed in 629 Section 2.5.1 of [RFC8300]. 631 Key Length: Variable. Carries the length of the key identifier. 633 Key Identifier: Carries a variable-length Key Identifier object used 634 to identify and deliver keys to SFC data plane elements. This 635 identifier is helpful to accommodate deployments relying upon 636 keying material per SFC/SFP. The key identifier helps in 637 resolving the problem of synchronization of keying material. 639 Timestamp: Carries an unsigned 64-bit integer value that is 640 expressed in seconds relative to 1970-01-01T00:00Z in UTC time. 641 See Section 6 for more details. 643 IV Length: Carries the length of the IV (Section 5.2 of [RFC7518]). 644 If encryption is not used, IV length is set to zero (that is, no 645 "Initialization Vector" is included). 647 Initialization Vector: Carries the IV for authenticated encryption 648 algorithm as discussed in Section 5.2 of [RFC7518]. 650 Encrypted Context Headers: Carries the optional encrypted Context 651 Headers. 653 Message Authentication Code: Covers the entire NSH data, excluding 654 the Base header. The Additional Authenticated Data (defined in 655 [RFC7518]) MUST be the Service Path header, the unencrypted 656 Context headers, and the inner packet on which the NSH is imposed. 658 5.2. MAC#2 Context Header 660 MAC#2 Context Header is a variable-length Context Header that carries 661 the MAC for the entire NSH data calculated using MAC_KEY and 662 optionally Context Headers encrypted using ENC_KEY. The scope of the 663 integrity protection provided by this Context Header is depicted in 664 Figure 7. 666 0 1 2 3 667 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 668 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--+ 669 |Ver|O|U| TTL | Length |U|U|U|U|MD Type| Next Protocol | | 670 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 671 | Service Path Identifier | Service Index | | 672 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 673 ~ Variable-Length Unencrypted Context Headers (opt.) ~ | 674 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 675 | Metadata Class | Type |U| Length | | 676 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 677 | Key Length | Key Identifier (Variable) ~ | 678 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 679 ~ Timestamp (8 bytes) ~ | 680 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 681 | IV Length | Initialization Vector (Variable) ~ | 682 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 683 | ~ Encrypted Context Headers (opt.) ~ | 684 +->+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 685 | ~ Message Authentication Code ~ | 686 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | 687 | | | | 688 | ~ Inner Packet on which NSH is imposed ~ | 689 | | | | 690 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+<--| 691 | | 692 | Integrity Protection Scope ----+ 693 +----Encrypted Data 695 Figure 7: Scope of MAC#2 697 In reference to Figure 5, the description of the fields is as 698 follows: 700 Metadata Class: MUST be set to 0x0 (Section 2.5.1 of [RFC8300]). 702 Type: TBD2 (See Section 10) 704 U: Unassigned bit (Section 2.5.1 of [RFC8300]). 706 Length: Variable. Padding considerations are discussed in 707 Section 2.5.1 of [RFC8300]. 709 Key Length: See Section 5.1. 711 Key Identifier: See Section 5.1. 713 Timestamp: See Section 6. 715 IV Length: See Section 5.1. 717 Initialization Vector: See Section 5.1. 719 Encrypted Context Headers: Carries the optional encrypted Context 720 Headers. 722 Message Authentication Code: Coves the entire NSH data. The 723 Additional Authenticated Data (defined in [RFC7518]) MUST be the 724 entire NSH data (i.e., including the Base Header) excluding the 725 Context Headers to be encrypted. 727 6. Timestamp Format 729 This section follows the template provided in Section 3 of [RFC8877]. 731 The format of the Timestamp field introduced in Section 5 is depicted 732 in Figure 8. 734 0 1 2 3 735 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 736 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 737 | Seconds | 738 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 739 | Fraction | 740 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 742 Figure 8: Timestamp Field Format 744 Timestamp field format: 746 Seconds: specifies the integer portion of the number of seconds 747 since the epoch. 749 + Size: 32 bits. 751 + Units: seconds. 753 Fraction: specifies the fractional portion of the number of 754 seconds since the epoch. 756 + Size: 32 bits. 758 + Units: the unit is 2^(-32) seconds, which is roughly equal to 759 233 picoseconds. 761 Epoch: 763 The epoch is 1970-01-01T00:00Z in UTC time. 765 Leap seconds: 767 This timestamp format is affected by leap seconds. The timestamp 768 represents the number of seconds elapsed since the epoch minus the 769 number of leap seconds. 771 Resolution: 773 The resolution is 2^(-32) seconds. 775 Wraparound: 777 This time format wraps around every 2^32 seconds, which is roughly 778 136 years. The next wraparound will occur in the year 2106. 780 Synchronization aspects: 782 It is assumed that SFC data plane elements are synchronized to UTC 783 using a synchronization mechanism that is outside the scope of 784 this document. In typical deployments, SFC data plane elements 785 use NTP [RFC5905] for synchronization. Thus, the timestamp may be 786 derived from the NTP-synchronized clock, allowing the timestamp to 787 be measured with respect to the clock of an NTP server. Since the 788 NTP time format is affected by leap seconds, the current timestamp 789 format is similarly affected. Therefore, the value of a timestamp 790 during or slightly after a leap second may be temporarily 791 inaccurate. 793 7. Processing Rules 795 The following subsections describe the processing rules for integrity 796 protected NSH and optionally encrypted Context Headers. 798 7.1. Generic Behavior 800 This document adheres to the recommendations in [RFC8300] for 801 handling the Context Headers at both ingress and egress SFC boundary 802 nodes (i.e., to strip the entire NSH, including Context Headers). 804 Failures of a classifier to inject the Context Headers defined in 805 this document SHOULD be logged locally while a notification alarm MAY 806 be sent to an SFC control element. Failures of an NSH-aware node to 807 validate the integrity of the NSH data MUST cause that packet to be 808 discarded while a notification alarm MAY be sent to an SFC control 809 element. The details of sending notification alarms (i.e., the 810 parameters affecting the transmission of the notification alarms 811 depend on the information in the context header such as frequency, 812 thresholds, and content in the alarm) SHOULD be configurable. 814 NSH-aware SFs and SFC proxies MAY be instructed to strip some 815 encrypted Context Headers from the packet or to pass the data to the 816 next SF in the service function chain after processing the content of 817 the Context Headers. If no instruction is provided, the default 818 behavior for intermediary NSH-aware nodes is to maintain such Context 819 Headers so that the information can be passed to next NSH-aware hops. 820 NSH-aware SFs and SFC proxies MUST re-apply the integrity protection 821 if any modification is made to the Context Headers (strip a Context 822 Header, update the content of an existing Context Header, insert a 823 new Context Header). 825 An NSH-aware SF or SFC Proxy that is not allowed to decrypt any 826 Context Headers MUST NOT be given access to the ENC_KEY. 828 Otherwise, an NSH-aware SF or SFC Proxy that receives encrypted 829 Context Headers, for which it is not allowed to consume a specific 830 Context Header it decrypts (but consumes others), MUST keep that 831 Context Header unaltered when forwarding the packet upstream. 833 Only one instance of "MAC and Encrypted Metadata" Context Header 834 (Section 5) is allowed. If multiple instances of "MAC and Encrypted 835 Metadata" Context Header are included in an NSH packet, the SFC data 836 plane element MUST process the first instance and ignore subsequent 837 instances, and MAY log or increase a counter for this event as per 838 Section 2.5.1 of [RFC8300]. 840 MTU and fragmentation considerations are discussed in Section 8. 842 7.2. MAC NSH Data Generation 844 If the Context Headers are not encrypted, the HMAC algorithm 845 discussed in [RFC4868] is used to integrity protect the target NSH 846 data. An NSH imposer inserts a "MAC and Encrypted Metadata" Context 847 Header for integrity protection (Section 5). 849 The NSH imposer computes the message integrity for the target NSH 850 data (depending on the integrity protection scope discussed in 851 Section 5) using MAC_KEY and HMAC algorithm. It inserts the MAC in 852 the "MAC and Encrypted Metadata" Context Header. The length of the 853 MAC is decided by the HMAC algorithm adopted for the particular key 854 identifier. 856 The Message Authentication Code (T) computation process can be 857 illustrated as follows: 859 T = HMAC-SHA-256-128(MAC_KEY, A) 861 An entity in the SFP that intends to update the NSH MUST follow the 862 above behavior to maintain message integrity of the NSH for 863 subsequent validations. 865 7.3. Encrypted NSH Metadata Generation 867 An NSH imposer can encrypt Context Headers carrying privacy-sensitive 868 metadata, i.e., encrypted and unencrypted metadata may be carried 869 simultaneously in the same NSH packet (Sections 6 and 7). 871 In an SFC-enabled domain where pervasive monitoring [RFC7258] is 872 possible, all Context Headers carrying privacy-sensitive metadata 873 MUST be encrypted; doing so, privacy-sensitive metadata is not 874 revealed to attackers. Privacy specific threats are discussed in 875 Section 5.2 of [RFC6973]. 877 Using K and authenticated encryption algorithm, the NSH imposer 878 encrypts the Context Headers (as set, for example, in Section 3), 879 computes the message integrity for the target NSH data, and inserts 880 the resulting payload in the "MAC and Encrypted Metadata" Context 881 Header (Section 5). The entire Context Header carrying a privacy- 882 sensitive metadata is encrypted (that is, including the MD Class, 883 Type, Length, and associated metadata of each Context Header). 885 The message Authentication Tag (T) and ciphertext (E) computation 886 process can be illustrated as follows: 888 MAC_KEY = initial MAC_KEY_LEN octets of K, 889 ENC_KEY = final ENC_KEY_LEN octets of K, 890 E = CBC-PKCS7-ENC(ENC_KEY, P), 891 M = MAC(MAC_KEY, A || IV || E || AL), 892 T = initial T_LEN octets of M. 893 MAC and Encrypted Metadata = E || T 895 Note that "||" denotes the concatenation of two values. 897 As specified in [RFC7518], the octet string (AL) is equal to the 898 number of bits in the Additional Authenticated Data (A) expressed as 899 a 64-bit unsigned big-endian integer. 901 An authorized entity in the SFP that intends to update the content of 902 an encrypted Context Header or needs to add a new encrypted Context 903 Header MUST also follow the aforementioned behavior. 905 An SFF or NSH-aware SF or SFC Proxy that only has access to the 906 MAC_KEY, but not the ENC_KEY, computes the message Authentication Tag 907 (T) after decrementing the TTL (by the SFF) or SI (by an SF or SFC 908 Proxy) and replaces the Authentication Tag in the NSH with the 909 computed Authentication Tag. Similarly, an NSH-aware SF (or SFC 910 Proxy) that does not modify the encrypted Context headers also 911 follows the aforementioned behavior. 913 The message Authentication Tag (T) computation process can be 914 illustrated as follows: 916 M = MAC(MAC_KEY, A || IV || E || AL), 917 T = initial T_LEN octets of M. 919 7.4. Timestamp for Replay Attack 921 The Timestamp imposed by an initial Classifier is left untouched 922 along an SFP. However, it can be updated when reclassification 923 occurs (Section 4.8 of [RFC7665]). The same considerations for 924 setting the Timestamp are followed in both initial classification and 925 reclassification (Section 6). 927 The received NSH is accepted by an NSH-aware node if the Timestamp 928 (TS) in the NSH is recent enough to the reception time of the NSH 929 (TSrt). The following formula is used for this check: 931 -Delta < (TSrt - TS) < +Delta 933 The Delta interval is a configurable parameter. The default value 934 for the allowed Delta is 2 seconds. Special care should be taken 935 when setting very low Delta values as this may lead to dropping 936 legitimate traffic. If the timestamp is not within the boundaries, 937 then the SFC data plane element receiving such packet MUST discard 938 the NSH message. 940 Replay attacks within the Delta window may be detected by an NSH- 941 aware node by recording a unique value derived, for example, from the 942 NSH data and Original packet (e.g., using SHA2). Such NSH-aware node 943 will detect and reject duplicates. If for legitimate service 944 reasons, some flows have to be duplicated but still share portion of 945 an SFP with the original flow, legitimate duplicate packets will be 946 tagged by NSH-aware nodes involved in that segment as replay packets 947 unless sufficient entropy is added to the duplicate packet. 949 Note: Within the timestamp delta window, defining a sequence 950 number to protect against replay attacks may be considered. In 951 such mode, NSH-aware nodes must discard packets with duplicate 952 sequence numbers within the timestamp delta window. However, in 953 deployments with several instances of the same SF (e.g., cluster 954 or load-balanced SFs), a mechanism to coordinate among those 955 instances to discard duplicate sequence numbers is required. 956 Because the coordination mechanism to comply with this requirement 957 is service-specific, this document does not include this 958 protection. 960 All SFC data plane elements must be synchronized among themselves. 961 These elements may be synchronized to a global reference time. 963 7.5. NSH Data Validation 965 When an SFC data plane element receives an NSH packet, it MUST first 966 ensure that a "MAC and Encrypted Metadata" Context Header is 967 included. It MUST silently discard the message if the timestamp is 968 invalid (Section 7.4). It MUST log an error at least once per the 969 SPI for which the "MAC and Encrypted Metadata" Context Header is 970 missing. 972 If the timestamp check is successfully passed, the SFC data plane 973 element proceeds with NSH data integrity validation. The SFC data 974 plane element computes the message integrity for the target NSH data 975 (depending on the integrity protection scope discussed in Section 5) 976 using the MAC_KEY and HMAC algorithm for the key identifier. If the 977 value of the newly generated digest is identical to the one enclosed 978 in the NSH, the SFC data plane element is certain that the NSH data 979 has not been tampered and validation is therefore successful. 980 Otherwise, the NSH packet MUST be discarded. 982 7.6. Decryption of NSH Metadata 984 If entitled to consume a supplied encrypted Context Header, an NSH- 985 aware SF or SFC Proxy decrypts metadata using (K) and decryption 986 algorithm for the key identifier in the NSH. 988 Authenticated encryption algorithm has only a single output, either a 989 plaintext or a special symbol (FAIL) that indicates that the inputs 990 are not authentic (Section 5.2.2.2 of [RFC7518]). 992 8. MTU Considerations 994 The SFC architecture prescribes that additional information be added 995 to packets to: 997 o Identify SFPs: this is typically the NSH Base Header and Service 998 Path Header. 1000 o Carry metadata such as those defined in Section 5. 1002 o Steer the traffic along the SFPs: transport encapsulation. 1004 This added information increases the size of the packet to be carried 1005 along an SFP. 1007 Aligned with Section 5 of [RFC8300], it is RECOMMENDED for network 1008 operators to increase the underlying MTU so that NSH traffic is 1009 forwarded within an SFC-enabled domain without fragmentation. The 1010 available underlying MTU should be taken into account by network 1011 operators when providing SFs with the required Context Headers to be 1012 injected per SFP and the size of the data to be carried in these 1013 Context Headers. 1015 If the underlying MTU cannot be increased to accommodate the NSH 1016 overhead, network operators may rely upon a transport encapsulation 1017 protocol with the required fragmentation handling. The impact of 1018 activating such feature on SFFs should be carefully assessed by 1019 network operators (Section 5.6 of [RFC7665]). 1021 When dealing with MTU issues, network operators should consider the 1022 limitations of various transport encapsulations such as those 1023 discussed in [I-D.ietf-intarea-tunnels]. 1025 9. Security Considerations 1027 Data plane SFC-related security considerations, including privacy, 1028 are discussed in Section 6 of [RFC7665] and Section 8 of [RFC8300]. 1029 In particular, Section 8.2.2 of [RFC8300] states that attached 1030 metadata (i.e., Context Headers) should be limited to that necessary 1031 for correct operation of the SFP. Also, that section indicates that 1032 [RFC8165] discusses metadata considerations that operators can take 1033 into account when using NSH. 1035 The guidelines for cryptographic key management are discussed in 1036 [RFC4107]. 1038 The interaction between the SFC data plane elements and a key 1039 management system MUST NOT be transmitted in clear since this would 1040 completely destroy the security benefits of the integrity protection 1041 solution defined in this document. The secret key (K) must have an 1042 expiration time assigned as the latest point in time before which the 1043 key may be used for integrity protection of NSH data and encryption 1044 of Context Headers. Prior to the expiration of the secret key, all 1045 participating NSH-aware nodes SHOULD have the control plane 1046 distribute a new key identifier and associated keying material so 1047 that when the secret key is expired, those nodes are prepared with 1048 the new secret key. This allows the NSH imposer to switch to the new 1049 key identifier as soon as necessary. It is RECOMMENDED that the next 1050 key identifier and associated keying material be distributed by the 1051 control plane well prior to the secret key expiration time. 1053 NSH data are exposed to several threats: 1055 o A man-in-the-middle attacker modifying the NSH data. 1057 o Attacker spoofing the NSH data. 1059 o Attacker capturing and replaying the NSH data. 1061 o Data carried in Context Headers revealing privacy-sensitive 1062 information to attackers. 1064 o Attacker replacing the packet on which the NSH is imposed with a 1065 bogus packet. 1067 In an SFC-enabled domain where the above attacks are possible, (1) 1068 NSH data MUST be integrity-protected and replay-protected, and (2) 1069 privacy-sensitive NSH metadata MUST be encrypted for confidentiality 1070 preservation purposes. The Base and Service Path headers are not 1071 encrypted. 1073 MACs with two levels of assurance are defined in Section 5. 1074 Considerations specific to each level of assurance are discussed in 1075 Sections 9.1 and 9.2. 1077 The attacks discussed in [I-D.nguyen-sfc-security-architecture] are 1078 handled owing to the solution specified in this document, except for 1079 attacks dropping packets. Such attacks can be detected relying upon 1080 statistical analysis; such analysis is out of the scope of this 1081 document. Also, if SFFs are not involved in the integrity checks, a 1082 misbehaving SFF which decrements SI while this should be done by an 1083 SF (SF bypass attack) will be detected by an upstream SF because the 1084 integrity check will fail. 1086 Some events are logged locally with notification alerts sent by NSH- 1087 aware nodes to a Control Element. These events SHOULD be rate- 1088 limited. 1090 The solution specified in this document does not provide data origin 1091 authentication. 1093 In order to detect compromised nodes, it is assumed that appropriate 1094 mechanisms to monitor and audit an SFC-enabled domain to detect 1095 misbehavior and to deter misuse are in place. Compromised nodes can 1096 thus be withdrawn from active service function chains using 1097 appropriate control plane mechanisms. 1099 9.1. MAC#1 1101 An active attacker can potentially modify the Base header (e.g., 1102 decrement the TTL so the next SFF in the SFP discards the NSH 1103 packet). In the meantime, an active attacker can also drop NSH 1104 packets. As such, this attack is not considered an attack against 1105 the security mechanism specified in the document. 1107 No device other than the NSH-aware SFs in the SFC-enabled domain 1108 should be able to update the integrity protected NSH data. 1109 Similarly, no device other than the NSH-aware SFs and SFC proxies in 1110 the SFC-enabled domain should be able to decrypt and update the 1111 Context Headers carrying privacy-sensitive metadata. In other words, 1112 if the NSH-aware SFs and SFC proxies in the SFC-enabled domain are 1113 considered fully trusted to act on the NSH data, only these elements 1114 can have access to privacy-sensitive NSH metadata and the keying 1115 material used to integrity protect NSH data and encrypt Context 1116 Headers. 1118 9.2. MAC#2 1120 SFFs can detect whether an illegitimate node has altered the content 1121 of the Base header. Such messages must be discarded with appropriate 1122 logs and alarms generated (see Section 7.1). 1124 9.3. Time Synchronization 1126 Section 5.6 of [RFC8633] describes best current practices to be 1127 considered in deployments where SFC data plane elements use NTP for 1128 time synchronization purposes. 1130 Also, a mechanism to provide cryptographic security for NTP is 1131 specified in [RFC8915]. 1133 10. IANA Considerations 1135 This document requests IANA to assign the following types from the 1136 "NSH IETF-Assigned Optional Variable-Length Metadata Types" (0x0000 1137 IETF Base NSH MD Class) registry available at: 1138 https://www.iana.org/assignments/nsh/nsh.xhtml#optional-variable- 1139 length-metadata-types. 1141 +-------+-------------------------------+----------------+ 1142 | Value | Description | Reference | 1143 +=======+===============================+================+ 1144 | TBD1 | MAC and Encrypted Metadata #1 | [ThisDocument] | 1145 | TBD2 | MAC and Encrypted Metadata #2 | [ThisDocument] | 1146 +-------+-------------------------------+----------------+ 1148 11. Acknowledgements 1150 This document was edited as a follow up to the discussion in 1151 IETF#104: https://datatracker.ietf.org/meeting/104/materials/slides- 1152 104-sfc-sfc-chair-slides-01 (slide 7). 1154 Thanks to Joel Halpern, Christian Jacquenet, Dirk von Hugo, Tal 1155 Mizrahi, Daniel Migault, Diego Lopez, Greg Mirsky, and Dhruv Dhody 1156 for the comments. 1158 Many thanks to Steve Hanna for the valuable security directorate 1159 review. 1161 Thanks to Greg Mirsky for the Shepherd review. 1163 12. References 1165 12.1. Normative References 1167 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1168 Requirement Levels", BCP 14, RFC 2119, 1169 DOI 10.17487/RFC2119, March 1997, 1170 . 1172 [RFC4107] Bellovin, S. and R. Housley, "Guidelines for Cryptographic 1173 Key Management", BCP 107, RFC 4107, DOI 10.17487/RFC4107, 1174 June 2005, . 1176 [RFC4868] Kelly, S. and S. Frankel, "Using HMAC-SHA-256, HMAC-SHA- 1177 384, and HMAC-SHA-512 with IPsec", RFC 4868, 1178 DOI 10.17487/RFC4868, May 2007, 1179 . 1181 [RFC7518] Jones, M., "JSON Web Algorithms (JWA)", RFC 7518, 1182 DOI 10.17487/RFC7518, May 2015, 1183 . 1185 [RFC7665] Halpern, J., Ed. and C. Pignataro, Ed., "Service Function 1186 Chaining (SFC) Architecture", RFC 7665, 1187 DOI 10.17487/RFC7665, October 2015, 1188 . 1190 [RFC8174] Leiba, B., "Ambiguity of Uppercase vs Lowercase in RFC 1191 2119 Key Words", BCP 14, RFC 8174, DOI 10.17487/RFC8174, 1192 May 2017, . 1194 [RFC8300] Quinn, P., Ed., Elzur, U., Ed., and C. Pignataro, Ed., 1195 "Network Service Header (NSH)", RFC 8300, 1196 DOI 10.17487/RFC8300, January 2018, 1197 . 1199 12.2. Informative References 1201 [I-D.arkko-farrell-arch-model-t] 1202 Arkko, J. and S. Farrell, "Challenges and Changes in the 1203 Internet Threat Model", draft-arkko-farrell-arch-model- 1204 t-04 (work in progress), July 2020. 1206 [I-D.ietf-intarea-tunnels] 1207 Touch, J. and M. Townsley, "IP Tunnels in the Internet 1208 Architecture", draft-ietf-intarea-tunnels-10 (work in 1209 progress), September 2019. 1211 [I-D.nguyen-sfc-security-architecture] 1212 Nguyen, T. and M. Park, "A Security Architecture Against 1213 Service Function Chaining Threats", draft-nguyen-sfc- 1214 security-architecture-00 (work in progress), November 1215 2019. 1217 [RFC5905] Mills, D., Martin, J., Ed., Burbank, J., and W. Kasch, 1218 "Network Time Protocol Version 4: Protocol and Algorithms 1219 Specification", RFC 5905, DOI 10.17487/RFC5905, June 2010, 1220 . 1222 [RFC6973] Cooper, A., Tschofenig, H., Aboba, B., Peterson, J., 1223 Morris, J., Hansen, M., and R. Smith, "Privacy 1224 Considerations for Internet Protocols", RFC 6973, 1225 DOI 10.17487/RFC6973, July 2013, 1226 . 1228 [RFC7258] Farrell, S. and H. Tschofenig, "Pervasive Monitoring Is an 1229 Attack", BCP 188, RFC 7258, DOI 10.17487/RFC7258, May 1230 2014, . 1232 [RFC7498] Quinn, P., Ed. and T. Nadeau, Ed., "Problem Statement for 1233 Service Function Chaining", RFC 7498, 1234 DOI 10.17487/RFC7498, April 2015, 1235 . 1237 [RFC7635] Reddy, T., Patil, P., Ravindranath, R., and J. Uberti, 1238 "Session Traversal Utilities for NAT (STUN) Extension for 1239 Third-Party Authorization", RFC 7635, 1240 DOI 10.17487/RFC7635, August 2015, 1241 . 1243 [RFC8165] Hardie, T., "Design Considerations for Metadata 1244 Insertion", RFC 8165, DOI 10.17487/RFC8165, May 2017, 1245 . 1247 [RFC8459] Dolson, D., Homma, S., Lopez, D., and M. Boucadair, 1248 "Hierarchical Service Function Chaining (hSFC)", RFC 8459, 1249 DOI 10.17487/RFC8459, September 2018, 1250 . 1252 [RFC8633] Reilly, D., Stenn, H., and D. Sibold, "Network Time 1253 Protocol Best Current Practices", BCP 223, RFC 8633, 1254 DOI 10.17487/RFC8633, July 2019, 1255 . 1257 [RFC8877] Mizrahi, T., Fabini, J., and A. Morton, "Guidelines for 1258 Defining Packet Timestamps", RFC 8877, 1259 DOI 10.17487/RFC8877, September 2020, 1260 . 1262 [RFC8915] Franke, D., Sibold, D., Teichel, K., Dansarie, M., and R. 1263 Sundblad, "Network Time Security for the Network Time 1264 Protocol", RFC 8915, DOI 10.17487/RFC8915, September 2020, 1265 . 1267 Authors' Addresses 1269 Mohamed Boucadair 1270 Orange 1271 Rennes 35000 1272 France 1274 Email: mohamed.boucadair@orange.com 1276 Tirumaleswar Reddy 1277 McAfee, Inc. 1278 Embassy Golf Link Business Park 1279 Bangalore, Karnataka 560071 1280 India 1282 Email: TirumaleswarReddy_Konda@McAfee.com 1284 Dan Wing 1285 Citrix Systems, Inc. 1286 USA 1288 Email: dwing-ietf@fuggles.com