idnits 2.17.1 draft-ietf-rtcweb-stun-consent-freshness-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 (July 4, 2014) is 3584 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 (-17) exists of draft-ietf-rtcweb-transports-05 == 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: January 5, 2015 R. Ravindranath 6 T. Reddy 7 Cisco Systems 8 M. Thomson 9 Mozilla 10 July 4, 2014 12 STUN Usage for Consent Freshness 13 draft-ietf-rtcweb-stun-consent-freshness-05 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 STUN usage. 21 This same mechanism can also determine connection loss ("liveness") 22 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 January 5, 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 ICE 80 connectivity checks, and periodically for the duration of the session 81 using the procedures defined in this document. 83 When a session is first established, WebRTC implementations are 84 required to perform STUN connectivity checks as part of ICE 85 [RFC5245]. That initial consent is not described further in this 86 document and it is assumed that ICE is being used for that initial 87 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 WebRTC endpoints are required to support full ICE as specified in 100 section 3.4 of [I-D.ietf-rtcweb-transports]. However, when WebRTC 101 endpoints interwork with other endpoints that support only ICE-lite 102 (e.g. gateways) those endpoints will not generate consent checks, but 103 just respond to consent checks they receive. 105 2. Terminology 107 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 108 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 109 document are to be interpreted as described in [RFC2119]. 111 Consent: It is the mechanism of obtaining permission to send traffic 112 to a certain transport address. This is the initial consent to 113 send traffic, which is obtained by ICE or a TCP handshake. 115 Consent Freshness: Permission to continue sending traffic to a 116 certain transport address. This is performed by the procedure 117 described in this document. 119 Session Liveness: Detecting loss of connectivity to a certain 120 transport address. This is performed by the procedure described 121 in this document. 123 Transport Address: The remote peer's IP address and (UDP or TCP) 124 port number. 126 3. Design Considerations 128 Although ICE requires periodic keepalive traffic to keep NAT bindings 129 alive (Section 10 of [RFC5245], [RFC6263]), those keepalives are sent 130 as STUN Indications which are send-and-forget, and do not evoke a 131 response. A response is necessary both for consent to continue 132 sending traffic, as well as to verify session liveness. Thus, we 133 need a request/response mechanism for consent freshness. ICE can be 134 used for that mechanism because ICE already requires ICE agents 135 continue listening for ICE messages, as described in section 10 of 136 [RFC5245]. 138 4. Solution 140 There are two ways consent to send traffic is revoked: expiration of 141 consent and immediate revocation of consent, which are discussed in 142 the following sections. 144 4.1. Expiration of Consent 146 A WebRTC browser performs a combined consent freshness and session 147 liveness test using STUN request/response as described below: 149 An endpoint MUST NOT send application data (e.g., RTP, RTCP, SCTP, 150 DTLS) on an ICE-initiated connection unless the receiving endpoint 151 consents to receive the data. After a successful ICE connectivity 152 check on a particular transport address, subsequent consent MUST be 153 obtained following the procedure described in this document. The 154 consent expires after a fixed amount of time. 156 Explicit consent to send is obtained by sending an ICE binding 157 request to the remote peer's Transport Address and receiving a 158 matching, authenticated, non-error ICE binding response from the 159 remote peer's Transport Address. These ICE binding requests and 160 responses are authenticated using the same short-term credentials as 161 the initial ICE exchange. Implementations MUST cease sending data if 162 their consent expires. To prevent expiry of consent, a STUN binding 163 request is sent every N milliseconds, where N SHOULD be 5000 164 milliseconds and MUST be randomized at least 20% above and 20% below 165 that value (to prevent prevent network synchronization). Using the 166 value 5000 milliseconds and that 20% randomization range, N would be 167 a value between 4000 and 6000. These STUN binding requests for 168 consent are not re-transmitted. Each STUN binding request for 169 consent re-calculates a new random value N and a new 170 cryptographically-random [RFC4086] STUN transaction ID. 172 The initial Consent to send traffic is obtained by ICE. Consent 173 expires after 30 seconds. That is, if a valid STUN binding response 174 corresponding to one of the STUN requests sent in the last 30 seconds 175 has not been received from the remote peer's Transport Address, the 176 endpoint MUST cease transmission on that 5-tuple. 178 To meet the security needs of consent, an untrusted application 179 (e.g., JavaScript) MUST NOT be able to obtain or control the STUN 180 transaction ID, because that enables spoofing STUN responses, 181 falsifying consent. 183 While TCP affords some protection from off-path attackers ([RFC5961], 184 [RFC4953]), there is still a risk an attacker could cause a TCP 185 sender to send packets forever by spoofing ACKs. To prevent such an 186 attack, consent checks MUST be performed over all WebRTC-initiated 187 transport connections, including TCP. In this way, an off-path 188 attacker spoofing TCP segments can not cause a TCP sender to send 189 packets longer than the consent timer (30 seconds). 191 An endpoint that is not sending any application traffic does not need 192 to obtain consent which can slightly conserve its resources. 193 However, the endpoint needs to ensure its NAT or firewall mappings 194 persist which can be done using keepalive or other techniques (see 195 Section 10 of [RFC5245] and see [RFC6263]). If the endpoint wants to 196 send application traffic, it needs to first obtain consent if its 197 consent has expired. 199 4.2. Immediate Revocation of Consent 201 The previous section explained how consent expires due to a timeout. 202 In some cases it is useful to signal a connection is terminated, 203 rather than relying on a timeout. This is done by immediately 204 revoking consent. 206 Consent for sending traffic on the media or data channel is 207 immediately revoked by receipt of a an authenticated message that 208 closes the connection (e.g., a TLS fatal alert) or receipt of a valid 209 and authenticated STUN response with error code Forbidden (403). 211 Receipt of an unauthenticated message that closes a connection (e.g., 212 TCP FIN) does not indicate revocation of consent. Thus, an endpoint 213 receiving an unauthenticated end-of-session message SHOULD continue 214 sending media (over connectionless transport) or attempt to re- 215 establish the connection (over connection-oriented transport) until 216 consent expires or it receives an authenticated message revoking 217 consent. 219 Note that an authenticated SRTCP BYE does not terminate consent; it 220 only indicates the associated SRTP source has quit. 222 5. Connection Liveness 224 A connection is considered "live" if packets are received from a 225 remote endpoint within an application-dependent period. An 226 application can request a notification when there are no packets 227 received for a certain period (configurable). 229 Similarly, if packets haven't been received within a certain period, 230 an application can request a consent check (heartbeat) be generated. 231 These two time intervals might be controlled by the same 232 configuration item. 234 Sending consent checks (heartbeats) at a high rate could allow a 235 malicious application to generate congestion, so applications MUST 236 NOT be able to send heartbeats at an average rate of more than 1 per 237 second. 239 6. DiffServ Treatment for Consent packets 241 It is RECOMMENDED that STUN consent checks use the same Diffserv 242 Codepoint markings as the ICE connectivity checks described in 243 section 7.1.2.4 of [RFC5245] for a given 5-tuple. 245 Note: It is possible that different Diffserv Codepoints are used by 246 different media over the same transport address 247 [I-D.ietf-tsvwg-rtcweb-qos]. Such a case is outside the scope of 248 this document. 250 7. W3C API Implications 252 For the consent freshness and liveness test the W3C specification 253 should provide APIs as described below: 255 1. Ability for the browser to notify the JavaScript that consent 256 freshness has failed for a 5-tuple and the browser has stopped 257 transmitting on that 5-tuple. 259 2. Ability for the JavaScript to start and stop liveness test and 260 set the liveness test interval. 262 3. Ability for the browser to notify the JavaScript that a liveness 263 test has failed for a media stream. 265 8. Security Considerations 267 This document describes a security mechanism. 269 The security considerations discussed in [RFC5245] should also be 270 taken into account. 272 SRTP is encrypted and authenticated with symmetric keys; that is, 273 both sender and receiver know the keys. With two party sessions, 274 receipt of an authenticated packet from the single remote party is a 275 strong assurance the packet came from that party. However, when a 276 session involves more than two parties, all of whom know each others 277 keys, any of those parties could have sent (or spoofed) the packet. 278 Such shared key distributions are possible with some MIKEY [RFC3830] 279 modes, Security Descriptions [RFC4568], and EKT 280 [I-D.ietf-avtcore-srtp-ekt]. Thus, in such shared keying 281 distributions, receipt of an authenticated SRTP packet is not 282 sufficient to verify consent. 284 9. IANA Considerations 286 This document does not require any action from IANA. 288 10. Acknowledgement 290 Thanks to Eric Rescorla, Harald Alvestrand, Bernard Aboba, Magnus 291 Westerland, Cullen Jennings, Christer Holmberg and Simon Perreault 292 for their valuable inputs and comments. 294 11. References 296 11.1. Normative References 298 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 299 Requirement Levels", BCP 14, RFC 2119, March 1997. 301 [RFC4086] Eastlake, D., Schiller, J., and S. Crocker, "Randomness 302 Requirements for Security", BCP 106, RFC 4086, June 2005. 304 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 305 (ICE): A Protocol for Network Address Translator (NAT) 306 Traversal for Offer/Answer Protocols", RFC 5245, April 307 2010. 309 [RFC6263] Marjou, X. and A. Sollaud, "Application Mechanism for 310 Keeping Alive the NAT Mappings Associated with RTP / RTP 311 Control Protocol (RTCP) Flows", RFC 6263, June 2011. 313 11.2. Informative References 315 [I-D.ietf-avtcore-srtp-ekt] 316 McGrew, D. and D. Wing, "Encrypted Key Transport for 317 Secure RTP", draft-ietf-avtcore-srtp-ekt-02 (work in 318 progress), February 2014. 320 [I-D.ietf-rtcweb-transports] 321 Alvestrand, H., "Transports for RTCWEB", draft-ietf- 322 rtcweb-transports-05 (work in progress), June 2014. 324 [I-D.ietf-tsvwg-rtcweb-qos] 325 Dhesikan, S., Jennings, C., Druta, D., Jones, P., and J. 326 Polk, "DSCP and other packet markings for RTCWeb QoS", 327 draft-ietf-tsvwg-rtcweb-qos-02 (work in progress), June 328 2014. 330 [RFC3830] Arkko, J., Carrara, E., Lindholm, F., Naslund, M., and K. 331 Norrman, "MIKEY: Multimedia Internet KEYing", RFC 3830, 332 August 2004. 334 [RFC4568] Andreasen, F., Baugher, M., and D. Wing, "Session 335 Description Protocol (SDP) Security Descriptions for Media 336 Streams", RFC 4568, July 2006. 338 [RFC4953] Touch, J., "Defending TCP Against Spoofing Attacks", RFC 339 4953, July 2007. 341 [RFC5961] Ramaiah, A., Stewart, R., and M. Dalal, "Improving TCP's 342 Robustness to Blind In-Window Attacks", RFC 5961, August 343 2010. 345 Authors' Addresses 347 Muthu Arul Mozhi Perumal 348 Ericsson 349 Mahadevapura 350 Bangalore, Karnataka 560048 351 India 353 Email: muthu.arul@gmail.com 355 Dan Wing 356 Cisco Systems 357 821 Alder Drive 358 Milpitas, California 95035 359 USA 361 Email: dwing@cisco.com 363 Ram Mohan Ravindranath 364 Cisco Systems 365 Cessna Business Park 366 Sarjapur-Marathahalli Outer Ring Road 367 Bangalore, Karnataka 560103 368 India 370 Email: rmohanr@cisco.com 371 Tirumaleswar Reddy 372 Cisco Systems 373 Cessna Business Park, Varthur Hobli 374 Sarjapur Marathalli Outer Ring Road 375 Bangalore, Karnataka 560103 376 India 378 Email: tireddy@cisco.com 380 Martin Thomson 381 Mozilla 382 Suite 300 383 650 Castro Street 384 Mountain View, California 94041 385 US 387 Email: martin.thomson@gmail.com