draft-ietf-rtcweb-ip-handling-00.txt   draft-ietf-rtcweb-ip-handling-01.txt 
Network Working Group G. Shieh Network Working Group J. Uberti
Internet-Draft J. Uberti Internet-Draft G. Shieh
Intended status: Standards Track Google Intended status: Standards Track Google
Expires: September 21, 2016 March 20, 2016 Expires: September 21, 2016 March 20, 2016
WebRTC IP Address Handling Recommendations WebRTC IP Address Handling Recommendations
draft-ietf-rtcweb-ip-handling-00 draft-ietf-rtcweb-ip-handling-01
Abstract Abstract
This document provides best practices for how IP addresses should be This document provides best practices for how IP addresses should be
handled by WebRTC applications. handled by WebRTC applications.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
skipping to change at page 2, line 11 skipping to change at page 2, line 11
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
described in the Simplified BSD License. described in the Simplified BSD License.
Table of Contents Table of Contents
1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2
2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2 2. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2
3. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
4. Detailed Design . . . . . . . . . . . . . . . . . . . . . . . 4 4. Detailed Design . . . . . . . . . . . . . . . . . . . . . . . 4
5. Application Guidance . . . . . . . . . . . . . . . . . . . . 5 5. Application Guidance . . . . . . . . . . . . . . . . . . . . 6
6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 6. Security Considerations . . . . . . . . . . . . . . . . . . . 6
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6
9. Informative References . . . . . . . . . . . . . . . . . . . 6 9. Informative References . . . . . . . . . . . . . . . . . . . 7
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 7 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 7 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8
1. Introduction 1. Introduction
As a technology that supports peer-to-peer connections, WebRTC may As a technology that supports peer-to-peer connections, WebRTC may
send data over different network paths than the path used for HTTP send data over different network paths than the path used for HTTP
traffic. This may allow a web application to learn additional traffic. This may allow a web application to learn additional
information about the user, which may be problematic in certain information about the user, which may be problematic in certain
cases. This document summarizes the concerns, and makes cases. This document summarizes the concerns, and makes
recommendations on how best to handle the tradeoff between privacy recommendations on how best to handle the tradeoff between privacy
and media performance. and media performance.
2. Problem Statement 2. Problem Statement
WebRTC enables real-time peer-to-peer communications by enumerating WebRTC enables real-time peer-to-peer communications by enumerating
network interfaces and discovering the best route through the ICE network interfaces and discovering the best route through the ICE
protocol. During the ICE process, the peers involved in a session [RFC5245] protocol. During the ICE process, the peers involved in a
gather and exchange all the IP addresses they can discover, so that session gather and exchange all the IP addresses they can discover,
the connectivity of each IP pair can be checked, and the best path so that the connectivity of each IP pair can be checked, and the best
chosen. The addresses that are gathered usually consist of an path chosen. The addresses that are gathered usually consist of an
endpoint's private physical/virtual addresses, and its public endpoint's private physical/virtual addresses, and its public
Internet addresses. Internet addresses.
These addresses are exposed upwards to the web application, so that These addresses are exposed upwards to the web application, so that
they can be communicated to the remote endpoint. This allows the they can be communicated to the remote endpoint. This allows the
application to learn more about the local network configuration than application to learn more about the local network configuration than
it would from a typical HTTP scenario, in which the web server would it would from a typical HTTP scenario, in which the web server would
only see a single public Internet address, i.e. the address from only see a single public Internet address, i.e. the address from
which the HTTP request was sent. which the HTTP request was sent.
The information revealed falls into three categories: The information revealed falls into three categories:
(1) If the client is behind a NAT, the client's private IP 1. If the client is behind a NAT, the client's private IP addresses,
addresses, typically [RFC1918] addresses, can be learned. typically [RFC1918] addresses, can be learned.
(2) If the client tries to hide its physical location through a VPN, 2. If the client tries to hide its physical location through a VPN,
and the VPN and local OS supports routing over multiple and the VPN and local OS support routing over multiple
interfaces, WebRTC will discover the public address associated interfaces, WebRTC will discover the public address for the VPN
with both the VPN as well as the ISP public address over that as well as the ISP public address that the VPN runs over.
the VPN runs over.
(3) If the client is behind a proxy, but direct access to the 3. If the client is behind a proxy, but direct access to the
Internet is also supported, WebRTC's STUN checks will bypass the Internet is also supported, WebRTC's STUN [RFC5389] checks will
proxy and reveal the public address of the client. bypass the proxy and reveal the public address of the client.
Of these three concerns, #2 is the most significant concern, since Of these three concerns, #2 is the most significant concern, since
for some users, the purpose of using a VPN is for anonymity. for some users, the purpose of using a VPN is for anonymity.
However, different VPN users will have different needs, and some VPN However, different VPN users will have different needs, and some VPN
users (e.g. corporate VPN users) may in fact prefer WebRTC to send users (e.g. corporate VPN users) may in fact prefer WebRTC to send
media traffic directly, i.e. not through the VPN. media traffic directly, i.e. not through the VPN.
#3 is a less common concern, as proxy administrators can control this #3 is a less common concern, as proxy administrators can control this
behavior through local firewall policy if desired, coupled with the behavior through local firewall policy if desired, coupled with the
fact that forcing WebRTC traffic through a proxy will have negative fact that forcing WebRTC traffic through a proxy will have negative
effects on both the proxy and on media quality. For situations where effects on both the proxy and on media quality. For situations where
this is an important consideration, use of a RETURN proxy, as this is an important consideration, use of a RETURN proxy, as
described below, can be an effective solution. described below, can be an effective solution.
#1 is considered to be the least significant concern, given that the #1 is considered to be the least significant concern, given that the
local address values often contain minimal information (e.g. local address values often contain minimal information (e.g.
192.168.0.2), or have built-in privacy protection (e.g. [RFC4941] 192.168.0.2), or have built-in privacy protection (e.g. [RFC4941]
IPv6 addresses). IPv6 addresses).
Note also that these concerns predate WebRTC; Adobe Flash Player has Note also that these concerns predate WebRTC; Adobe Flash Player has
provided similar functionality since the introduction of RTMFP in provided similar functionality since the introduction of RTMFP
2008. [RFC7016] in 2008.
3. Goals 3. Goals
Being peer-to-peer, WebRTC represents a privacy-enabling technology, Being peer-to-peer, WebRTC represents a privacy-enabling technology,
and therefore we want to avoid solutions that disable WebRTC or make and therefore we want to avoid solutions that disable WebRTC or make
it harder to use. This means that WebRTC should be configured by it harder to use. This means that WebRTC should be configured by
default to only reveal the minimum amount of information needed to default to only reveal the minimum amount of information needed to
establish a performant WebRTC session, while providing options to establish a performant WebRTC session, while providing options to
reveal additional information upon user consent, or further limit reveal additional information upon user consent, or further limit
this information if the user has specifically requested this. this information if the user has specifically requested this.
skipping to change at page 4, line 12 skipping to change at page 4, line 9
right balance between privacy and media performance for most users right balance between privacy and media performance for most users
and use cases. and use cases.
o For users who care more about one versus the other, provide a o For users who care more about one versus the other, provide a
means to customize the experience. means to customize the experience.
4. Detailed Design 4. Detailed Design
The main ideas for the design are the following: The main ideas for the design are the following:
o By default, WebRTC should follow the route for HTTP traffic, when 1. By default, WebRTC should follow normal IP routing rules, to the
this is easy to determine (i.e. not considering proxies). This is extent that this is easy to determine (i.e., not considering
accomplished by binding local sockets to the wildcard addresses proxies). This can be accomplished by binding local sockets to
(0.0.0.0 for IPv4, :: for IPv6), which allows the OS to route the wildcard addresses (0.0.0.0 for IPv4, :: for IPv6), which
WebRTC traffic the same way as normal HTTP traffic, and allows allows the OS to route WebRTC traffic the same way as it would
only the 'typical' public addresses to be discovered. HTTP traffic, and allows only the 'typical' public addresses to
be discovered.
o By default, support for host-host connections should be 2. By default, support for direct connections between hosts (i.e.,
maintained. Even when binding to the wildcard addresses, the without traversing a NAT or relay server) should be maintained.
local IPv4 and IPv6 addresses of the interface used for outgoing To accomplish this, the local IPv4 and IPv6 addresses of the
STUN traffic should still be surfaced as candidates; this is interface used for outgoing STUN traffic should still be surfaced
necessary for certain peer-to-peer data channel apps to function as candidates, even when binding to the wildcard addresses as
correctly. The appropriate addresses here can be discovered by mentioned above. The appropriate addresses here can be
binding sockets to the wildcard addresses, connect()ing those discovered by the common trick of binding sockets to the wildcard
sockets to a public destination (e.g. "8.8.8.8"), and then reading addresses, connect()ing those sockets to some well-known public
the bound local addresses via getsockname(). IP address (one particular example being "8.8.8.8"), and then
reading the bound local addresses via getsockname(). This
approach requires no data exchange; it simply provides a
mechanism for applications to retrieve the desired information
from the kernel routing table.
o WebRTC incorporates an explicit permission grant for access to 3. When used with audio and video devices, WebRTC requires explicit
local audio and video, which are typically much more sensitive user permission to access those devices. We propose that this
than the aforementioned IP address information. If the user has permission grant be expanded to include consent to allow WebRTC
consented to media access, this should also allow WebRTC to gather to access all IP addresses associated with the user agent, for
all possible candidates and determine the absolute best route for the purpose of finding the absolute best route for media traffic.
media traffic. Combining these permission grants, rather than having the user
grant permission individually, is a considered balance; this
balance takes into account that the user has placed enough trust
into the application to allow it to access their devices, that
when doing so the user typically wants to engage in a
conversational session, which benefits most from an optimal
network path, and lastly, the fact that the underlying issue is
complex, and difficult to explain meaningfully to the user.
o Determining whether a web proxy is in use is a complex process, as 4. Determining whether a web proxy is in use is a complex process,
the answer can depend on the exact site or address being as the answer can depend on the exact site or address being
contacted. Furthermore, web proxies that support UDP are not contacted. Furthermore, web proxies that support UDP are not
widely deployed today. Therefore, the only way to ensure that widely deployed today. As a result, when WebRTC is made to go
WebRTC traffic traverses a proxy is to force WebRTC to use ICE-TCP through a proxy, it typically must use TCP, either ICE-TCP
or TURN-over-TCP, and always try to make the TCP connection [RFC6544] or TURN-over-TCP [RFC5766]. Naturally, this has
through the proxy, if one exists. Naturally, this will have attendant costs on media quality and also proxy performance.
attendant costs on media quality and also proxy performance.
o RETURN [I-D.ietf-rtcweb-return] is a new proposal for explicit 5. RETURN [I-D.ietf-rtcweb-return] is a new proposal for explicit
proxying of WebRTC media traffic. When RETURN proxies are proxying of WebRTC media traffic. When RETURN proxies are
deployed, media and STUN checks will go through the proxy, but deployed, media and STUN checks will go through the proxy, but
without the performance issues associated with sending through a without the performance issues associated with sending through a
web proxy. typical web proxy.
Based on these ideas, we define four modes of WebRTC behavior, Based on these ideas, we define four modes of WebRTC behavior,
reflecting different privacy/media tradeoffs: reflecting different privacy/media tradeoffs:
Mode 1 Enumerate all addresses: WebRTC will bind to all interfaces Mode 1: Enumerate all addresses: WebRTC will bind to all interfaces
individually and use them all to ping STUN servers or peers. individually and use them all to attempt communication with
This will converge on the best media path, and is ideal when STUN servers, TURN servers, or peers. This will converge on
media performance is the highest priority, but it discloses the best media path, and is ideal when media performance is
the most information. As such, this should only be performed the highest priority, but it discloses the most information.
when the user has explicitly given consent for local media As such, this should only be performed when the user has
access, as indicated in design idea #3 above. explicitly given consent for local media access, as
indicated in design idea #3 above.
Mode 2 Default route + the single associated local address: By Mode 2: Default route + the single associated local address: By
binding solely to the wildcard address, media packets will binding solely to the wildcard address, media packets will
flow through the same route as normal HTTP traffic. In follow the kernel routing table rules, which will typically
addition, the associated private address is discovered result in the same route as the application's HTTP traffic.
through getsockname, as mentioned above. This ensures that In addition, the associated private address will be
direct connections can still be established even when local discovered through getsockname, as mentioned above. This
media access is not granted, e.g. for data channel ensures that direct connections can still be established
applications. even when local media access is not granted, e.g., for data
channel applications.
Mode 3 Default route only: This is the the same as Mode 2, except Mode 3: Default route only: This is the the same as Mode 2, except
that the associated private address is not provided, which that the associated private address is not provided, which
may cause traffic to hairpin through NAT or fall back to the may cause traffic to hairpin through a NAT, fall back to the
application TURN server, with resulting quality implications. application TURN server, or fail altogether, with resulting
quality implications.
Mode 4 Force TCP and proxy: This disables any use of UDP and forces Mode 4: Force proxy: This forces all WebRTC media traffic through a
use of TCP to connect to the TURN server or peer. If a web proxy, if one is configured. If the proxy does not support
proxy server is configured, the TCP traffic will be sent UDP (as is the case for all HTTP and most SOCKS [RFC1928]
through the proxy, with resulting quality implications. proxies), or the WebRTC implementation does not support UDP
proxying, the use of UDP will be disabled, and TCP will be
used to send and receive media through the proxy. Use of
TCP will result in reduced quality, in addition to any
performance considerations associated with sending all
WebRTC media through the proxy server.
We recommend Mode 1 as the default behavior only if cam/mic We recommend Mode 1 as the default behavior only if cam/mic
permission has been granted, or Mode 2 if this is not the case. permission has been granted, or Mode 2 if this is not the case.
Users who prefer Mode 3 or 4 should be able to select a preference or Users who prefer Mode 3 or 4 should be able to select a preference or
install an extension to force their browser to operate in the install an extension to force their browser to operate in the
specified mode. For example, Chrome users can install the WebRTC specified mode.
Network Limiter extension for this configuration.
Note that when a RETURN proxy is configured for the interface Note that when a RETURN proxy is configured for the interface
associated with the default route, Mode 2 and 3 will cause any associated with the default route, Mode 2 and 3 will cause any
external media traffic to go through the RETURN proxy. This provides external media traffic to go through the RETURN proxy. This provides
an effective solution to the proxy concern mentioned in the problem a way to ensure the proxy is used for external traffic, but without
statement, but without the performance issues associated with Mode 4. the performance issues of forcing all media through said proxy.
5. Application Guidance 5. Application Guidance
The recommendations mentioned in this document may cause breakage to The recommendations mentioned in this document may cause certain
certain WebRTC applications. In order to be robust in all scenarios, WebRTC applications to malfunction. In order to be robust in all
applications should follow the following guidelines: scenarios, applications should follow the following guidelines:
o Applications should deploy a TURN server with support for both UDP o Applications should deploy a TURN server with support for both UDP
and TCP connections to the server. This ensures that connectivity and TCP connections to the server. This ensures that connectivity
can still be established, even when Mode 3 or 4 are in use. can still be established, even when Mode 3 or 4 are in use,
assuming the TURN server can be reached.
o Applications can detect when they don't have access to the full o Applications can detect when they don't have access to the full
set of ICE candidates by checking for the presence of host set of ICE candidates by checking for the presence of host
candidates. If no host candidates are present, Mode 3 or 4 above candidates. If no host candidates are present, Mode 3 or 4 above
is in use. is in use.
o Future versions of browsers may present an indicator to signify o Future versions of browsers may present an indicator to signify
that the page is using WebRTC to set up a peer-to-peer connection. that the page is using WebRTC to set up a peer-to-peer connection.
Applications should be careful to only use WebRTC in a fashion Applications should be careful to only use WebRTC in a fashion
that is consistent with user expectations. that is consistent with user expectations.
skipping to change at page 6, line 30 skipping to change at page 6, line 47
This document is entirely devoted to security considerations. This document is entirely devoted to security considerations.
7. IANA Considerations 7. IANA Considerations
This document requires no actions from IANA. This document requires no actions from IANA.
8. Acknowledgements 8. Acknowledgements
Several people provided input into this document, including Harald Several people provided input into this document, including Harald
Alvestrand, Ted Hardie, Matthew Kaufmann, and Eric Rescorla. Alvestrand, Ted Hardie, Matthew Kaufmann, Eric Rescorla, and Adam
Roach.
9. Informative References 9. Informative References
[I-D.ietf-rtcweb-return] [I-D.ietf-rtcweb-return]
Schwartz, B. and J. Uberti, "Recursively Encapsulated TURN Schwartz, B. and J. Uberti, "Recursively Encapsulated TURN
(RETURN) for Connectivity and Privacy in WebRTC", draft- (RETURN) for Connectivity and Privacy in WebRTC", draft-
ietf-rtcweb-return-01 (work in progress), January 2016. ietf-rtcweb-return-01 (work in progress), January 2016.
[RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G., [RFC1918] Rekhter, Y., Moskowitz, B., Karrenberg, D., de Groot, G.,
and E. Lear, "Address Allocation for Private Internets", and E. Lear, "Address Allocation for Private Internets",
BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996, BCP 5, RFC 1918, DOI 10.17487/RFC1918, February 1996,
<http://www.rfc-editor.org/info/rfc1918>. <http://www.rfc-editor.org/info/rfc1918>.
[RFC1928] Leech, M., Ganis, M., Lee, Y., Kuris, R., Koblas, D., and
L. Jones, "SOCKS Protocol Version 5", RFC 1928,
DOI 10.17487/RFC1928, March 1996,
<http://www.rfc-editor.org/info/rfc1928>.
[RFC4941] Narten, T., Draves, R., and S. Krishnan, "Privacy [RFC4941] Narten, T., Draves, R., and S. Krishnan, "Privacy
Extensions for Stateless Address Autoconfiguration in Extensions for Stateless Address Autoconfiguration in
IPv6", RFC 4941, DOI 10.17487/RFC4941, September 2007, IPv6", RFC 4941, DOI 10.17487/RFC4941, September 2007,
<http://www.rfc-editor.org/info/rfc4941>. <http://www.rfc-editor.org/info/rfc4941>.
[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment
(ICE): A Protocol for Network Address Translator (NAT)
Traversal for Offer/Answer Protocols", RFC 5245,
DOI 10.17487/RFC5245, April 2010,
<http://www.rfc-editor.org/info/rfc5245>.
[RFC5389] Rosenberg, J., Mahy, R., Matthews, P., and D. Wing,
"Session Traversal Utilities for NAT (STUN)", RFC 5389,
DOI 10.17487/RFC5389, October 2008,
<http://www.rfc-editor.org/info/rfc5389>.
[RFC5766] Mahy, R., Matthews, P., and J. Rosenberg, "Traversal Using
Relays around NAT (TURN): Relay Extensions to Session
Traversal Utilities for NAT (STUN)", RFC 5766,
DOI 10.17487/RFC5766, April 2010,
<http://www.rfc-editor.org/info/rfc5766>.
[RFC6544] Rosenberg, J., Keranen, A., Lowekamp, B., and A. Roach,
"TCP Candidates with Interactive Connectivity
Establishment (ICE)", RFC 6544, DOI 10.17487/RFC6544,
March 2012, <http://www.rfc-editor.org/info/rfc6544>.
[RFC7016] Thornburgh, M., "Adobe's Secure Real-Time Media Flow
Protocol", RFC 7016, DOI 10.17487/RFC7016, November 2013,
<http://www.rfc-editor.org/info/rfc7016>.
Appendix A. Change log Appendix A. Change log
Changes in draft -01:
o Incorporated feedback from Adam Roach; changes to discussion of
cam/mic permission, as well as use of proxies, and various
editorial changes.
o Added several more references.
Changes in draft -00: Changes in draft -00:
o Published as WG draft. o Published as WG draft.
Authors' Addresses Authors' Addresses
Guo-wei Shieh Justin Uberti
Google Google
747 6th St S 747 6th St S
Kirkland, WA 98033 Kirkland, WA 98033
USA USA
Email: guoweis@google.com Email: justin@uberti.name
Justin Uberti Guo-wei Shieh
Google Google
747 6th St S 747 6th St S
Kirkland, WA 98033 Kirkland, WA 98033
USA USA
Email: justin@uberti.name Email: guoweis@google.com
 End of changes. 30 change blocks. 
92 lines changed or deleted 150 lines changed or added

This html diff was produced by rfcdiff 1.44. The latest version is available from http://tools.ietf.org/tools/rfcdiff/