idnits 2.17.1 draft-ietf-rtcweb-ip-handling-00.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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with private range IPv4 addresses in the document. If these are generic example addresses, they should be changed to use any of the ranges defined in RFC 6890 (or successor): 192.0.2.x, 198.51.100.x or 203.0.113.x. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year -- The document date (March 20, 2016) is 2958 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Outdated reference: A later version (-02) exists of draft-ietf-rtcweb-return-01 -- Obsolete informational reference (is this intentional?): RFC 4941 (Obsoleted by RFC 8981) Summary: 0 errors (**), 0 flaws (~~), 3 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group G. Shieh 3 Internet-Draft J. Uberti 4 Intended status: Standards Track Google 5 Expires: September 21, 2016 March 20, 2016 7 WebRTC IP Address Handling Recommendations 8 draft-ietf-rtcweb-ip-handling-00 10 Abstract 12 This document provides best practices for how IP addresses should be 13 handled by WebRTC applications. 15 Status of This Memo 17 This Internet-Draft is submitted in full conformance with the 18 provisions of BCP 78 and BCP 79. 20 Internet-Drafts are working documents of the Internet Engineering 21 Task Force (IETF). Note that other groups may also distribute 22 working documents as Internet-Drafts. The list of current Internet- 23 Drafts is at http://datatracker.ietf.org/drafts/current/. 25 Internet-Drafts are draft documents valid for a maximum of six months 26 and may be updated, replaced, or obsoleted by other documents at any 27 time. It is inappropriate to use Internet-Drafts as reference 28 material or to cite them other than as "work in progress." 30 This Internet-Draft will expire on September 21, 2016. 32 Copyright Notice 34 Copyright (c) 2016 IETF Trust and the persons identified as the 35 document authors. All rights reserved. 37 This document is subject to BCP 78 and the IETF Trust's Legal 38 Provisions Relating to IETF Documents 39 (http://trustee.ietf.org/license-info) in effect on the date of 40 publication of this document. Please review these documents 41 carefully, as they describe your rights and restrictions with respect 42 to this document. Code Components extracted from this document must 43 include Simplified BSD License text as described in Section 4.e of 44 the Trust Legal Provisions and are provided without warranty as 45 described in the Simplified BSD License. 47 Table of Contents 49 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 50 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2 51 3. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 52 4. Detailed Design . . . . . . . . . . . . . . . . . . . . . . . 4 53 5. Application Guidance . . . . . . . . . . . . . . . . . . . . 5 54 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 55 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 56 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 57 9. Informative References . . . . . . . . . . . . . . . . . . . 6 58 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7 59 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 61 1. Introduction 63 As a technology that supports peer-to-peer connections, WebRTC may 64 send data over different network paths than the path used for HTTP 65 traffic. This may allow a web application to learn additional 66 information about the user, which may be problematic in certain 67 cases. This document summarizes the concerns, and makes 68 recommendations on how best to handle the tradeoff between privacy 69 and media performance. 71 2. Problem Statement 73 WebRTC enables real-time peer-to-peer communications by enumerating 74 network interfaces and discovering the best route through the ICE 75 protocol. During the ICE process, the peers involved in a session 76 gather and exchange all the IP addresses they can discover, so that 77 the connectivity of each IP pair can be checked, and the best path 78 chosen. The addresses that are gathered usually consist of an 79 endpoint's private physical/virtual addresses, and its public 80 Internet addresses. 82 These addresses are exposed upwards to the web application, so that 83 they can be communicated to the remote endpoint. This allows the 84 application to learn more about the local network configuration than 85 it would from a typical HTTP scenario, in which the web server would 86 only see a single public Internet address, i.e. the address from 87 which the HTTP request was sent. 89 The information revealed falls into three categories: 91 (1) If the client is behind a NAT, the client's private IP 92 addresses, typically [RFC1918] addresses, can be learned. 94 (2) If the client tries to hide its physical location through a VPN, 95 and the VPN and local OS supports routing over multiple 96 interfaces, WebRTC will discover the public address associated 97 with both the VPN as well as the ISP public address over that 98 the VPN runs over. 100 (3) If the client is behind a proxy, but direct access to the 101 Internet is also supported, WebRTC's STUN checks will bypass the 102 proxy and reveal the public address of the client. 104 Of these three concerns, #2 is the most significant concern, since 105 for some users, the purpose of using a VPN is for anonymity. 106 However, different VPN users will have different needs, and some VPN 107 users (e.g. corporate VPN users) may in fact prefer WebRTC to send 108 media traffic directly, i.e. not through the VPN. 110 #3 is a less common concern, as proxy administrators can control this 111 behavior through local firewall policy if desired, coupled with the 112 fact that forcing WebRTC traffic through a proxy will have negative 113 effects on both the proxy and on media quality. For situations where 114 this is an important consideration, use of a RETURN proxy, as 115 described below, can be an effective solution. 117 #1 is considered to be the least significant concern, given that the 118 local address values often contain minimal information (e.g. 119 192.168.0.2), or have built-in privacy protection (e.g. [RFC4941] 120 IPv6 addresses). 122 Note also that these concerns predate WebRTC; Adobe Flash Player has 123 provided similar functionality since the introduction of RTMFP in 124 2008. 126 3. Goals 128 Being peer-to-peer, WebRTC represents a privacy-enabling technology, 129 and therefore we want to avoid solutions that disable WebRTC or make 130 it harder to use. This means that WebRTC should be configured by 131 default to only reveal the minimum amount of information needed to 132 establish a performant WebRTC session, while providing options to 133 reveal additional information upon user consent, or further limit 134 this information if the user has specifically requested this. 135 Specifically, WebRTC should: 137 o Provide a privacy-friendly default behavior which strikes the 138 right balance between privacy and media performance for most users 139 and use cases. 141 o For users who care more about one versus the other, provide a 142 means to customize the experience. 144 4. Detailed Design 146 The main ideas for the design are the following: 148 o By default, WebRTC should follow the route for HTTP traffic, when 149 this is easy to determine (i.e. not considering proxies). This is 150 accomplished by binding local sockets to the wildcard addresses 151 (0.0.0.0 for IPv4, :: for IPv6), which allows the OS to route 152 WebRTC traffic the same way as normal HTTP traffic, and allows 153 only the 'typical' public addresses to be discovered. 155 o By default, support for host-host connections should be 156 maintained. Even when binding to the wildcard addresses, the 157 local IPv4 and IPv6 addresses of the interface used for outgoing 158 STUN traffic should still be surfaced as candidates; this is 159 necessary for certain peer-to-peer data channel apps to function 160 correctly. The appropriate addresses here can be discovered by 161 binding sockets to the wildcard addresses, connect()ing those 162 sockets to a public destination (e.g. "8.8.8.8"), and then reading 163 the bound local addresses via getsockname(). 165 o WebRTC incorporates an explicit permission grant for access to 166 local audio and video, which are typically much more sensitive 167 than the aforementioned IP address information. If the user has 168 consented to media access, this should also allow WebRTC to gather 169 all possible candidates and determine the absolute best route for 170 media traffic. 172 o Determining whether a web proxy is in use is a complex process, as 173 the answer can depend on the exact site or address being 174 contacted. Furthermore, web proxies that support UDP are not 175 widely deployed today. Therefore, the only way to ensure that 176 WebRTC traffic traverses a proxy is to force WebRTC to use ICE-TCP 177 or TURN-over-TCP, and always try to make the TCP connection 178 through the proxy, if one exists. Naturally, this will have 179 attendant costs on media quality and also proxy performance. 181 o RETURN [I-D.ietf-rtcweb-return] is a new proposal for explicit 182 proxying of WebRTC media traffic. When RETURN proxies are 183 deployed, media and STUN checks will go through the proxy, but 184 without the performance issues associated with sending through a 185 web proxy. 187 Based on these ideas, we define four modes of WebRTC behavior, 188 reflecting different privacy/media tradeoffs: 190 Mode 1 Enumerate all addresses: WebRTC will bind to all interfaces 191 individually and use them all to ping STUN servers or peers. 192 This will converge on the best media path, and is ideal when 193 media performance is the highest priority, but it discloses 194 the most information. As such, this should only be performed 195 when the user has explicitly given consent for local media 196 access, as indicated in design idea #3 above. 198 Mode 2 Default route + the single associated local address: By 199 binding solely to the wildcard address, media packets will 200 flow through the same route as normal HTTP traffic. In 201 addition, the associated private address is discovered 202 through getsockname, as mentioned above. This ensures that 203 direct connections can still be established even when local 204 media access is not granted, e.g. for data channel 205 applications. 207 Mode 3 Default route only: This is the the same as Mode 2, except 208 that the associated private address is not provided, which 209 may cause traffic to hairpin through NAT or fall back to the 210 application TURN server, with resulting quality implications. 212 Mode 4 Force TCP and proxy: This disables any use of UDP and forces 213 use of TCP to connect to the TURN server or peer. If a web 214 proxy server is configured, the TCP traffic will be sent 215 through the proxy, with resulting quality implications. 217 We recommend Mode 1 as the default behavior only if cam/mic 218 permission has been granted, or Mode 2 if this is not the case. 220 Users who prefer Mode 3 or 4 should be able to select a preference or 221 install an extension to force their browser to operate in the 222 specified mode. For example, Chrome users can install the WebRTC 223 Network Limiter extension for this configuration. 225 Note that when a RETURN proxy is configured for the interface 226 associated with the default route, Mode 2 and 3 will cause any 227 external media traffic to go through the RETURN proxy. This provides 228 an effective solution to the proxy concern mentioned in the problem 229 statement, but without the performance issues associated with Mode 4. 231 5. Application Guidance 233 The recommendations mentioned in this document may cause breakage to 234 certain WebRTC applications. In order to be robust in all scenarios, 235 applications should follow the following guidelines: 237 o Applications should deploy a TURN server with support for both UDP 238 and TCP connections to the server. This ensures that connectivity 239 can still be established, even when Mode 3 or 4 are in use. 241 o Applications can detect when they don't have access to the full 242 set of ICE candidates by checking for the presence of host 243 candidates. If no host candidates are present, Mode 3 or 4 above 244 is in use. 246 o Future versions of browsers may present an indicator to signify 247 that the page is using WebRTC to set up a peer-to-peer connection. 248 Applications should be careful to only use WebRTC in a fashion 249 that is consistent with user expectations. 251 6. Security Considerations 253 This document is entirely devoted to security considerations. 255 7. IANA Considerations 257 This document requires no actions from IANA. 259 8. Acknowledgements 261 Several people provided input into this document, including Harald 262 Alvestrand, Ted Hardie, Matthew Kaufmann, and Eric Rescorla. 264 9. Informative References 266 [I-D.ietf-rtcweb-return] 267 Schwartz, B. and J. Uberti, "Recursively Encapsulated TURN 268 (RETURN) for Connectivity and Privacy in WebRTC", draft- 269 ietf-rtcweb-return-01 (work in progress), January 2016. 271 [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G., 272 and E. Lear, "Address Allocation for Private Internets", 273 BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, 274 . 276 [RFC4941] Narten, T., Draves, R., and S. Krishnan, "Privacy 277 Extensions for Stateless Address Autoconfiguration in 278 IPv6", RFC 4941, DOI 10.17487/RFC4941, September 2007, 279 . 281 Appendix A. Change log 283 Changes in draft -00: 285 o Published as WG draft. 287 Authors' Addresses 289 Guo-wei Shieh 290 Google 291 747 6th St S 292 Kirkland, WA 98033 293 USA 295 Email: guoweis@google.com 297 Justin Uberti 298 Google 299 747 6th St S 300 Kirkland, WA 98033 301 USA 303 Email: justin@uberti.name