idnits 2.17.1 draft-ietf-rtcweb-stun-consent-freshness-07.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 (September 15, 2014) is 3510 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) ** Obsolete normative reference: RFC 5245 (Obsoleted by RFC 8445, RFC 8839) == Outdated reference: A later version (-03) exists of draft-ietf-avtcore-srtp-ekt-02 == Outdated reference: A later version (-19) exists of draft-ietf-rtcweb-overview-11 == Outdated reference: A later version (-18) exists of draft-ietf-tsvwg-rtcweb-qos-02 Summary: 1 error (**), 0 flaws (~~), 4 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 RTCWEB M. Perumal 3 Internet-Draft Ericsson 4 Intended status: Standards Track D. Wing 5 Expires: March 19, 2015 R. Ravindranath 6 T. Reddy 7 Cisco Systems 8 M. Thomson 9 Mozilla 10 September 15, 2014 12 STUN Usage for Consent Freshness 13 draft-ietf-rtcweb-stun-consent-freshness-07 15 Abstract 17 To prevent sending excessive traffic to an endpoint, periodic consent 18 needs to be obtained from that remote endpoint. 20 This document describes a consent mechanism using a new Session 21 Traversal Utilities for NAT (STUN) usage. This same mechanism can 22 also determine connection loss ("liveness") with a remote peer. 24 Status of This Memo 26 This Internet-Draft is submitted in full conformance with the 27 provisions of BCP 78 and BCP 79. 29 Internet-Drafts are working documents of the Internet Engineering 30 Task Force (IETF). Note that other groups may also distribute 31 working documents as Internet-Drafts. The list of current Internet- 32 Drafts is at http://datatracker.ietf.org/drafts/current/. 34 Internet-Drafts are draft documents valid for a maximum of six months 35 and may be updated, replaced, or obsoleted by other documents at any 36 time. It is inappropriate to use Internet-Drafts as reference 37 material or to cite them other than as "work in progress." 39 This Internet-Draft will expire on March 19, 2015. 41 Copyright Notice 43 Copyright (c) 2014 IETF Trust and the persons identified as the 44 document authors. All rights reserved. 46 This document is subject to BCP 78 and the IETF Trust's Legal 47 Provisions Relating to IETF Documents 48 (http://trustee.ietf.org/license-info) in effect on the date of 49 publication of this document. Please review these documents 50 carefully, as they describe your rights and restrictions with respect 51 to this document. Code Components extracted from this document must 52 include Simplified BSD License text as described in Section 4.e of 53 the Trust Legal Provisions and are provided without warranty as 54 described in the Simplified BSD License. 56 Table of Contents 58 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 59 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 60 3. Design Considerations . . . . . . . . . . . . . . . . . . . . 3 61 4. Solution . . . . . . . . . . . . . . . . . . . . . . . . . . 3 62 4.1. Expiration of Consent . . . . . . . . . . . . . . . . . . 4 63 4.2. Immediate Revocation of Consent . . . . . . . . . . . . . 5 64 5. Connection Liveness . . . . . . . . . . . . . . . . . . . . . 5 65 6. DiffServ Treatment for Consent packets . . . . . . . . . . . 6 66 7. W3C API Implications . . . . . . . . . . . . . . . . . . . . 6 67 8. Security Considerations . . . . . . . . . . . . . . . . . . . 6 68 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 7 69 10. Acknowledgement . . . . . . . . . . . . . . . . . . . . . . . 7 70 11. References . . . . . . . . . . . . . . . . . . . . . . . . . 7 71 11.1. Normative References . . . . . . . . . . . . . . . . . . 7 72 11.2. Informative References . . . . . . . . . . . . . . . . . 7 73 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 75 1. Introduction 77 To prevent attacks on peers, RTP endpoints have to ensure the remote 78 peer wants to receive traffic. This is performed both when the 79 session is first established to the remote peer using Interactive 80 Connectivity Establishment ICE [RFC5245] connectivity checks, and 81 periodically for the duration of the session using the procedures 82 defined in this document. 84 When a session is first established, ICE implementations obtain 85 initial consent by performing STUN connectivity checks as part of 86 ICE. That initial consent is not described further in this document 87 and it is assumed that ICE is being used for that initial consent. 89 Related to consent is loss of connectivity ("liveness"). Many 90 applications want notification of connection loss to take appropriate 91 actions (e.g., alert the user, try switching to a different 92 interface). 94 This document describes a new STUN usage with exchange of request and 95 response messages to verify the remote peer's consent to receive 96 traffic, and the absence of which for a period of time indicates a 97 loss of liveness. 99 When a (full) ICE implementation interworks with an ICE-lite 100 implementation the ICE-lite implementation will not generate consent 101 checks, but will just just respond to consent checks it receives. 103 2. Terminology 105 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 106 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 107 document are to be interpreted as described in [RFC2119]. 109 Consent: It is the mechanism of obtaining permission to send traffic 110 to a certain transport address. This is the initial consent to 111 send traffic, which is obtained by ICE or a TCP handshake. 113 Consent Freshness: Permission to continue sending traffic to a 114 certain transport address. This is performed by the procedure 115 described in this document. 117 Session Liveness: Detecting loss of connectivity to a certain 118 transport address. This is performed by the procedure described 119 in this document. 121 Transport Address: The remote peer's IP address and (UDP or TCP) 122 port number. 124 3. Design Considerations 126 Although ICE requires periodic keepalive traffic to keep NAT bindings 127 alive (Section 10 of [RFC5245], [RFC6263]), those keepalives are sent 128 as STUN Indications which are send-and-forget, and do not evoke a 129 response. A response is necessary both for consent to continue 130 sending traffic, as well as to verify session liveness. Thus, we 131 need a request/response mechanism for consent freshness. ICE can be 132 used for that mechanism because ICE implementations are already 133 required to continue listening for ICE messages, as described in 134 section 10 of [RFC5245]. 136 4. Solution 138 There are two ways consent to send traffic is revoked: expiration of 139 consent and immediate revocation of consent, which are discussed in 140 the following sections. 142 4.1. Expiration of Consent 144 A WebRTC implementation [I-D.ietf-rtcweb-overview], which implements 145 ICE, MUST perform a combined consent freshness and session liveness 146 test using STUN request/response as described below: 148 An endpoint MUST NOT send application data (e.g., RTP, RTCP, SCTP, 149 DTLS), over any transport protocol (e.g., UDP, TCP) on an ICE- 150 initiated connection unless the receiving endpoint consents to 151 receive the data. After a successful ICE connectivity check on a 152 particular transport address, subsequent consent MUST be obtained 153 following the procedure described in this document. The consent 154 expires after a fixed amount of time. During ICE restart consent 155 checks MUST continue to be sent on previously validated pair, and 156 MUST be responded to on the previously validated pair, until ICE 157 restart completes. 159 Note: Although TCP has its own consent mechanism (TCP 160 acknowledgements), consent is necessary over a TCP connection 161 because it could be translated to a UDP connection (e.g., 162 [RFC6062]). 164 Explicit consent to send is obtained by sending an ICE binding 165 request to the remote peer's Transport Address and receiving a 166 matching, authenticated, non-error ICE binding response from the 167 remote peer's Transport Address. These ICE binding requests and 168 responses are authenticated using the same short-term credentials as 169 the initial ICE exchange. Implementations MUST cease sending data if 170 their consent expires. To prevent expiry of consent, a STUN binding 171 request MUST be sent every N milliseconds, where N is chosen randomly 172 with each consent check in the interval [.8N, 1.2N] (to prevent 173 network synchronization), where N SHOULD be 5000. Using the value 174 5000 milliseconds and that 20% randomization range, N would be a 175 value between 4000 and 6000. These STUN binding requests for consent 176 are not re-transmitted. Each STUN binding request for consent re- 177 calculates a new random value N and a new cryptographically-random 178 [RFC4086] STUN transaction ID. 180 The initial Consent to send traffic is obtained by ICE. Consent 181 expires after 30 seconds. That is, if a valid STUN binding response 182 corresponding to one of the STUN requests sent in the last 30 seconds 183 has not been received from the remote peer's Transport Address, the 184 endpoint MUST cease transmission on that 5-tuple. 186 To meet the security needs of consent, an untrusted application 187 (e.g., JavaScript) MUST NOT be able to obtain or control the STUN 188 transaction ID, because that enables spoofing STUN responses, 189 falsifying consent. 191 While TCP affords some protection from off-path attackers ([RFC5961], 192 [RFC4953]), there is still a risk an attacker could cause a TCP 193 sender to send packets forever by spoofing ACKs. To prevent such an 194 attack, consent checks MUST be performed over all transport 195 connections, including TCP. In this way, an off-path attacker 196 spoofing TCP segments can not cause a TCP sender to send packets 197 longer than the consent timer (30 seconds). 199 An endpoint that is not sending any application traffic does not need 200 to obtain consent which can slightly conserve its resources. 201 However, the endpoint needs to ensure its NAT or firewall mappings 202 persist which can be done using keepalive or other techniques (see 203 Section 10 of [RFC5245] and see [RFC6263]). If the endpoint wants to 204 send application traffic, it needs to first obtain consent if its 205 consent has expired. 207 4.2. Immediate Revocation of Consent 209 The previous section explained how consent expires due to a timeout. 210 In some cases it is useful to signal a connection is terminated, 211 rather than relying on a timeout. This is done by immediately 212 revoking consent. 214 Consent for sending traffic on the media or data channel is 215 immediately revoked by receipt of an authenticated message that 216 closes the connection (e.g., a TLS fatal alert) or receipt of a valid 217 and authenticated STUN response with error code Forbidden (403). 218 Those consent revocation messages can be lost on the network, so an 219 implementation wanting to immediately revoke consent needs to 220 remember those credentials until consent expiry (30 seconds). 222 Receipt of an unauthenticated message that closes a connection (e.g., 223 TCP FIN) does not indicate revocation of consent. Thus, an endpoint 224 receiving an unauthenticated end-of-session message SHOULD continue 225 sending media (over connectionless transport) or attempt to re- 226 establish the connection (over connection-oriented transport) until 227 consent expires or it receives an authenticated message revoking 228 consent. 230 Note that an authenticated SRTCP BYE does not terminate consent; it 231 only indicates the associated SRTP source has quit. 233 5. Connection Liveness 235 A connection is considered "live" if packets are received from a 236 remote endpoint within an application-dependent period. An 237 application can request a notification when there are no packets 238 received for a certain period (configurable). 240 Similarly, if packets haven't been received within a certain period, 241 an application can request a consent check (heartbeat) be generated. 242 These two time intervals might be controlled by the same 243 configuration item. 245 Sending consent checks (heartbeats) at a high rate could allow a 246 malicious application to generate congestion, so applications MUST 247 NOT be able to send heartbeats at an average rate of more than 1 per 248 second. 250 6. DiffServ Treatment for Consent packets 252 It is RECOMMENDED that STUN consent checks use the same Diffserv 253 Codepoint markings as the ICE connectivity checks described in 254 section 7.1.2.4 of [RFC5245] for a given 5-tuple. 256 Note: It is possible that different Diffserv Codepoints are used by 257 different media over the same transport address 258 [I-D.ietf-tsvwg-rtcweb-qos]. Such a case is outside the scope of 259 this document. 261 7. W3C API Implications 263 For the consent freshness and liveness test the W3C specification 264 should provide APIs as described below: 266 1. Ability for the browser to notify the JavaScript that consent 267 freshness has failed for a 5-tuple and the browser has stopped 268 transmitting on that 5-tuple. 270 2. Ability for the JavaScript to start and stop liveness test and 271 set the liveness test interval. 273 3. Ability for the browser to notify the JavaScript that a liveness 274 test has failed for a media stream. 276 8. Security Considerations 278 This document describes a security mechanism. 280 The security considerations discussed in [RFC5245] should also be 281 taken into account. 283 SRTP is encrypted and authenticated with symmetric keys; that is, 284 both sender and receiver know the keys. With two party sessions, 285 receipt of an authenticated packet from the single remote party is a 286 strong assurance the packet came from that party. However, when a 287 session involves more than two parties, all of whom know each others 288 keys, any of those parties could have sent (or spoofed) the packet. 289 Such shared key distributions are possible with some MIKEY [RFC3830] 290 modes, Security Descriptions [RFC4568], and EKT 291 [I-D.ietf-avtcore-srtp-ekt]. Thus, in such shared keying 292 distributions, receipt of an authenticated SRTP packet is not 293 sufficient to verify consent. 295 9. IANA Considerations 297 This document does not require any action from IANA. 299 10. Acknowledgement 301 Thanks to Eric Rescorla, Harald Alvestrand, Bernard Aboba, Magnus 302 Westerland, Cullen Jennings, Christer Holmberg, Simon Perreault, Paul 303 Kyzivat, Emil Ivov, and Jonathan Lennox for their valuable inputs and 304 comments. 306 11. References 308 11.1. Normative References 310 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 311 Requirement Levels", BCP 14, RFC 2119, March 1997. 313 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 314 Requirements for Security", BCP 106, RFC 4086, June 2005. 316 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 317 (ICE): A Protocol for Network Address Translator (NAT) 318 Traversal for Offer/Answer Protocols", RFC 5245, April 319 2010. 321 [RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for 322 Keeping Alive the NAT Mappings Associated with RTP / RTP 323 Control Protocol (RTCP) Flows", RFC 6263, June 2011. 325 11.2. Informative References 327 [I-D.ietf-avtcore-srtp-ekt] 328 McGrew, D. and D. Wing, "Encrypted Key Transport for 329 Secure RTP", draft-ietf-avtcore-srtp-ekt-02 (work in 330 progress), February 2014. 332 [I-D.ietf-rtcweb-overview] 333 Alvestrand, H., "Overview: Real Time Protocols for 334 Browser-based Applications", draft-ietf-rtcweb-overview-11 335 (work in progress), August 2014. 337 [I-D.ietf-tsvwg-rtcweb-qos] 338 Dhesikan, S., Jennings, C., Druta, D., Jones, P., and J. 339 Polk, "DSCP and other packet markings for RTCWeb QoS", 340 draft-ietf-tsvwg-rtcweb-qos-02 (work in progress), June 341 2014. 343 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 344 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 345 August 2004. 347 [RFC4568] Andreasen, F., Baugher, M., and D. Wing, "Session 348 Description Protocol (SDP) Security Descriptions for Media 349 Streams", RFC 4568, July 2006. 351 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", RFC 352 4953, July 2007. 354 [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 355 Robustness to Blind In-Window Attacks", RFC 5961, August 356 2010. 358 [RFC6062] Perreault, S. and J. Rosenberg, "Traversal Using Relays 359 around NAT (TURN) Extensions for TCP Allocations", RFC 360 6062, November 2010. 362 Authors' Addresses 364 Muthu Arul Mozhi Perumal 365 Ericsson 366 Ferns Icon 367 Doddanekundi, Mahadevapura 368 Bangalore, Karnataka 560037 369 India 371 Email: muthu.arul@gmail.com 373 Dan Wing 374 Cisco Systems 375 821 Alder Drive 376 Milpitas, California 95035 377 USA 379 Email: dwing@cisco.com 380 Ram Mohan Ravindranath 381 Cisco Systems 382 Cessna Business Park 383 Sarjapur-Marathahalli Outer Ring Road 384 Bangalore, Karnataka 560103 385 India 387 Email: rmohanr@cisco.com 389 Tirumaleswar Reddy 390 Cisco Systems 391 Cessna Business Park, Varthur Hobli 392 Sarjapur Marathalli Outer Ring Road 393 Bangalore, Karnataka 560103 394 India 396 Email: tireddy@cisco.com 398 Martin Thomson 399 Mozilla 400 Suite 300 401 650 Castro Street 402 Mountain View, California 94041 403 US 405 Email: martin.thomson@gmail.com