draft-ietf-rtcweb-ip-handling-03.txt   draft-ietf-rtcweb-ip-handling-04.txt 
Network Working Group J. Uberti Network Working Group J. Uberti
Internet-Draft G. Shieh Internet-Draft G. Shieh
Intended status: Standards Track Google Intended status: Standards Track Google
Expires: July 18, 2017 January 14, 2017 Expires: January 4, 2018 July 3, 2017
WebRTC IP Address Handling Requirements WebRTC IP Address Handling Requirements
draft-ietf-rtcweb-ip-handling-03 draft-ietf-rtcweb-ip-handling-04
Abstract Abstract
This document provides information and requirements for how IP This document provides information and requirements for how IP
addresses should be handled by WebRTC applications. addresses should be handled by WebRTC implementations.
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.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on July 18, 2017. This Internet-Draft will expire on January 4, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2017 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
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. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 2
3. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3. Problem Statement . . . . . . . . . . . . . . . . . . . . . . 2
4. Detailed Design . . . . . . . . . . . . . . . . . . . . . . . 4 4. Goals . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
5. Application Guidance . . . . . . . . . . . . . . . . . . . . 6 5. Detailed Design . . . . . . . . . . . . . . . . . . . . . . . 4
6. Security Considerations . . . . . . . . . . . . . . . . . . . 6 6. Application Guidance . . . . . . . . . . . . . . . . . . . . 6
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6 7. Security Considerations . . . . . . . . . . . . . . . . . . . 6
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 6 8. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 6
9. Informative References . . . . . . . . . . . . . . . . . . . 6 9. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 7
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 7
10.1. Normative References . . . . . . . . . . . . . . . . . . 7
10.2. Informative References . . . . . . . . . . . . . . . . . 7
Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 8 Appendix A. Change log . . . . . . . . . . . . . . . . . . . . . 8
Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 8 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 9
1. Introduction 1. Introduction
As a technology that supports peer-to-peer connections, WebRTC may One of WebRTC's key features is its support of peer-to-peer
send data over different network paths than the path used for HTTP connections. However, when establishing such a connection, which
traffic. This may allow a web application to learn additional involves connectivity tests using various IP addresses, WebRTC may
information about the user, which may be problematic in certain allow a web application to learn additional information about the
cases. This document summarizes the concerns, and makes user compared to an application that only uses the Hypertext Transfer
recommendations on how best to handle the tradeoff between privacy Protocol (HTTP) [RFC7230]. This may be problematic in certain cases.
and media performance. This document summarizes the concerns, and makes recommendations on
how WebRTC implementations should best handle the tradeoff between
privacy and media performance.
2. Problem Statement 2. Terminology
WebRTC enables real-time peer-to-peer communications by enumerating The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
network interfaces and discovering the best route through the ICE "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
[RFC5245]protocol. During the ICE process, the peers involved in a document are to be interpreted as described in [RFC2119].
session gather and exchange all the IP addresses they can discover,
so that the connectivity of each IP pair can be checked, and the best 3. Problem Statement
path chosen. The addresses that are gathered usually consist of an
endpoint's private physical/virtual addresses, and its public In order to establish a peer-to-peer connection, WebRTC
Internet addresses. implementations use Interactive Connectivity Establishment (ICE)
[RFC5245], which gathers and exchanges all the IP addresses it can
discover, using techniques like Session Traversal Utilities for NAT
(STUN) [RFC5389] and Traversal Using Relays around NAT (TURN)
[RFC5766], in order to check the connectivity of each local-address-
remote-address pair and select the best one. The addresses that are
gathered usually consist of an endpoint's private physical/virtual
addresses and its public 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 addresses, 1. If the client is behind a Network Address Translator (NAT), the
typically [RFC1918]addresses, can be learned. client's private IP addresses, 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
and the VPN and local OS support routing over multiple interfaces Virtual Private Network (VPN), and the VPN and local OS support
(i.e., a "split-tunnel" VPN), WebRTC will discover the public routing over multiple interfaces (i.e., a "split-tunnel" VPN),
address for the VPN as well as the ISP public address that the WebRTC will discover the public address for the VPN as well as
VPN runs over. the ISP public address that the VPN runs over.
3. If the client is behind a proxy (a client-configured "classical 3. If the client is behind a proxy (a client-configured "classical
application proxy", as defined in [RFC1919], Section 3), but application proxy", as defined in [RFC1919], Section 3), but
direct access to the Internet is also supported, WebRTC's STUN direct access to the Internet is also supported, WebRTC's STUN
[RFC5389]checks will bypass the proxy and reveal the public checks will bypass the proxy and reveal the public address of the
address of the client. 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 organization firewall policy if desired, coupled behavior through organization firewall policy if desired, coupled
with the fact that forcing WebRTC traffic through a proxy will have with the fact that forcing WebRTC traffic through a proxy will have
negative effects on both the proxy and on media quality. For negative effects on both the proxy and on media quality. For
situations where this is an important consideration, use of a RETURN situations where this is an important consideration, use of a RETURN
proxy, as described below, can be an effective solution. proxy, as 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. 192.168.0.2), or have built-in privacy protection (e.g. [RFC4941]
[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 provided similar functionality since the introduction of RTMFP
[RFC7016]in 2008. [RFC7016] in 2008.
3. Goals 4. 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.
Specifically, WebRTC should: Specifically, WebRTC should:
o Provide a privacy-friendly default behavior which strikes the o Provide a privacy-friendly default behavior which strikes the
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 5. Detailed Design
The key principles for the design are listed below: The key principles for the design are listed below:
1. By default, WebRTC should follow normal IP routing rules, to the 1. By default, WebRTC should follow normal IP routing rules, to the
extent that this is easy to determine (i.e., not considering extent that this is easy to determine (i.e., not considering
proxies). This can be accomplished by binding local sockets to proxies). This can be accomplished by binding local sockets to
the wildcard addresses (0.0.0.0 for IPv4, :: for IPv6), which the wildcard addresses (0.0.0.0 for IPv4, :: for IPv6), which
allows the OS to route WebRTC traffic the same way as it would allows the OS to route WebRTC traffic the same way as it would
HTTP traffic, and allows only the 'typical' public addresses to HTTP traffic, and allows only the 'typical' public addresses to
be discovered. be discovered.
2. By default, support for direct connections between hosts (i.e., 2. By default, support for direct connections between hosts (i.e.,
without traversing a NAT or relay server) should be maintained. without traversing a NAT or relay server) should be maintained.
To accomplish this, the local IPv4 and IPv6 addresses of the To accomplish this, the local IPv4 and IPv6 addresses of the
interface used for outgoing STUN traffic should still be surfaced interface used for outgoing STUN traffic should still be surfaced
as candidates, even when binding to the wildcard addresses as as candidates, even when binding to the wildcard addresses as
mentioned above. The appropriate addresses here can be mentioned above. The appropriate addresses here can be
discovered by the common trick of binding sockets to the wildcard discovered by the common trick of binding sockets to the wildcard
addresses, connect()ing those sockets to some well-known public addresses, connect()ing those sockets to some well-known public
IP address (one particular example being "8.8.8.8"), and then IP address, and then reading the bound local addresses via
reading the bound local addresses via getsockname(). This getsockname(). This approach requires no data exchange; it
approach requires no data exchange; it simply provides a simply provides a mechanism for applications to retrieve the
mechanism for applications to retrieve the desired information desired information from the kernel routing table.
from the kernel routing table.
3. Determining whether a web proxy is in use is a complex process, 3. Determining whether a web proxy is in use is a complex process,
as 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. As a result, when WebRTC is made to go widely deployed today. As a result, when WebRTC is made to go
through a proxy, it typically needs to use TCP, either ICE-TCP through a proxy, it typically needs to use TCP, either ICE-TCP
[RFC6544]or TURN-over-TCP [RFC5766]. Naturally, this has
[RFC6544] or TURN-over-TCP [RFC5766]. Naturally, this has
attendant costs on media quality as well as proxy performance, attendant costs on media quality as well as proxy performance,
and should be avoided where possible. and should be avoided where possible.
4. RETURN [I-D.ietf-rtcweb-return]is a proposal for explicit 4. RETURN [I-D.ietf-rtcweb-return] is a 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
typical web proxy. typical web proxy.
Based on these ideas, we define four specific modes of WebRTC Based on these ideas, we define four specific modes of WebRTC
behavior, reflecting different media quality/privacy tradeoffs: behavior, reflecting different media quality/privacy tradeoffs:
Mode 1: Enumerate all addresses: WebRTC MUST bind to all interfaces Mode 1: Enumerate all addresses: WebRTC MUST bind to all interfaces
individually and use them all to attempt communication with individually and use them all to attempt communication with
skipping to change at page 5, line 29 skipping to change at page 5, line 42
connections can still be established in this mode. connections can still be established in this mode.
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 MUST NOT be provided. that the associated private address MUST NOT be provided.
This may cause traffic to hairpin through a NAT, fall back This may cause traffic to hairpin through a NAT, fall back
to the application TURN server, or fail altogether, with to the application TURN server, or fail altogether, with
resulting quality implications. resulting quality implications.
Mode 4: Force proxy: This forces all WebRTC media traffic through a Mode 4: Force proxy: This forces all WebRTC media traffic through a
proxy, if one is configured. If the proxy does not support proxy, if one is configured. If the proxy does not support
UDP (as is the case for all HTTP and most SOCKS UDP (as is the case for all HTTP and most SOCKS [RFC1928]
[RFC1928]proxies), or the WebRTC implementation does not proxies), or the WebRTC implementation does not support UDP
support UDP proxying, the use of UDP will be disabled, and proxying, the use of UDP will be disabled, and TCP will be
TCP will be used to send and receive media through the used to send and receive media through the proxy. Use of
proxy. Use of TCP will result in reduced quality, in TCP will result in reduced quality, in addition to any
addition to any performance considerations associated with performance considerations associated with sending all
sending all WebRTC media through the proxy server. WebRTC media through the proxy server.
Mode 1 MUST only be used when user consent has been provided; this Mode 1 MUST only be used when user consent has been provided; this
thwarts the typical drive-by enumeration attacks. The details of thwarts the typical drive-by enumeration attacks. The details of
this consent are left to the implementation; one potential mechanism this consent are left to the implementation; one potential mechanism
is to tie this consent to getUserMedia consent. is to tie this consent to getUserMedia consent.
In cases where user consent has not been obtained, Mode 2 SHOULD be In cases where user consent has not been obtained, Mode 2 SHOULD be
used. This allows applications to still achieve direct connections used. This allows applications to still achieve direct connections
in many cases, even without consent (e.g., data channel in many cases, even without consent (e.g., data channel
applications). However, user agents MAY choose a stricter default applications). However, user agents MAY choose a stricter default
skipping to change at page 6, line 10 skipping to change at page 6, line 24
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. While the external media traffic to go through the RETURN proxy. While the
RETURN approach gives the best performance, a similar result can be RETURN approach gives the best performance, a similar result can be
achieved for non-RETURN proxies via an organization firewall policy achieved for non-RETURN proxies via an organization firewall policy
that only allows external WebRTC traffic to leave through the proxy that only allows external WebRTC traffic to leave through the proxy
(typically, over TCP). This provides a way to ensure the proxy is (typically, over TCP). This provides a way to ensure the proxy is
used for any external traffic, but avoids the performance issues of used for any external traffic, but avoids the performance issues of
Mode 4, where all media is forced through said proxy, for intra- Mode 4, where all media is forced through said proxy, for intra-
organization traffic. organization traffic.
5. Application Guidance 6. Application Guidance
The recommendations mentioned in this document may cause certain The recommendations mentioned in this document may cause certain
WebRTC applications to malfunction. In order to be robust in all WebRTC applications to malfunction. In order to be robust in all
scenarios, the following guidelines are provided for applications: scenarios, the following guidelines are provided for applications:
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. assuming the TURN server can be reached.
o Applications SHOULD detect when they don't have access to the full o Applications SHOULD 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; this knowledge can be useful for diagnostic purposes. is in use; this knowledge can be useful for diagnostic purposes.
o Future versions of browsers may present an indicator to signify 7. Security Considerations
that the page is using WebRTC to set up a peer-to-peer connection.
Applications MUST only use WebRTC in a fashion that is consistent
with user expectations.
6. Security Considerations
This document is entirely devoted to security considerations. This document is entirely devoted to security considerations.
7. IANA Considerations 8. IANA Considerations
This document requires no actions from IANA. This document requires no actions from IANA.
8. Acknowledgements 9. Acknowledgements
Several people provided input into this document, including Harald Several people provided input into this document, including Bernard
Alvestrand, Ted Hardie, Matthew Kaufmann, Eric Rescorla, Adam Roach, Aboba, Harald Alvestrand, Ted Hardie, Matthew Kaufmann, Eric
and Martin Thomson. Rescorla, Adam Roach, and Martin Thomson.
9. Informative References 10. References
10.1. Normative References
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997,
<http://www.rfc-editor.org/info/rfc2119>.
10.2. 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-02 (work in progress), March 2017.
[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>.
[RFC1919] Chatel, M., "Classical versus Transparent IP Proxies", [RFC1919] Chatel, M., "Classical versus Transparent IP Proxies",
RFC 1919, DOI 10.17487/RFC1919, March 1996, RFC 1919, DOI 10.17487/RFC1919, March 1996,
<http://www.rfc-editor.org/info/rfc1919>. <http://www.rfc-editor.org/info/rfc1919>.
skipping to change at page 8, line 5 skipping to change at page 8, line 25
[RFC6544] Rosenberg, J., Keranen, A., Lowekamp, B., and A. Roach, [RFC6544] Rosenberg, J., Keranen, A., Lowekamp, B., and A. Roach,
"TCP Candidates with Interactive Connectivity "TCP Candidates with Interactive Connectivity
Establishment (ICE)", RFC 6544, DOI 10.17487/RFC6544, Establishment (ICE)", RFC 6544, DOI 10.17487/RFC6544,
March 2012, <http://www.rfc-editor.org/info/rfc6544>. March 2012, <http://www.rfc-editor.org/info/rfc6544>.
[RFC7016] Thornburgh, M., "Adobe's Secure Real-Time Media Flow [RFC7016] Thornburgh, M., "Adobe's Secure Real-Time Media Flow
Protocol", RFC 7016, DOI 10.17487/RFC7016, November 2013, Protocol", RFC 7016, DOI 10.17487/RFC7016, November 2013,
<http://www.rfc-editor.org/info/rfc7016>. <http://www.rfc-editor.org/info/rfc7016>.
[RFC7230] Fielding, R., Ed. and J. Reschke, Ed., "Hypertext Transfer
Protocol (HTTP/1.1): Message Syntax and Routing",
RFC 7230, DOI 10.17487/RFC7230, June 2014,
<http://www.rfc-editor.org/info/rfc7230>.
Appendix A. Change log Appendix A. Change log
Changes in draft -04:
o Rewording and cleanup in abstract, intro, and problem statement.
o Added 2119 boilerplate.
o Fixed weird reference spacing.
o Expanded acronyms on first use.
o Removed 8.8.8.8 mention.
o Removed mention of future browser considerations.
Changes in draft -03: Changes in draft -03:
o Clarified when to use which modes. o Clarified when to use which modes.
o Use 2119 qualifiers to make normative statements. o Added 2119 qualifiers to make normative statements.
o Defined 'proxy'. o Defined 'proxy'.
o Mentioned split tunnels in problem statement. o Mentioned split tunnels in problem statement.
Changes in draft -02: Changes in draft -02:
o Recommendations -> Requirements o Recommendations -> Requirements
o Updated text regarding consent. o Updated text regarding consent.
 End of changes. 30 change blocks. 
72 lines changed or deleted 108 lines changed or added

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