idnits 2.17.1 draft-ietf-ipsecme-ikev2-resumption-03.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** The document seems to lack a License Notice according IETF Trust Provisions of 28 Dec 2009, Section 6.b.i or Provisions of 12 Sep 2009 Section 6.b -- however, there's a paragraph with a matching beginning. Boilerplate error? (You're using the IETF Trust Provisions' Section 6.b License Notice from 12 Feb 2009 rather than one of the newer Notices. See https://trustee.ietf.org/license-info/.) 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 (May 1, 2009) is 5467 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: 'CERTREQ' is mentioned on line 270, but not defined -- Looks like a reference, but probably isn't: '3' on line 936 -- Looks like a reference, but probably isn't: '8' on line 937 == Unused Reference: 'RFC4718' is defined on line 871, but no explicit reference was found in the text ** Obsolete normative reference: RFC 4306 (Obsoleted by RFC 5996) == Outdated reference: A later version (-13) exists of draft-ietf-ipsecme-ikev2-redirect-08 == Outdated reference: A later version (-11) exists of draft-ietf-ipsecme-ikev2bis-03 == Outdated reference: A later version (-12) exists of draft-ietf-rohc-ikev2-extensions-hcoipsec-08 -- Obsolete informational reference (is this intentional?): RFC 4718 (Obsoleted by RFC 5996) -- Obsolete informational reference (is this intentional?): RFC 5077 (Obsoleted by RFC 8446) Summary: 2 errors (**), 0 flaws (~~), 6 warnings (==), 5 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group Y. Sheffer 3 Internet-Draft Check Point 4 Intended status: Standards Track H. Tschofenig 5 Expires: November 2, 2009 Nokia Siemens Networks 6 L. Dondeti 7 V. Narayanan 8 QUALCOMM, Inc. 9 May 1, 2009 11 IKEv2 Session Resumption 12 draft-ietf-ipsecme-ikev2-resumption-03.txt 14 Status of this Memo 16 This Internet-Draft is submitted to IETF in full conformance with the 17 provisions of BCP 78 and BCP 79. 19 Internet-Drafts are working documents of the Internet Engineering 20 Task Force (IETF), its areas, and its working groups. Note that 21 other groups may also distribute working documents as Internet- 22 Drafts. 24 Internet-Drafts are draft documents valid for a maximum of six months 25 and may be updated, replaced, or obsoleted by other documents at any 26 time. It is inappropriate to use Internet-Drafts as reference 27 material or to cite them other than as "work in progress." 29 The list of current Internet-Drafts can be accessed at 30 http://www.ietf.org/ietf/1id-abstracts.txt. 32 The list of Internet-Draft Shadow Directories can be accessed at 33 http://www.ietf.org/shadow.html. 35 This Internet-Draft will expire on November 2, 2009. 37 Copyright Notice 39 Copyright (c) 2009 IETF Trust and the persons identified as the 40 document authors. All rights reserved. 42 This document is subject to BCP 78 and the IETF Trust's Legal 43 Provisions Relating to IETF Documents in effect on the date of 44 publication of this document (http://trustee.ietf.org/license-info). 45 Please review these documents carefully, as they describe your rights 46 and restrictions with respect to this document. 48 Abstract 50 The Internet Key Exchange version 2 (IKEv2) protocol has a certain 51 computational and communication overhead with respect to the number 52 of round-trips required and the cryptographic operations involved. 53 In remote access situations, the Extensible Authentication Protocol 54 (EAP) is used for authentication, which adds several more round trips 55 and consequently latency. 57 To re-establish security associations (SAs) upon a failure recovery 58 condition is time consuming especially when an IPsec peer (such as a 59 VPN gateway) needs to re-establish a large number of SAs with various 60 end points. A high number of concurrent sessions might cause 61 additional problems for an IPsec peer during SA re-establishment. 63 In order to avoid the need to re-run the key exchange protocol from 64 scratch it would be useful to provide an efficient way to resume an 65 IKE/IPsec session. This document proposes an extension to IKEv2 that 66 allows a client to re-establish an IKE SA with a gateway in a highly 67 efficient manner, utilizing a previously established IKE SA. 69 A client can reconnect to a gateway from which it was disconnected. 70 The proposed approach requires passing opaque data from the IKEv2 71 responder to the IKEv2 initiator, which is later made available to 72 the IKEv2 responder for re-authentication. We use the term ticket to 73 refer to the opaque data that is created by the IKEv2 responder. 74 This document does not specify the format of the ticket but 75 recommendations are provided. 77 Table of Contents 79 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 5 80 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 6 81 3. Usage Scenario . . . . . . . . . . . . . . . . . . . . . . . . 6 82 4. Protocol Details . . . . . . . . . . . . . . . . . . . . . . . 7 83 4.1. Requesting a Ticket . . . . . . . . . . . . . . . . . . . 7 84 4.2. Receiving a Ticket . . . . . . . . . . . . . . . . . . . . 9 85 4.3. Presenting a Ticket . . . . . . . . . . . . . . . . . . . 9 86 4.4. IKE_SESSION_RESUME Details . . . . . . . . . . . . . . . . 11 87 4.5. Requesting a Ticket During Resumption . . . . . . . . . . 11 88 4.6. IP Address Change and NAT . . . . . . . . . . . . . . . . 11 89 4.7. IKE Notifications . . . . . . . . . . . . . . . . . . . . 11 90 4.7.1. TICKET_LT_OPAQUE Notify Payload . . . . . . . . . . . 12 91 4.7.2. TICKET_OPAQUE Notify Payload . . . . . . . . . . . . . 12 92 4.8. Computing the AUTH Payload . . . . . . . . . . . . . . . . 13 93 5. Processing Guidelines for IKE SA Establishment . . . . . . . . 13 94 6. The State After Resumption . . . . . . . . . . . . . . . . . . 14 95 7. Ticket Handling . . . . . . . . . . . . . . . . . . . . . . . 16 96 7.1. Ticket Content . . . . . . . . . . . . . . . . . . . . . . 16 97 7.2. Ticket Identity and Lifecycle . . . . . . . . . . . . . . 17 98 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 17 99 9. Security Considerations . . . . . . . . . . . . . . . . . . . 17 100 9.1. Stolen Tickets . . . . . . . . . . . . . . . . . . . . . . 18 101 9.2. Forged Tickets . . . . . . . . . . . . . . . . . . . . . . 18 102 9.3. Denial of Service Attacks . . . . . . . . . . . . . . . . 18 103 9.4. Key Management for Tickets By Value . . . . . . . . . . . 19 104 9.5. Ticket Lifetime . . . . . . . . . . . . . . . . . . . . . 19 105 9.6. Ticket by Value Format . . . . . . . . . . . . . . . . . . 19 106 9.7. Identity Privacy, Anonymity, and Unlinkability . . . . . . 19 107 10. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 20 108 11. References . . . . . . . . . . . . . . . . . . . . . . . . . . 20 109 11.1. Normative References . . . . . . . . . . . . . . . . . . . 20 110 11.2. Informative References . . . . . . . . . . . . . . . . . . 20 111 Appendix A. Ticket Format . . . . . . . . . . . . . . . . . . . . 22 112 A.1. Example Ticket by Value Format . . . . . . . . . . . . . . 22 113 A.2. Example Ticket by Reference Format . . . . . . . . . . . . 23 114 Appendix B. Change Log . . . . . . . . . . . . . . . . . . . . . 23 115 B.1. -03 . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 116 B.2. -02 . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 117 B.3. -01 . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 118 B.4. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 119 B.5. -01 . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 120 B.6. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 121 B.7. -04 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 122 B.8. -03 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 123 B.9. -02 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 124 B.10. -01 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 125 B.11. -00 . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 126 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 25 128 1. Introduction 130 The Internet Key Exchange version 2 (IKEv2) protocol has a certain 131 computational and communication overhead with respect to the number 132 of round-trips required and the cryptographic operations involved. 133 In particular the Extensible Authentication Protocol (EAP) is used 134 for authentication in remote access cases, which increases latency. 136 To re-establish security associations (SA) upon a failure recovery 137 condition is time-consuming, especially when an IPsec peer, such as a 138 VPN gateway, needs to re-establish a large number of SAs with various 139 end points. A high number of concurrent sessions might cause 140 additional problems for an IPsec responder. 142 In many failure cases it would be useful to provide an efficient way 143 to resume an interrupted IKE/IPsec session. This document proposes 144 an extension to IKEv2 that allows a client to re-establish an IKE SA 145 with a gateway in a highly efficient manner, utilizing a previously 146 established IKE SA. 148 A client can reconnect to a gateway from which it was disconnected. 149 One way to ensure that the IKEv2 responder is able to recreate the 150 state information is by maintaining IKEv2 state (or a reference into 151 a state store) in a "ticket", an opaque data structure. This ticket 152 is created by the server and forwarded to the client. The IKEv2 153 protocol is extended to allow a client to request and present a 154 ticket. This document does not mandate the format of the ticket 155 structure but a recommendation is provided. In Appendix A a ticket 156 by value and a ticket by reference format is proposed. 158 This approach is similar to the one taken by TLS session resumption 159 [RFC5077] with the required adaptations for IKEv2, e.g., to 160 accommodate the two-phase protocol structure. We have borrowed 161 heavily from that specification. 163 The proposed solution should additionally meet the following goals: 165 o Using only symmetric cryptography to minimize CPU consumption. 166 o Providing cryptographic agility. 167 o Having no negative impact on IKEv2 security features. 169 The following are non-goals of this solution: 170 o Failover from one gateway to another. This use case may be added 171 in a future specification. 172 o Providing load balancing among gateways. 173 o Specifying how a client detects the need for resumption. 175 2. Terminology 177 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 178 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 179 document are to be interpreted as described in [RFC2119]. 181 This document uses terminology defined in [RFC4301] and [RFC4306]. 182 In addition, this document uses the following terms: 184 Ticket: An IKEv2 ticket is a data structure that contains all the 185 necessary information that allows an IKEv2 responder to re- 186 establish an IKEv2 security association. 188 In this document we use the term "ticket" and thereby refer to an 189 opaque data structure that may either contain IKEv2 state as 190 described above or a reference pointing to such state. 192 3. Usage Scenario 194 This specification envisions two usage scenarios for efficient IKEv2 195 and IPsec SA session re-establishment. 197 The first is similar to the use case specified in Section 1.1.3 of 198 the IKEv2 specification [RFC4306], where the IPsec tunnel mode is 199 used to establish a secure channel between a remote access client and 200 a gateway; the traffic flow may be between the client and entities 201 beyond the gateway. This scenario is further discussed below. 203 The second use case focuses on the usage of transport (or tunnel) 204 mode to secure the communicate between two end points (e.g., two 205 servers). The two endpoints have a client-server relationship with 206 respect to a protocol that runs using the protections afforded by the 207 IPsec SA. 209 (a) 211 +-+-+-+-+-+ +-+-+-+-+-+ 212 ! ! IKEv2/IKEv2-EAP ! ! Protected 213 ! Remote !<------------------------>! ! Subnet 214 ! Access ! ! Access !<--- and/or 215 ! Client !<------------------------>! Gateway ! Internet 216 ! ! IPsec tunnel ! ! 217 +-+-+-+-+-+ +-+-+-+-+-+ 219 (b) 221 +-+-+-+-+-+ +-+-+-+-+-+ 222 ! ! IKE_SESSION_RESUME ! ! 223 ! Remote !<------------------------>! ! 224 ! Access ! ! Access ! 225 ! Client !<------------------------>! Gateway ! 226 ! ! IPsec tunnel ! ! 227 +-+-+-+-+-+ +-+-+-+-+-+ 229 Figure 1: Resuming a Session with a Remote Access Gateway 231 In the first use case above, an end host (an entity with a host 232 implementation of IPsec [RFC4301]) establishes a tunnel mode IPsec SA 233 with a gateway in a remote network using IKEv2. The end host in this 234 scenario is sometimes referred to as a remote access client. At a 235 later stage when a client needs to re-establish the IKEv2 session it 236 may choose to establish IPsec SAs using a full IKEv2 exchange or the 237 IKE_SESSION_RESUME exchange (shown in Figure 1). 239 4. Protocol Details 241 This section provides protocol details and contains the normative 242 parts. This document defines two protocol exchanges, namely 243 requesting a ticket, see Section 4.1, and presenting a ticket, see 244 Section 4.3. 246 4.1. Requesting a Ticket 248 A client MAY request a ticket in the following exchanges: 250 o In an IKE_AUTH exchange, as shown in the example message exchange 251 in Figure 2 below. 253 o In a CREATE_CHILD_SA exchange, when an IKE SA is rekeyed (and only 254 when this exchange is initiated by the client). 255 o In an Informational exchange at any time, e.g. if the gateway 256 previously replied with an N(TICKET_ACK) instead of providing a 257 ticket, or when the ticket lifetime is about to expire. All such 258 Informational exchanges MUST be initiated by the client. 259 o While resuming an IKE session, i.e. in the IKE_AUTH exchange that 260 follows an IKE_SESSION_RESUME exchange, see Section 4.5. 262 Normally, a client requests a ticket in the third message of an IKEv2 263 exchange (the first of IKE_AUTH). Figure 2 shows the message 264 exchange for this typical case. 266 Initiator Responder 267 ----------- ----------- 268 HDR, SAi1, KEi, Ni --> 270 <-- HDR, SAr1, KEr, Nr, [CERTREQ] 272 HDR, SK {IDi, [CERT,] [CERTREQ,] [IDr,] 273 AUTH, SAi2, TSi, TSr, N(TICKET_REQUEST)} --> 275 Figure 2: Example Message Exchange for Requesting a Ticket 277 The notification payloads are described in Section 4.7. The above is 278 an example, and IKEv2 allows a number of variants on these messages. 279 Refer to [RFC4306] and [I-D.ietf-ipsecme-ikev2bis] for more details 280 on IKEv2. 282 When an IKEv2 responder receives a request for a ticket using the 283 N(TICKET_REQUEST) payload it MUST perform one of the following 284 operations if it supports the extension defined in this document: 285 o it creates a ticket and returns it with the N(TICKET_LT_OPAQUE) 286 payload in a subsequent message towards the IKEv2 initiator. This 287 is shown in Figure 3. 288 o it returns an N(TICKET_NACK) payload, if it refuses to grant a 289 ticket for some reason. 290 o it returns an N(TICKET_ACK), if it cannot grant a ticket 291 immediately, e.g., due to packet size limitations. In this case 292 the client MAY request a ticket later using an Informational 293 exchange, at any time during the lifetime of the IKE SA. 294 Regardless of this choice, there is no change to the behavior of the 295 responder with respect to the IKE exchange, and the proper IKE 296 response (e.g. an IKE_AUTH response or an error notification) MUST be 297 sent. 299 4.2. Receiving a Ticket 301 The IKEv2 initiator receives the ticket and may accept it, provided 302 the IKEv2 exchange was successful. The ticket may be used later with 303 an IKEv2 responder that supports this extension. Figure 3 shows how 304 the initiator receives the ticket. 306 Initiator Responder 307 ----------- ----------- 308 <-- HDR, SK {IDr, [CERT,] AUTH, SAr2, TSi, 309 TSr, N(TICKET_LT_OPAQUE) } 311 Figure 3: Receiving a Ticket 313 When a multi-round-trip IKE_AUTH exchange is used, the 314 N(TICKET_REQUEST) payload MUST be included in the first IKE_AUTH 315 request, and N(TICKET_LT_OPAQUE) (or TICKET_NACK/TICKET_ACK) MUST 316 only be returned in the final IKE_AUTH response. 318 4.3. Presenting a Ticket 320 A client MAY initiate a regular (non-ticket-based) IKEv2 exchange 321 even if it is in possession of a valid ticket. Note that the client 322 can only judge validity in the sense of the ticket lifetime. A 323 client MUST NOT present a ticket when it knows that the ticket's 324 lifetime has expired. 326 It is up to the client's local policy to decide when the 327 communication with the IKEv2 responder is seen as interrupted and the 328 session resumption procedure is to be initiated. 330 Tickets are intended for one-time use, i.e. a client MUST NOT reuse a 331 ticket. A reused ticket SHOULD be rejected by a gateway. Note that 332 a ticket is considered as used only when an IKE SA has been 333 established successfully with it. 335 This document specifies a new IKEv2 exchange type called 336 IKE_SESSION_RESUME whose value is TBA by IANA. This exchange is 337 equivalent to the IKE_SA_INIT exchange, and MUST be followed by an 338 IKE_AUTH exchange. The client SHOULD NOT use this exchange type 339 unless it knows that the gateway supports it. 341 Initiator Responder 342 ----------- ----------- 343 HDR, Ni, N(TICKET_OPAQUE) [,N+] --> 345 The exchange type in HDR is set to 'IKE_SESSION_RESUME'. The 346 initiator sets the SPIi value in the HDR to a new random value and 347 the SPIr value is set to 0. 349 When the IKEv2 responder receives a ticket using the N(TICKET_OPAQUE) 350 payload it MUST perform one of the following steps if it supports the 351 extension defined in this document: 353 o If it is willing to accept the ticket, it responds as shown in 354 Figure 4. 355 o It responds with an unprotected N(TICKET_NACK) notification, if it 356 rejects the ticket for any reason. In that case, the initiator 357 should re-initiate a regular IKE exchange. One such case is when 358 the responder receives a ticket for an IKE SA that has previously 359 been terminated on the responder itself, which may indicate 360 inconsistent state between the IKEv2 initiator and the responder. 361 However, a responder is not required to maintain the state for 362 terminated sessions. 364 Initiator Responder 365 ----------- ----------- 366 <-- HDR, Nr [,N+] 368 Figure 4: IKEv2 Responder accepts the ticket 370 Again, the exchange type in HDR is set to 'IKE_SESSION_RESUME'. The 371 responder copies the SPIi value from the request, and the SPIr value 372 is set to a new random value . 374 At this point the client MUST initiate an IKE_AUTH exchange, as per 375 [RFC4306]. See Section 4.8 for guidelines on computing the AUTH 376 payloads. The IDi value sent in this exchange MUST be identical to 377 the value included in the ticket. Following this exchange, a new IKE 378 SA is created by both parties, see Section 5, and a child SA is 379 derived, per Section 2.17 of [RFC4306]. 381 When the responder receives a ticket for an IKE SA that is still 382 active and if the responder accepts it, then the old SA SHOULD be 383 silently deleted without sending a DELETE informational exchange. 384 Consequently, all the dependent IPsec child SAs are also deleted. 385 This happens after both peers have been authenticated. 387 4.4. IKE_SESSION_RESUME Details 389 The IKE_SESSION_RESUME exchange behaves like the IKE_SA_INIT exchange 390 in most respects. Specifically: 392 o The first message may be rejected in denial of service situations, 393 with the initiator instructed to send a cookie. 394 o Notifications normally associated with IKE_SA_INIT can be sent. 395 In particular, NAT detection payloads. 396 o The SPI values and Message ID fields behave similarly to 397 IKE_SA_INIT. 399 4.5. Requesting a Ticket During Resumption 401 When resuming a session, a client will typically request a new ticket 402 immediately, so it is able to resume the session again in the case of 403 a second failure. The N(TICKET_REQUEST) and N(TICKET_LT_OPAQUE) 404 notifications will be included in the IKE_AUTH exchange that follows 405 the IKE_SESSION_RESUME exchange, with similar behavior to a ticket 406 request during a regular IKE exchange, Section 4.1. 408 The returned ticket (if any) will correspond to the IKE SA created 409 per the rules described in Section 5. 411 4.6. IP Address Change and NAT 413 The client MAY resume the IKE exchange from an IP address different 414 from its original address. The gateway MAY reject the resumed 415 exchange if its policy depends on the client's address (although this 416 rarely makes sense). 418 The client's NAT traversal status SHOULD be determined anew upon 419 session resumption, by using the appropriate notifications. This 420 status is explicitly not part of the session resumption state. 422 4.7. IKE Notifications 424 This document defines a number of notifications. The notification 425 numbers are TBA by IANA. 427 +-------------------+--------+-------------------+ 428 | Notification Name | Number | Data | 429 +-------------------+--------+-------------------+ 430 | TICKET_LT_OPAQUE | TBA1 | See Section 4.7.1 | 431 | TICKET_REQUEST | TBA2 | None | 432 | TICKET_ACK | TBA3 | None | 433 | TICKET_NACK | TBA4 | None | 434 | TICKET_OPAQUE | TBA5 | See Section 4.7.2 | 435 +-------------------+--------+-------------------+ 437 For all these notifications, the Protocol ID and the SPI Size fields 438 MUST both be sent as 0. 440 4.7.1. TICKET_LT_OPAQUE Notify Payload 442 The data for the TICKET_LT_OPAQUE Notify payload consists of the 443 Notify message header, a Lifetime field and the ticket itself. The 444 four octet Lifetime field contains a relative time value, the number 445 of seconds until the ticket expires (encoded as an unsigned integer). 447 0 1 2 3 448 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 449 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 450 ! Next Payload !C! Reserved ! Payload Length ! 451 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 452 ! Protocol ID ! SPI Size = 0 ! Notify Message Type ! 453 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 454 ! Lifetime ! 455 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 456 ! ! 457 ~ Ticket ~ 458 ! ! 459 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 461 Figure 5: TICKET_LT_OPAQUE Notify Payload 463 4.7.2. TICKET_OPAQUE Notify Payload 465 The data for the TICKET_OPAQUE Notify payload consists of the Notify 466 message header, and the ticket itself. Unlike the TICKET_LT_OPAQUE 467 payload no lifetime value is included in the TICKET_OPAQUE Notify 468 payload. 470 0 1 2 3 471 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 472 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 473 ! Next Payload !C! Reserved ! Payload Length ! 474 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 475 ! Protocol ID ! SPI Size = 0 ! Notify Message Type ! 476 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 477 ! ! 478 ~ Ticket ~ 479 ! ! 480 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 482 Figure 6: TICKET_OPAQUE Notify Payload 484 4.8. Computing the AUTH Payload 486 The value of the AUTH payload is derived in a manner similar to the 487 usage of IKEv2 pre-shared secret authentication, as shown below: 489 AUTH = prf(SK_px, ) 491 Each of the initiator and responder uses its own SK_p value, taken 492 from the newly generated IKE SA, Section 5. 494 The exact material to be signed is defined in Section 2.15 of 495 [RFC4306]. The notation "IDr'" in RFC 4306 should be applied to the 496 new IDr value included in the exchange, rather than the value in the 497 ticket. 499 5. Processing Guidelines for IKE SA Establishment 501 When a ticket is presented, the gateway needs to obtain the ticket 502 state. In case a ticket by reference was provided by the client, the 503 gateway needs to resolve the reference in order to obtain this state. 504 In case the client has already provided a ticket per value, the 505 gateway can parse the ticket to obtain the state directly. In either 506 case, the gateway needs to process the ticket state in order to 507 restore the state of the old IKE SA, and the client retrieves the 508 same state from its local store. Both peers now create state for the 509 new IKE SA as follows: 511 o The SA value (transforms etc.) is taken directly from the ticket. 513 o The Message ID values are reset to 0 in IKE_SESSION_RESUME, and 514 subsequently incremented normally. 515 o The IDi value is obtained from the ticket. 516 o The IDr value is obtained from the new exchange. The gateway MAY 517 make policy decisions based on the IDr value encoded in the 518 ticket. 519 o The SPI values are created anew during IKE_SESSION_RESUME, 520 similarly to a regular IKE_SA_INIT exchange. SPI values from the 521 ticket MUST NOT be reused, and they are sent merely to help the 522 gateway to locate the old state. The restriction on SPI reuse is 523 to avoid problems caused by collisions with other SPI values used 524 already by the initiator/responder. 526 The cryptographic material is refreshed based on the ticket and the 527 nonce values, Ni, and Nr, from the current exchange. A new SKEYSEED 528 value is derived as follows: 530 SKEYSEED = prf(SK_d_old, "Resumption" | Ni | Nr) 532 where SK_d_old is taken from the ticket. The literal string is 533 encoded as 10 ASCII characters, with no NULL terminator. 535 The keys are derived as follows, unchanged from IKEv2: 537 {SK_d | SK_ai | SK_ar | SK_ei | SK_er | SK_pi | SK_pr} = 538 prf+(SKEYSEED, Ni | Nr | SPIi | SPIr) 540 where SPIi, SPIr are the SPI values created in the new IKE exchange. 542 See [RFC4306] for the notation. "prf" is determined from the SA value 543 in the ticket. 545 6. The State After Resumption 547 The following table, compiled by Pasi Eronen, describes the IKE and 548 IPsec state of the peers after session resumption, and how it is 549 related to their state before the IKE SA was interrupted. When the 550 table mentions that a certain state item is taken "from the ticket", 551 this should be construed as: 552 o The client retrieves this item from its local store. 553 o In the case of ticket by value, the gateway encodes this 554 information in the ticket. 556 o In the case of ticket by reference, the gateway fetches this 557 information from the ticket store. 559 +-----------------------------------+-------------------------------+ 560 | State Item | After Resumption | 561 +-----------------------------------+-------------------------------+ 562 | IDi | From the ticket (but must | 563 | | also be exchanged in | 564 | | IKE_AUTH) | 565 | IDr | From the new exchange (but | 566 | | old value included in the | 567 | | ticket) | 568 | Authentication method | From the ticket | 569 | Certificates (when applicable) | Unspecified, see note 1 | 570 | Local IP address/port, peer IP | Selected by the client, see | 571 | address/port | note 2 | 572 | NAT detection status | From new exchange | 573 | SPIs | From new exchange | 574 | Which peer is the "original | Determined by the initiator | 575 | initiator"? | of IKE_SESSION_RESUME | 576 | IKE SA sequence numbers (Message | Start from 0 | 577 | ID) | | 578 | IKE SA algorithms (SAr) | From the ticket | 579 | IKE SA keys (SK_*) | SK_d from the ticket, others | 580 | | are refreshed | 581 | IKE SA window size | Reset to 1 | 582 | Child SAs (ESP/AH) | Created in new exchange, see | 583 | | note 5 | 584 | Internal IP address | Not resumed, but see note 3 | 585 | Other Configuration Payload | Not resumed | 586 | information | | 587 | Peer vendor IDs | Unspecified (needed in the | 588 | | ticket only if | 589 | | vendor-specific state is | 590 | | required) | 591 | Peer supports MOBIKE [RFC4555] | From new exchange | 592 | MOBIKE additional addresses | Not resumed, should be resent | 593 | | by client if necessary | 594 | Time until re-authentication | From new exchange (but ticket | 595 | [RFC4478] | lifetime is bounded by this | 596 | | duration) | 597 | Peer supports redirects | From new exchange | 598 | [I-D.ietf-ipsecme-ikev2-redirect] | | 599 +-----------------------------------+-------------------------------+ 600 Note 1: Certificates don't need to be stored if the peer never uses 601 them for anything after the IKE SA is up (but would be 602 needed if exposed to applications via IPsec APIs). 603 Note 2: If the certificate has an iPAddress SubjectAltName, and the 604 implementation requires it to match the peer's source IP 605 address, the same check needs to be performed on session 606 resumption and the required information saved locally or in 607 the ticket. 608 Note 3: The client can request the address it was using earlier, and 609 if possible, the gateway SHOULD honor the request. 610 Note 4: IKEv2 features that affect only the IKE_AUTH exchange 611 (including HTTP_CERT_LOOKUP_SUPPORTED, multiple 612 authentication exchanges [RFC4739], ECDSA authentication 613 [RFC4754], and OCSP [RFC4806]) don't usually need any state 614 in the IKE SA (after the IKE_AUTH exchanges are done), so 615 resumption doesn't affect them. 616 Note 5: Since information about CHILD SAs and configuration payloads 617 is not resumed, IKEv2 features related to CHILD SA 618 negotiation (such as IPCOMP_SUPPORTED, 619 ESP_TFC_PADDING_NOT_SUPPORTED, ROHC-over-IPsec 620 [I-D.ietf-rohc-ikev2-extensions-hcoipsec] and configuration 621 aren't usually affected by session resumption. 622 Note 6: New IKEv2 features that are not covered by notes 4 and 5 623 should specify how they interact with session resumption. 625 7. Ticket Handling 627 7.1. Ticket Content 629 When passing a ticket by value to the client, the ticket content MUST 630 be integrity protected and encrypted. 632 A ticket by reference does not need to be encrypted, as it does not 633 contain any sensitive material, such as keying material. However, 634 access to the storage where that sensitive material is stored MUST be 635 protected so that only unauthorized access is not allowed. We note 636 that such a ticket is analogous to the concept of 'stub', as defined 637 in [I-D.xu-ike-sa-sync], or the concept of a Session ID from TLS. 639 Although not strictly required for cryptographic protection, it is 640 RECOMMENDED to integrity-protect the ticket by reference. Failing to 641 do so could result in various security vulnerabilities on the gateway 642 side, depending on the format of the reference. Potential 643 vulnerabilities include access by the gateway to unintended URLs 644 (similar to cross-site scripting) or SQL injection. 646 When the state is passed by value, the ticket MUST encode at least 647 the following state from an IKE SA. The same state MUST be stored in 648 the ticket store, in the case of ticket by reference. 650 o IDi, IDr. 651 o SPIi, SPIr. 652 o SAr (the accepted proposal). 653 o SK_d. 655 The ticket by value MUST include a key identity field, so that keys 656 for encryption and authentication can be changed, and when necessary, 657 algorithms can be replaced. 659 7.2. Ticket Identity and Lifecycle 661 Each ticket is associated with a single IKE SA. In particular, when 662 an IKE SA is deleted, the client MUST delete its stored ticket. 663 Similarly, when credentials associated with the IKE SA are 664 invalidated (e.g. when a user logs out), the ticket MUST be deleted. 665 When the IKE SA is rekeyed the ticket is invalidated, and the client 666 SHOULD request a new ticket. 668 The lifetime of the ticket sent by the gateway SHOULD be the minimum 669 of the IKE SA lifetime (per the gateway's local policy) and its re- 670 authentication time, according to [RFC4478]. Even if neither of 671 these are enforced by the gateway, a finite lifetime MUST be 672 specified for the ticket. 674 The key that is used to protect the ticket MUST have a lifetime that 675 is significantly longer than the lifetime of an IKE SA. 677 In normal operation, the client will request a ticket when 678 establishing the initial IKE SA, and then every time the SA is 679 rekeyed or re-established because of re-authentication. 681 8. IANA Considerations 683 This document requires a number of IKEv2 notification status types in 684 Section 4.7, to be registered by IANA. The "IKEv2 Notify Message 685 Types - Status Types" registry was established by IANA. 687 The document defines a new IKEv2 exchange in Section 4.3. The 688 corresponding registry was established by IANA. 690 9. Security Considerations 692 This section addresses security issues related to the usage of a 693 ticket. 695 9.1. Stolen Tickets 697 An man-in-the-middle may try to eavesdrop on an exchange to obtain a 698 ticket by value and use it to establish a session with the IKEv2 699 responder. This can happen in different ways: by eavesdropping on 700 the initial communication and copying the ticket when it is granted 701 and before it is used, or by listening in on a client's use of the 702 ticket to resume a session. However, since the ticket's contents is 703 encrypted and the attacker does not know the corresponding secret 704 key, a stolen ticket cannot be used by an attacker to successfully 705 resume a session. An IKEv2 responder MUST use strong encryption and 706 integrity protection of the ticket to prevent an attacker from 707 obtaining the ticket's contents, e.g., by using a brute force attack. 709 A ticket by reference does not need to be encrypted. When an 710 adversary is able to eavesdrop on an exchange, as described in the 711 previous paragraph, then the ticket by reference may be obtained. A 712 ticket by reference cannot be used by an attacker to successfully 713 resume a session, for the same reasons as for a ticket by value. 714 Moreover, the adversary MUST NOT be able to resolve the ticket via 715 the reference, i.e., access control MUST be enforced to ensure 716 disclosure only to authorized entities. 718 9.2. Forged Tickets 720 A malicious user could forge or alter a ticket by value in order to 721 resume a session, to extend its lifetime, to impersonate as another 722 user, or to gain additional privileges. This attack is not possible 723 if the content of the ticket by value is protected using a strong 724 integrity protection algorithm. 726 In case of a ticket by reference an adversary may attempt to 727 construct a fake ticket by reference to point to state information 728 stored by the IKEv2 responder. This attack will fail because the 729 adversary is not in possession of the keying material associated with 730 the IKEv2 SA. As noted in Section 7.1, it is often useful to 731 integrity-protect the ticket by reference, too. 733 9.3. Denial of Service Attacks 735 An adversary could generate and send a large number of tickets by 736 value to a gateway for verification. To minimize the possibility of 737 such denial of service, ticket verification should be lightweight 738 (e.g., using efficient symmetric key cryptographic algorithms). 740 When an adversary chooses to send a large number of tickets by 741 reference then this may lead to an amplification attack as the IKEv2 742 responder is forced to resolve the reference to a ticket in order to 743 determine that the adversary is not in possession of the keying 744 material corresponding to the stored state or that the reference is 745 void. To minimize this attack, the protocol to resolve the reference 746 should be as lightweight as possible. and should not generate a large 747 number of messages. 749 9.4. Key Management for Tickets By Value 751 A full description of the management of the keys used to protect the 752 ticket by value is beyond the scope of this document. A list of 753 RECOMMENDED practices is given below. 754 o The keys should be generated securely following the randomness 755 recommendations in [RFC4086]. 756 o The keys and cryptographic protection algorithms should be at 757 least 128 bits in strength. 758 o The keys should not be used for any other purpose than generating 759 and verifying tickets. 760 o The keys should be changed regularly. 761 o The keys should be changed if the ticket format or cryptographic 762 protection algorithms change. 764 9.5. Ticket Lifetime 766 An IKEv2 responder controls the validity period of the state 767 information by attaching a lifetime to a ticket. The chosen lifetime 768 is based on the operational and security requirements of the 769 environment in which this IKEv2 extension is deployed. The responder 770 provides information about the ticket lifetime to the IKEv2 771 initiator, allowing it to manage its tickets. 773 9.6. Ticket by Value Format 775 Great care must be taken when defining a ticket format such that the 776 requirements outlined in Section 7.1 are met. In particular, if 777 confidential information, such as a secret key, is transferred to the 778 client it MUST be done using channel security to prevent attackers 779 from obtaining or modifying the ticket. Also, the ticket by value 780 MUST have its integrity and confidentiality protected with strong 781 cryptographic techniques to prevent a breach in the security of the 782 system. 784 9.7. Identity Privacy, Anonymity, and Unlinkability 786 Since opaque state information is passed around between the IKEv2 787 initiator and the IKEv2 responder it is important that leakage of 788 information, such as the identities of an IKEv2 initiator and a 789 responder, MUST be avoided. 791 When an IKEv2 initiator presents a ticket as part of the 792 IKE_SESSION_RESUME exchange, confidentiality is not provided for the 793 exchange. There is thereby the possibility for an on-path adversary 794 to observe multiple exchange handshakes where the same state 795 information is used and therefore to conclude that they belong to the 796 same communication end points. 798 This document therefore requires that the ticket be presented to the 799 IKEv2 responder only once; under normal circumstances (e.g. no active 800 attacker), there should be no multiple use of the same ticket. 802 10. Acknowledgements 804 We would like to thank Paul Hoffman, Pasi Eronen, Florian Tegeler, 805 Stephen Kent, Sean Shen, Xiaoming Fu, Stjepan Gros, Dan Harkins, Russ 806 Housely, Yoav Nir and Tero Kivinen for their comments. We would like 807 to particularly thank Florian Tegeler and Stjepan Gros for their help 808 with their implementation efforts and Florian Tegeler for his formal 809 verification using the CASPER tool set. 811 We would furthermore like to thank the authors of 812 [I-D.xu-ike-sa-sync](Yan Xu, Peny Yang, Yuanchen Ma, Hui Deng and Ke 813 Xu) for their input on the stub concept. 815 We would like to thank Hui Deng, Tero Kivinen, Peny Yang, Ahmad 816 Muhanna and Stephen Kent for their feedback regarding the ticket by 817 reference concept. 819 11. References 821 11.1. Normative References 823 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 824 Requirement Levels", BCP 14, RFC 2119, March 1997. 826 [RFC4306] Kaufman, C., "Internet Key Exchange (IKEv2) Protocol", 827 RFC 4306, December 2005. 829 11.2. Informative References 831 [I-D.ietf-ipsecme-ikev2-redirect] 832 Devarapalli, V. and K. Weniger, "Redirect Mechanism for 833 IKEv2", draft-ietf-ipsecme-ikev2-redirect-08 (work in 834 progress), April 2009. 836 [I-D.ietf-ipsecme-ikev2bis] 837 Kaufman, C., Hoffman, P., Nir, Y., and P. Eronen, 838 "Internet Key Exchange Protocol: IKEv2", 839 draft-ietf-ipsecme-ikev2bis-03 (work in progress), 840 April 2009. 842 [I-D.ietf-rohc-ikev2-extensions-hcoipsec] 843 Ertekin, E., Christou, C., Jassani, R., Kivinen, T., and 844 C. Bormann, "IKEv2 Extensions to Support Robust Header 845 Compression over IPsec (ROHCoIPsec)", 846 draft-ietf-rohc-ikev2-extensions-hcoipsec-08 (work in 847 progress), February 2009. 849 [I-D.rescorla-stateless-tokens] 850 Rescorla, E., "How to Implement Secure (Mostly) Stateless 851 Tokens", draft-rescorla-stateless-tokens-01 (work in 852 progress), March 2007. 854 [I-D.xu-ike-sa-sync] 855 Xu, Y., Yang, P., Ma, Y., Deng, H., and H. Deng, "IKEv2 SA 856 Synchronization for session resumption", 857 draft-xu-ike-sa-sync-01 (work in progress), October 2008. 859 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 860 Requirements for Security", BCP 106, RFC 4086, June 2005. 862 [RFC4301] Kent, S. and K. Seo, "Security Architecture for the 863 Internet Protocol", RFC 4301, December 2005. 865 [RFC4478] Nir, Y., "Repeated Authentication in Internet Key Exchange 866 (IKEv2) Protocol", RFC 4478, April 2006. 868 [RFC4555] Eronen, P., "IKEv2 Mobility and Multihoming Protocol 869 (MOBIKE)", RFC 4555, June 2006. 871 [RFC4718] Eronen, P. and P. Hoffman, "IKEv2 Clarifications and 872 Implementation Guidelines", RFC 4718, October 2006. 874 [RFC4739] Eronen, P. and J. Korhonen, "Multiple Authentication 875 Exchanges in the Internet Key Exchange (IKEv2) Protocol", 876 RFC 4739, November 2006. 878 [RFC4754] Fu, D. and J. Solinas, "IKE and IKEv2 Authentication Using 879 the Elliptic Curve Digital Signature Algorithm (ECDSA)", 880 RFC 4754, January 2007. 882 [RFC4806] Myers, M. and H. Tschofenig, "Online Certificate Status 883 Protocol (OCSP) Extensions to IKEv2", RFC 4806, 884 February 2007. 886 [RFC5077] Salowey, J., Zhou, H., Eronen, P., and H. Tschofenig, 887 "Transport Layer Security (TLS) Session Resumption without 888 Server-Side State", RFC 5077, January 2008. 890 Appendix A. Ticket Format 892 This document does not specify a mandatory-to-implement or a 893 mandatory-to-use ticket format. The formats described in the 894 following sub-sections are provided as useful examples. 896 A.1. Example Ticket by Value Format 898 struct { 899 [authenticated] struct { 900 octet format_version; // 1 for this version of the protocol 901 octet reserved[3]; // sent as 0, ignored by receiver. 902 octet key_id[8]; // arbitrary byte string 903 opaque IV[0..255]; // actual length (possibly 0) depends 904 // on the encryption algorithm 906 [encrypted] struct { 907 opaque IDi, IDr; // the full payloads 908 octet SPIi[8], SPIr[8]; 909 opaque SA; // the full SAr payload 910 octet SK_d[0..255]; // actual length depends on SA value 911 int32 expiration; // an absolute time value, seconds 912 // since Jan. 1, 1970 913 } ikev2_state; 914 } protected_part; 915 opaque MAC[0..255]; // the length (possibly 0) depends 916 // on the integrity algorithm 917 } ticket; 919 Note that the key defined by "key_id" determines the encryption and 920 authentication algorithms used for this ticket. Those algorithms are 921 unrelated to the transforms defined by the SA payload. 923 The reader is referred to [I-D.rescorla-stateless-tokens] that 924 recommends a similar (but not identical) ticket format, and discusses 925 related security considerations in depth. 927 A.2. Example Ticket by Reference Format 929 For implementations that prefer to pass a reference to IKE state in 930 the ticket, rather than the state itself, we suggest the following 931 format: 933 struct { 934 [authenticated] struct { 935 octet format_version; // 1 for this version of the protocol 936 octet reserved[3]; // sent as 0, ignored by receiver. 937 octet key_id[8]; // arbitrary byte string 939 struct { 940 opaque state_ref; // reference to IKE state 941 int32 expiration; // an absolute time value, seconds 942 // since Jan. 1, 1970 943 } ikev2_state_ref; 944 } protected_part; 945 opaque MAC[0..255]; // the length depends 946 // on the integrity algorithm 947 } ticket; 949 Appendix B. Change Log 951 B.1. -03 953 Changed the protocol from one to two round trips, to simplify the 954 security assumptions. Eliminated security considerations associated 955 with the previous version. 957 Closed issue #69, Clarify behavior of SPI and sequence numbers. 959 Closed issue #70, Ticket lifetime - explicit or not? (and ticket push 960 from gateway). 962 Closed issue #99, Ticket example: downgrade. 964 Closed issue #76, IPsec child SAs during resumption. 966 Closed issue #77, Identities in draft-ietf-ipsecme-ikev2-resumption. 968 Closed issue #95, Minor nits for ikev2-resumption-02. 970 Closed issue #97, Clarify what state comes from where. 972 Closed issue #98, Replays in 1-RTT protocol. 974 Closed issue #100, NAT detection [and] IP address change. 976 Closed issue #101, Assorted issues by Tero. 978 B.2. -02 980 Added a new TICKET_OPAQUE payload that does not have a lifetime field 981 included. 983 Removed the lifetime usage from the IKE_SESSION_RESUME exchange 984 (utilizing the TICKET_OPAQUE) when presenting the ticket to the 985 gateway. 987 Removed IDi payloads from the IKE_SESSION_RESUME exchange. 989 Clarified that IPsec child SAs would be deleted once the old IKE SA 990 gets deleted as well. 992 Clarified the behavior of SPI and sequence number usage. 994 B.3. -01 996 Addressed issue#75, see 997 http://tools.ietf.org/wg/ipsecme/trac/ticket/75. This included 998 changes throughout the document to ensure that the ticket may contain 999 a reference or a value. 1001 B.4. -00 1003 Resubmitted document as a WG item. 1005 B.5. -01 1007 Added reference to [I-D.xu-ike-sa-sync] 1009 Included recommended ticket format into the appendix 1011 Various editorial improvements within the document 1013 B.6. -00 1015 Issued a -00 version for the IPSECME working group. Reflected 1016 discussions at IETF#72 regarding the strict focus on session 1017 resumption. Consequently, text about failover was removed. 1019 B.7. -04 1021 Editorial fixes; references cleaned up; updated author's contact 1022 address 1024 B.8. -03 1026 Removed counter mechanism. Added an optional anti-DoS mechanism, 1027 based on IKEv2 cookies (removed previous discussion of cookies). 1028 Clarified that gateways may support reallocation of same IP address, 1029 if provided by network. Proposed a solution outline to the problem 1030 of key exchange for the keys that protect tickets. Added fields to 1031 the ticket to enable interoperability. Removed incorrect MOBIKE 1032 notification. 1034 B.9. -02 1036 Clarifications on generation of SPI values, on the ticket's lifetime 1037 and on the integrity protection of the anti-replay counter. 1038 Eliminated redundant SPIs from the notification payloads. 1040 B.10. -01 1042 Editorial review. Removed 24-hour limitation on ticket lifetime, 1043 lifetime is up to local policy. 1045 B.11. -00 1047 Initial version. This draft is a selective merge of 1048 draft-sheffer-ike-session-resumption-00 and 1049 draft-dondeti-ipsec-failover-sol-00. 1051 Authors' Addresses 1053 Yaron Sheffer 1054 Check Point Software Technologies Ltd. 1055 5 Hasolelim St. 1056 Tel Aviv 67897 1057 Israel 1059 Email: yaronf@checkpoint.com 1060 Hannes Tschofenig 1061 Nokia Siemens Networks 1062 Linnoitustie 6 1063 Espoo 02600 1064 Finland 1066 Phone: +358 (50) 4871445 1067 Email: Hannes.Tschofenig@gmx.net 1068 URI: http://www.tschofenig.priv.at 1070 Lakshminath Dondeti 1071 QUALCOMM, Inc. 1072 5775 Morehouse Dr 1073 San Diego, CA 1074 USA 1076 Phone: +1 858-845-1267 1077 Email: ldondeti@qualcomm.com 1079 Vidya Narayanan 1080 QUALCOMM, Inc. 1081 5775 Morehouse Dr 1082 San Diego, CA 1083 USA 1085 Phone: +1 858-845-2483 1086 Email: vidyan@qualcomm.com