draft-ietf-rtcweb-security-arch-06.txt   draft-ietf-rtcweb-security-arch-07.txt 
RTCWEB E. Rescorla RTCWEB E. Rescorla
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Intended status: Standards Track January 22, 2013 Intended status: Standards Track July 14, 2013
Expires: July 26, 2013 Expires: January 15, 2014
RTCWEB Security Architecture WebRTC Security Architecture
draft-ietf-rtcweb-security-arch-06 draft-ietf-rtcweb-security-arch-07
Abstract Abstract
The Real-Time Communications on the Web (RTCWEB) working group is The Real-Time Communications on the Web (RTCWEB) working group is
tasked with standardizing protocols for enabling real-time tasked with standardizing protocols for enabling real-time
communications within user-agents using web technologies (e.g communications within user-agents using web technologies (commonly
JavaScript). The major use cases for RTCWEB technology are real-time called "WebRTC"). This document defines the security architecture
audio and/or video calls, Web conferencing, and direct data transfer. for
Unlike most conventional real-time systems (e.g., SIP-based soft
phones) RTCWEB communications are directly controlled by some Web
server, which poses new security challenges. For instance, a Web
browser might expose a JavaScript API which allows a server to place
a video call. Unrestricted access to such an API would allow any
site which a user visited to "bug" a user's computer, capturing any
activity which passed in front of their camera. [I-D.ietf-rtcweb-
security] defines the RTCWEB threat model. This document defines an
architecture which provides security within that threat model.
Legal Legal
THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN ARE PROVIDED ON THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN ARE PROVIDED ON
AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE
REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE
IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE, DISCLAIM ALL IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE, DISCLAIM ALL
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY
WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE
ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS
skipping to change at page 2, line 8 skipping to change at page 1, line 45
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 26, 2013. This Internet-Draft will expire on January 15, 2014.
Copyright Notice Copyright Notice
Copyright (c) 2013 IETF Trust and the persons identified as the Copyright (c) 2013 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
skipping to change at page 3, line 25 skipping to change at page 3, line 25
4.3. DTLS Handshake . . . . . . . . . . . . . . . . . . . . . . 13 4.3. DTLS Handshake . . . . . . . . . . . . . . . . . . . . . . 13
4.4. Communications and Consent Freshness . . . . . . . . . . . 13 4.4. Communications and Consent Freshness . . . . . . . . . . . 13
5. Detailed Technical Description . . . . . . . . . . . . . . . . 14 5. Detailed Technical Description . . . . . . . . . . . . . . . . 14
5.1. Origin and Web Security Issues . . . . . . . . . . . . . . 14 5.1. Origin and Web Security Issues . . . . . . . . . . . . . . 14
5.2. Device Permissions Model . . . . . . . . . . . . . . . . . 14 5.2. Device Permissions Model . . . . . . . . . . . . . . . . . 14
5.3. Communications Consent . . . . . . . . . . . . . . . . . . 16 5.3. Communications Consent . . . . . . . . . . . . . . . . . . 16
5.4. IP Location Privacy . . . . . . . . . . . . . . . . . . . 17 5.4. IP Location Privacy . . . . . . . . . . . . . . . . . . . 17
5.5. Communications Security . . . . . . . . . . . . . . . . . 18 5.5. Communications Security . . . . . . . . . . . . . . . . . 18
5.6. Web-Based Peer Authentication . . . . . . . . . . . . . . 19 5.6. Web-Based Peer Authentication . . . . . . . . . . . . . . 19
5.6.1. Trust Relationships: IdPs, APs, and RPs . . . . . . . 20 5.6.1. Trust Relationships: IdPs, APs, and RPs . . . . . . . 20
5.6.2. Overview of Operation . . . . . . . . . . . . . . . . 21 5.6.2. Overview of Operation . . . . . . . . . . . . . . . . 22
5.6.3. Items for Standardization . . . . . . . . . . . . . . 23 5.6.3. Items for Standardization . . . . . . . . . . . . . . 23
5.6.4. Binding Identity Assertions to JSEP Offer/Answer 5.6.4. Binding Identity Assertions to JSEP Offer/Answer
Transactions . . . . . . . . . . . . . . . . . . . . . 23 Transactions . . . . . . . . . . . . . . . . . . . . . 23
5.6.4.1. Input to Assertion Generation Process . . . . . . 23 5.6.4.1. Input to Assertion Generation Process . . . . . . 23
5.6.4.2. Carrying Identity Assertions . . . . . . . . . . . 24 5.6.4.2. Carrying Identity Assertions . . . . . . . . . . . 24
5.6.5. IdP Interaction Details . . . . . . . . . . . . . . . 24 5.6.5. IdP Interaction Details . . . . . . . . . . . . . . . 25
5.6.5.1. General Message Structure . . . . . . . . . . . . 24 5.6.5.1. General Message Structure . . . . . . . . . . . . 25
5.6.5.2. IdP Proxy Setup . . . . . . . . . . . . . . . . . 25 5.6.5.2. IdP Proxy Setup . . . . . . . . . . . . . . . . . 26
5.7. Security Considerations . . . . . . . . . . . . . . . . . 30 5.7. Security Considerations . . . . . . . . . . . . . . . . . 30
5.7.1. Communications Security . . . . . . . . . . . . . . . 30 5.7.1. Communications Security . . . . . . . . . . . . . . . 30
5.7.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . 31 5.7.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . 31
5.7.3. Denial of Service . . . . . . . . . . . . . . . . . . 32 5.7.3. Denial of Service . . . . . . . . . . . . . . . . . . 32
5.7.4. IdP Authentication Mechanism . . . . . . . . . . . . . 33 5.7.4. IdP Authentication Mechanism . . . . . . . . . . . . . 33
5.7.4.1. PeerConnection Origin Check . . . . . . . . . . . 33 5.7.4.1. PeerConnection Origin Check . . . . . . . . . . . 33
5.7.4.2. IdP Well-known URI . . . . . . . . . . . . . . . . 34 5.7.4.2. IdP Well-known URI . . . . . . . . . . . . . . . . 34
5.7.4.3. Privacy of IdP-generated identities and the 5.7.4.3. Privacy of IdP-generated identities and the
hosting site . . . . . . . . . . . . . . . . . . . 34 hosting site . . . . . . . . . . . . . . . . . . . 34
5.7.4.4. Security of Third-Party IdPs . . . . . . . . . . . 34 5.7.4.4. Security of Third-Party IdPs . . . . . . . . . . . 35
5.7.4.5. Web Security Feature Interactions . . . . . . . . 35 5.7.4.5. Web Security Feature Interactions . . . . . . . . 35
6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 35 5.8. IANA Considerations . . . . . . . . . . . . . . . . . . . 35
7. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 36
7.1. Changes since -05 . . . . . . . . . . . . . . . . . . . . 36 7. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
7.2. Changes since -03 . . . . . . . . . . . . . . . . . . . . 36 7.1. Changes since -06 . . . . . . . . . . . . . . . . . . . . 36
7.2. Changes since -05 . . . . . . . . . . . . . . . . . . . . 36
7.3. Changes since -03 . . . . . . . . . . . . . . . . . . . . 36 7.3. Changes since -03 . . . . . . . . . . . . . . . . . . . . 36
7.4. Changes since -02 . . . . . . . . . . . . . . . . . . . . 36 7.4. Changes since -03 . . . . . . . . . . . . . . . . . . . . 36
8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.5. Changes since -02 . . . . . . . . . . . . . . . . . . . . 37
8.1. Normative References . . . . . . . . . . . . . . . . . . . 36
8.2. Informative References . . . . . . . . . . . . . . . . . . 37 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Appendix A. Example IdP Bindings to Specific Protocols . . . . . 38 8.1. Normative References . . . . . . . . . . . . . . . . . . . 37
A.1. BrowserID . . . . . . . . . . . . . . . . . . . . . . . . 38 8.2. Informative References . . . . . . . . . . . . . . . . . . 38
A.2. OAuth . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Appendix A. Example IdP Bindings to Specific Protocols . . . . . 39
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 42 A.1. BrowserID . . . . . . . . . . . . . . . . . . . . . . . . 39
A.2. OAuth . . . . . . . . . . . . . . . . . . . . . . . . . . 42
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 43
1. Introduction 1. Introduction
The Real-Time Communications on the Web (RTCWEB) working group is The Real-Time Communications on the Web (WebRTC) working group is
tasked with standardizing protocols for real-time communications tasked with standardizing protocols for real-time communications
between Web browsers. The major use cases for RTCWEB technology are between Web browsers. The major use cases for WebRTC technology are
real-time audio and/or video calls, Web conferencing, and direct data real-time audio and/or video calls, Web conferencing, and direct data
transfer. Unlike most conventional real-time systems, (e.g., SIP- transfer. Unlike most conventional real-time systems, (e.g., SIP-
based[RFC3261] soft phones) RTCWEB communications are directly based[RFC3261] soft phones) WebRTC communications are directly
controlled by some Web server, as shown in Figure 1. controlled by some Web server, via a JavaScript (JS) API as shown in
Figure 1.
+----------------+ +----------------+
| | | |
| Web Server | | Web Server |
| | | |
+----------------+ +----------------+
^ ^ ^ ^
/ \ / \
HTTP / \ HTTP HTTP / \ HTTP
/ \ / \
/ \ / \
v v v v
JS API JS API JS API JS API
+-----------+ +-----------+ +-----------+ +-----------+
| | Media | | | | Media | |
| Browser |<---------->| Browser | | Browser |<---------->| Browser |
| | | | | | | |
+-----------+ +-----------+ +-----------+ +-----------+
Figure 1: A simple RTCWEB system Figure 1: A simple WebRTC system
A more complicated system might allow for interdomain calling, as A more complicated system might allow for interdomain calling, as
shown in Figure 2. The protocol to be used between the domains is shown in Figure 2. The protocol to be used between the domains is
not standardized by RTCWEB, but given the installed base and the form not standardized by WebRTC, but given the installed base and the form
of the RTCWEB API is likely to be something SDP-based like SIP or of the WebRTC API is likely to be something SDP-based like SIP.
XMPP.
+--------------+ +--------------+ +--------------+ +--------------+
| | SIP,XMPP,...| | | | SIP,XMPP,...| |
| Web Server |<----------->| Web Server | | Web Server |<----------->| Web Server |
| | | | | | | |
+--------------+ +--------------+ +--------------+ +--------------+
^ ^ ^ ^
| | | |
HTTP | | HTTP HTTP | | HTTP
| | | |
v v v v
JS API JS API JS API JS API
+-----------+ +-----------+ +-----------+ +-----------+
| | Media | | | | Media | |
| Browser |<---------------->| Browser | | Browser |<---------------->| Browser |
| | | | | | | |
+-----------+ +-----------+ +-----------+ +-----------+
Figure 2: A multidomain RTCWEB system Figure 2: A multidomain WebRTC system
This system presents a number of new security challenges, which are This system presents a number of new security challenges, which are
analyzed in [I-D.ietf-rtcweb-security]. This document describes a analyzed in [I-D.ietf-rtcweb-security]. This document describes a
security architecture for RTCWEB which addresses the threats and security architecture for WebRTC which addresses the threats and
requirements described in that document. requirements described in that document.
2. Terminology 2. Terminology
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in RFC 2119 [RFC2119]. document are to be interpreted as described in RFC 2119 [RFC2119].
3. Trust Model 3. Trust Model
skipping to change at page 7, line 6 skipping to change at page 7, line 6
guarantees are possible. Note that there are cases (e.g., Internet guarantees are possible. Note that there are cases (e.g., Internet
kiosks) where the user can't really trust the browser that much. In kiosks) where the user can't really trust the browser that much. In
these cases, the level of security provided is limited by how much these cases, the level of security provided is limited by how much
they trust the browser. they trust the browser.
Optimally, we would not rely on trust in any entities other than the Optimally, we would not rely on trust in any entities other than the
browser. However, this is unfortunately not possible if we wish to browser. However, this is unfortunately not possible if we wish to
have a functional system. Other network elements fall into two have a functional system. Other network elements fall into two
categories: those which can be authenticated by the browser and thus categories: those which can be authenticated by the browser and thus
are partly trusted--though to the minimum extent necessary--and those are partly trusted--though to the minimum extent necessary--and those
which cannot be authenticated and thus are untrusted. This is a which cannot be authenticated and thus are untrusted.
natural extension of the end-to-end principle.
3.1. Authenticated Entities 3.1. Authenticated Entities
There are two major classes of authenticated entities in the system: There are two major classes of authenticated entities in the system:
o Calling services: Web sites whose origin we can verify (optimally o Calling services: Web sites whose origin we can verify (optimally
via HTTPS, but in some cases because we are on a topologically via HTTPS, but in some cases because we are on a topologically
restricted network, such as behind a firewall). restricted network, such as behind a firewall, and can infer
o Other users: RTCWEB peers whose origin we can verify authentication from firewall behavior).
o Other users: WebRTC peers whose origin we can verify
cryptographically (optimally via DTLS-SRTP). cryptographically (optimally via DTLS-SRTP).
Note that merely being authenticated does not make these entities Note that merely being authenticated does not make these entities
trusted. For instance, just because we can verify that trusted. For instance, just because we can verify that
https://www.evil.org/ is owned by Dr. Evil does not mean that we can https://www.evil.org/ is owned by Dr. Evil does not mean that we can
trust Dr. Evil to access our camera and microphone. However, it trust Dr. Evil to access our camera and microphone. However, it
gives the user an opportunity to determine whether he wishes to trust gives the user an opportunity to determine whether he wishes to trust
Dr. Evil or not; after all, if he desires to contact Dr. Evil Dr. Evil or not; after all, if he desires to contact Dr. Evil
(perhaps to arrange for ransom payment), it's safe to temporarily (perhaps to arrange for ransom payment), it's safe to temporarily
give him access to the camera and microphone for the purpose of the give him access to the camera and microphone for the purpose of the
call, but he doesn't want Dr. Evil to be able to access his camera call, but he doesn't want Dr. Evil to be able to access his camera
and microphone other than during the call. The point here is that we and microphone other than during the call. The point here is that we
must first identify other elements before we can determine whether must first identify other elements before we can determine whether
and how much to trust them. and how much to trust them. Additionally, sometimes we need to
identify the communicating peer before we know what policies to
apply.
It's also worth noting that there are settings where authentication It's also worth noting that there are settings where authentication
is non-cryptographic, such as other machines behind a firewall. is non-cryptographic, such as other machines behind a firewall.
Naturally, the level of trust one can have in identities verified in Naturally, the level of trust one can have in identities verified in
this way depends on how strong the topology enforcement is. this way depends on how strong the topology enforcement is.
3.2. Unauthenticated Entities 3.2. Unauthenticated Entities
Other than the above entities, we are not generally able to identify Other than the above entities, we are not generally able to identify
other network elements, thus we cannot trust them. This does not other network elements, thus we cannot trust them. This does not
skipping to change at page 8, line 23 skipping to change at page 8, line 25
For the purposes of this example, we assume the topology shown in the For the purposes of this example, we assume the topology shown in the
figures below. This topology is derived from the topology shown in figures below. This topology is derived from the topology shown in
Figure 1, but separates Alice and Bob's identities from the process Figure 1, but separates Alice and Bob's identities from the process
of signaling. Specifically, Alice and Bob have relationships with of signaling. Specifically, Alice and Bob have relationships with
some Identity Provider (IdP) that supports a protocol such as OpenID some Identity Provider (IdP) that supports a protocol such as OpenID
or BrowserID) that can be used to demonstrate their identity to other or BrowserID) that can be used to demonstrate their identity to other
parties. For instance, Alice might have an account with a social parties. For instance, Alice might have an account with a social
network which she can then use to authenticate to other web sites network which she can then use to authenticate to other web sites
without explicitly having an account with those sites; this is a without explicitly having an account with those sites; this is a
fairly conventional pattern on the Web. Section 5.6.1 provides an fairly conventional pattern on the Web. Section 5.6.1 provides an
overview of Identity Providers and the relevant terminology. overview of Identity Providers and the relevant terminology. Alice
and Bob might have relationships with different IdPs as well.
This separation of identity provision and signaling isn't This separation of identity provision and signaling isn't
particularly important in "closed world" cases where Alice and Bob particularly important in "closed world" cases where Alice and Bob
are users on the same social network and have identities based on are users on the same social network and have identities based on
that domain (Figure 3) However, there are important settings where that domain (Figure 3) However, there are important settings where
that is not the case, such as federation (calls from one domain to that is not the case, such as federation (calls from one domain to
another; Figure 4) and calling on untrusted sites, such as where two another; Figure 4) and calling on untrusted sites, such as where two
users who have a relationship via a given social network want to call users who have a relationship via a given social network want to call
each other on another, untrusted, site, such as a poker site. each other on another, untrusted, site, such as a poker site.
Note that the servers themselves are also authenticated by an Note that the servers themselves are also authenticated by an
external identity service, the SSL/TLS certificate infrastructure external identity service, the SSL/TLS certificate infrastructure
(not shown). As is conventional in the Web, all identities are (not shown). As is conventional in the Web, all identities are
ultimately rooted that system. For instance, when an IdP makes an ultimately rooted in that system. For instance, when an IdP makes an
identity assertion, the Relying Party consuming that assertion is identity assertion, the Relying Party consuming that assertion is
able to verify because it is able to connect to the IdP via HTTPS. able to verify because it is able to connect to the IdP via HTTPS.
+----------------+ +----------------+
| | | |
| Signaling | | Signaling |
| Server | | Server |
| | | |
+----------------+ +----------------+
^ ^ ^ ^
/ \ / \
HTTPS / \ HTTPS HTTPS / \ HTTPS
/ \ / \
/ \ / \
v v v v
JS API JS API JS API JS API
+-----------+ +-----------+ +-----------+ +-----------+
| | Media | | | | Media | |
Alice | Browser |<---------->| Browser | Bob Alice | Browser |<---------->| Browser | Bob
| | (DTLS-SRTP)| | | | (DTLS+SRTP)| |
+-----------+ +-----------+ +-----------+ +-----------+
^ ^--+ +--^ ^ ^ ^--+ +--^ ^
| | | | | | | |
v | | v v | | v
+-----------+ | | +-----------+ +-----------+ | | +-----------+
| |<--------+ | | | |<--------+ | |
| IdP | | | IdP | | IdP1 | | | IdP2 |
| | +------->| | | | +------->| |
+-----------+ +-----------+ +-----------+ +-----------+
Figure 3: A call with IdP-based identity Figure 3: A call with IdP-based identity
Figure 4 shows essentially the same calling scenario but with a call Figure 4 shows essentially the same calling scenario but with a call
between two separate domains (i.e., a federated case). As mentioned between two separate domains (i.e., a federated case), as in
above, the domains communicate by some unspecified protocol and Figure 2. As mentioned above, the domains communicate by some
providing separate signaling and identity allows for calls to be unspecified protocol and providing separate signaling and identity
authenticated regardless of the details of the inter-domain protocol. allows for calls to be authenticated regardless of the details of the
inter-domain protocol.
+----------------+ Unspecified +----------------+ +----------------+ Unspecified +----------------+
| | protocol | | | | protocol | |
| Signaling |<----------------->| Signaling | | Signaling |<----------------->| Signaling |
| Server | (SIP, XMPP, ...) | Server | | Server | (SIP, XMPP, ...) | Server |
| | | | | | | |
+----------------+ +----------------+ +----------------+ +----------------+
^ ^ ^ ^
| | | |
HTTPS | | HTTPS HTTPS | | HTTPS
| | | |
| | | |
v v v v
JS API JS API JS API JS API
+-----------+ +-----------+ +-----------+ +-----------+
| | Media | | | | Media | |
Alice | Browser |<--------------------------->| Browser | Bob Alice | Browser |<--------------------------->| Browser | Bob
| | DTLS-SRTP | | | | DTLS+SRTP | |
+-----------+ +-----------+ +-----------+ +-----------+
^ ^--+ +--^ ^ ^ ^--+ +--^ ^
| | | | | | | |
v | | v v | | v
+-----------+ | | +-----------+ +-----------+ | | +-----------+
| |<-------------------------+ | | | |<-------------------------+ | |
| IdP | | | IdP | | IdP1 | | | IdP2 |
| | +------------------------>| | | | +------------------------>| |
+-----------+ +-----------+ +-----------+ +-----------+
Figure 4: A federated call with IdP-based identity Figure 4: A federated call with IdP-based identity
4.1. Initial Signaling 4.1. Initial Signaling
For simplicity, assume the topology in Figure 3. Alice and Bob are For simplicity, assume the topology in Figure 3. Alice and Bob are
both users of a common calling service; they both have approved the both users of a common calling service; they both have approved the
calling service to make calls (we defer the discussion of device calling service to make calls (we defer the discussion of device
skipping to change at page 11, line 11 skipping to change at page 11, line 11
Alice is logged onto the calling service and decides to call Bob. She Alice is logged onto the calling service and decides to call Bob. She
can see from the calling service that he is online and the calling can see from the calling service that he is online and the calling
service presents a JS UI in the form of a button next to Bob's name service presents a JS UI in the form of a button next to Bob's name
which says "Call". Alice clicks the button, which initiates a JS which says "Call". Alice clicks the button, which initiates a JS
callback that instantiates a PeerConnection object. This does not callback that instantiates a PeerConnection object. This does not
require a security check: JS from any origin is allowed to get this require a security check: JS from any origin is allowed to get this
far. far.
Once the PeerConnection is created, the calling service JS needs to Once the PeerConnection is created, the calling service JS needs to
set up some media. Because this is an audio/video call, it creates set up some media. Because this is an audio/video call, it creates a
two MediaStreams, one connected to an audio input and one connected MediaStream with two MediaStreamTracks, one connected to an audio
to a video input. At this point the first security check is input and one connected to a video input. At this point the first
required: untrusted origins are not allowed to access the camera and security check is required: untrusted origins are not allowed to
microphone. In this case, because Alice is a long-term user of the access the camera and microphone, so the browser prompts Alice for
calling service, she has made a permissions grant (i.e., a setting in permission.
the browser) to allow the calling service to access her camera and
microphone any time it wants. The browser checks this setting when
the camera and microphone requests are made and thus allows them.
In the current W3C API, once some streams have been added, Alice's In the current W3C API, once some streams have been added, Alice's
browser + JS generates a signaling message [I-D.ietf-rtcweb-jsep] browser + JS generates a signaling message [I-D.ietf-rtcweb-jsep]
containing: containing:
o Media channel information o Media channel information
o ICE candidates o Interactive Connectivity Establishment (ICE) [RFC5245] candidates
o A fingerprint attribute binding the communication to a key pair o A fingerprint attribute binding the communication to a key pair
[RFC5763]. Note that this key may simply be ephemerally generated [RFC5763]. Note that this key may simply be ephemerally generated
for this call or specific to this domain, and Alice may have a for this call or specific to this domain, and Alice may have a
large number of such keys. large number of such keys.
Prior to sending out the signaling message, the PeerConnection code Prior to sending out the signaling message, the PeerConnection code
contacts the identity service and obtains an assertion binding contacts the identity service and obtains an assertion binding
Alice's identity to her fingerprint. The exact details depend on the Alice's identity to her fingerprint. The exact details depend on the
identity service (though as discussed in Section 5.6 PeerConnection identity service (though as discussed in Section 5.6 PeerConnection
can be agnostic to them), but for now it's easiest to think of as a can be agnostic to them), but for now it's easiest to think of as a
BrowserID assertion. The assertion may bind other information to the BrowserID assertion. The assertion may bind other information to the
identity besides the fingerprint, but at minimum it needs to bind the identity besides the fingerprint, but at minimum it needs to bind the
fingerprint. fingerprint.
This message is sent to the signaling server, e.g., by XMLHttpRequest This message is sent to the signaling server, e.g., by XMLHttpRequest
[XmlHttpRequest] or by WebSockets [RFC6455] The signaling server [XmlHttpRequest] or by WebSockets [RFC6455]. preferably over TLS
processes the message from Alice's browser, determines that this is a [RFC5246]. The signaling server processes the message from Alice's
call to Bob and sends a signaling message to Bob's browser (again, browser, determines that this is a call to Bob and sends a signaling
the format is currently undefined). The JS on Bob's browser message to Bob's browser (again, the format is currently undefined).
processes it, and alerts Bob to the incoming call and to Alice's The JS on Bob's browser processes it, and alerts Bob to the incoming
identity. In this case, Alice has provided an identity assertion and call and to Alice's identity. In this case, Alice has provided an
so Bob's browser contacts Alice's identity provider (again, this is identity assertion and so Bob's browser contacts Alice's identity
done in a generic way so the browser has no specific knowledge of the provider (again, this is done in a generic way so the browser has no
IdP) to verify the assertion. This allows the browser to display a specific knowledge of the IdP) to verify the assertion. This allows
trusted element in the browser chrome indicating that a call is the browser to display a trusted element in the browser chrome
coming in from Alice. If Alice is in Bob's address book, then this indicating that a call is coming in from Alice. If Alice is in Bob's
interface might also include her real name, a picture, etc. The address book, then this interface might also include her real name, a
calling site will also provide some user interface element (e.g., a picture, etc. The calling site will also provide some user interface
button) to allow Bob to answer the call, though this is most likely element (e.g., a button) to allow Bob to answer the call, though this
not part of the trusted UI. is most likely not part of the trusted UI.
If Bob agrees [I am ignoring early media for now], a PeerConnection If Bob agrees a PeerConnection is instantiated with the message from
is instantiated with the message from Alice's side. Then, a similar Alice's side. Then, a similar process occurs as on Alice's browser:
process occurs as on Alice's browser: Bob's browser verifies that Bob's browser prompts him for device permission, the media streams
the calling service is approved, the media streams are created, and a are created, and a return signaling message containing media
return signaling message containing media information, ICE information, ICE candidates, and a fingerprint is sent back to Alice
candidates, and a fingerprint is sent back to Alice via the signaling via the signaling service. If Bob has a relationship with an IdP,
service. If Bob has a relationship with an IdP, the message will the message will also come with an identity assertion.
also come with an identity assertion.
At this point, Alice and Bob each know that the other party wants to At this point, Alice and Bob each know that the other party wants to
have a secure call with them. Based purely on the interface provided have a secure call with them. Based purely on the interface provided
by the signaling server, they know that the signaling server claims by the signaling server, they know that the signaling server claims
that the call is from Alice to Bob. This level of security is that the call is from Alice to Bob. This level of security is
provided merely by having the fingerprint in the message and having provided merely by having the fingerprint in the message and having
that message received securely from the signaling server. Because that message received securely from the signaling server. Because
the far end sent an identity assertion along with their message, they the far end sent an identity assertion along with their message, they
know that this is verifiable from the IdP as well. Note that if the know that this is verifiable from the IdP as well. Note that if the
call is federated, as shown in Figure 4 then Alice is able to verify call is federated, as shown in Figure 4 then Alice is able to verify
skipping to change at page 13, line 6 skipping to change at page 12, line 50
perform ICE checks with each other. At the completion of these perform ICE checks with each other. At the completion of these
checks, they are ready to send non-ICE data. checks, they are ready to send non-ICE data.
At this point, Alice knows that (a) Bob (assuming he is verified via At this point, Alice knows that (a) Bob (assuming he is verified via
his IdP) or someone else who the signaling service is claiming is Bob his IdP) or someone else who the signaling service is claiming is Bob
is willing to exchange traffic with her and (b) that either Bob is at is willing to exchange traffic with her and (b) that either Bob is at
the IP address which she has verified via ICE or there is an attacker the IP address which she has verified via ICE or there is an attacker
who is on-path to that IP address detouring the traffic. Note that who is on-path to that IP address detouring the traffic. Note that
it is not possible for an attacker who is on-path between Alice and it is not possible for an attacker who is on-path between Alice and
Bob but not attached to the signaling service to spoof these checks Bob but not attached to the signaling service to spoof these checks
because they do not have the ICE credentials. Bob's has the same because they do not have the ICE credentials. Bob has the same
security guarantees with respect to Alice. security guarantees with respect to Alice.
4.3. DTLS Handshake 4.3. DTLS Handshake
Once the ICE checks have completed [more specifically, once some ICE Once the ICE checks have completed [more specifically, once some ICE
checks have completed], Alice and Bob can set up a secure channel. checks have completed], Alice and Bob can set up a secure channel or
This is performed via DTLS [RFC4347] (for the data channel) and DTLS- channels. This is performed via DTLS [RFC4347] (for the data
SRTP [RFC5763] for the media channel. Specifically, Alice and Bob channel) and DTLS-SRTP [RFC5763] keying for SRTP [RFC3711] for the
perform a DTLS handshake on every channel which has been established media channel and SCTP over DTLS [I-D.ietf-tsvwg-sctp-dtls-encaps]
by ICE. The total number of channels depends on the amount of for data channels. Specifically, Alice and Bob perform a DTLS
muxing; in the most likely case we are using both RTP/RTCP mux and handshake on every channel which has been established by ICE. The
muxing multiple media streams on the same channel, in which case total number of channels depends on the amount of muxing; in the most
there is only one DTLS handshake. Once the DTLS handshake has likely case we are using both RTP/RTCP mux and muxing multiple media
completed, the keys are exported [RFC5705] and used to key SRTP for streams on the same channel, in which case there is only one DTLS
the media channels. handshake. Once the DTLS handshake has completed, the keys are
exported [RFC5705] and used to key SRTP for the media channels.
At this point, Alice and Bob know that they share a set of secure At this point, Alice and Bob know that they share a set of secure
data and/or media channels with keys which are not known to any data and/or media channels with keys which are not known to any
third-party attacker. If Alice and Bob authenticated via their IdPs, third-party attacker. If Alice and Bob authenticated via their IdPs,
then they also know that the signaling service is not mounting a man- then they also know that the signaling service is not mounting a man-
in-the-middle attack on theor traffic. Even if they do not use an in-the-middle attack on their traffic. Even if they do not use an
IdP, as long as they have minimal trust in the signaling service not IdP, as long as they have minimal trust in the signaling service not
to perform a man-in-the-middle attack, they know that their to perform a man-in-the-middle attack, they know that their
communications are secure against the signaling service as well communications are secure against the signaling service as well
(i.e., that the signaling service cannot mount a passive attack on (i.e., that the signaling service cannot mount a passive attack on
the communications). the communications).
4.4. Communications and Consent Freshness 4.4. Communications and Consent Freshness
From a security perspective, everything from here on in is a little From a security perspective, everything from here on in is a little
anticlimactic: Alice and Bob exchange data protected by the keys anticlimactic: Alice and Bob exchange data protected by the keys
skipping to change at page 14, line 10 skipping to change at page 14, line 9
implementations to periodically send keepalives. As described in implementations to periodically send keepalives. As described in
Section 5.3, these keepalives MUST be based on the consent freshness Section 5.3, these keepalives MUST be based on the consent freshness
mechanism specified in [I-D.muthu-behave-consent-freshness]. If a mechanism specified in [I-D.muthu-behave-consent-freshness]. If a
keepalive fails and no new ICE channels can be established, then the keepalive fails and no new ICE channels can be established, then the
session is terminated. session is terminated.
5. Detailed Technical Description 5. Detailed Technical Description
5.1. Origin and Web Security Issues 5.1. Origin and Web Security Issues
The basic unit of permissions for RTCWEB is the origin [RFC6454]. The basic unit of permissions for WebRTC is the origin [RFC6454].
Because the security of the origin depends on being able to Because the security of the origin depends on being able to
authenticate content from that origin, the origin can only be authenticate content from that origin, the origin can only be
securely established if data is transferred over HTTPS [RFC2818]. securely established if data is transferred over HTTPS [RFC2818].
Thus, clients MUST treat HTTP and HTTPS origins as different Thus, clients MUST treat HTTP and HTTPS origins as different
permissions domains. [Note: this follows directly from the origin permissions domains. [Note: this follows directly from the origin
security model and is stated here merely for clarity.] security model and is stated here merely for clarity.]
Many web browsers currently forbid by default any active mixed Many web browsers currently forbid by default any active mixed
content on HTTPS pages. That is, when JavaScript is loaded from an content on HTTPS pages. That is, when JavaScript is loaded from an
HTTP origin onto an HTTPS page, an error is displayed and the HTTP HTTP origin onto an HTTPS page, an error is displayed and the HTTP
content is not executed unless the user overrides the error. Any content is not executed unless the user overrides the error. Any
browser which enforces such a policy will also not permit access to browser which enforces such a policy will also not permit access to
RTCWEB functionality from mixed content pages (because they never WebRTC functionality from mixed content pages (because they never
display mixed content). It is RECOMMENDED that browsers which allow display mixed content). Browsers which allow active mixed content
active mixed content nevertheless disable RTCWEB functionality in MUST nevertheless disable WebRTC functionality in mixed content
mixed content settings. [[ OPEN ISSUE: Should this be a 2119 MUST? settings.
It's not clear what set of conditions would make this OK, other than
that browser manufacturers have traditionally been permissive here Note that it is possible for a page which was not mixed content to
here.]] Note that it is possible for a page which was not mixed become mixed content during the duration of the call. The major risk
content to become mixed content during the duration of the call. here is that the newly arrived insecure JS might redirect media to a
Implementations MAY choose to terminate the call or display a warning location controlled by the attacker. Implementations MUST either
at that point, but it is also permissible to ignore this condition. choose to terminate the call or display a warning at that point.
The major risk here is that the newly arrived insecure JS might
redirect media to a location controlled by the attacker. This is a
deliberate implementation complexity versus security tradeoff. [[
OPEN ISSUE:: Should we be more aggressive about this?]]
5.2. Device Permissions Model 5.2. Device Permissions Model
Implementations MUST obtain explicit user consent prior to providing Implementations MUST obtain explicit user consent prior to providing
access to the camera and/or microphone. Implementations MUST at access to the camera and/or microphone. Implementations MUST at
minimum support the following two permissions models for HTTPS minimum support the following two permissions models for HTTPS
origins. origins.
o Requests for one-time camera/microphone access. o Requests for one-time camera/microphone access.
o Requests for permanent access. o Requests for permanent access.
skipping to change at page 15, line 14 skipping to change at page 15, line 7
refuse all permissions grants for HTTP origins, but it is RECOMMENDED refuse all permissions grants for HTTP origins, but it is RECOMMENDED
that currently they support one-time camera/microphone access. that currently they support one-time camera/microphone access.
In addition, they SHOULD support requests for access that promise In addition, they SHOULD support requests for access that promise
that media from this grant will be sent to a single communicating that media from this grant will be sent to a single communicating
peer (obviously there could be other requests for other peers). peer (obviously there could be other requests for other peers).
E.g., "Call customerservice@ford.com". The semantics of this request E.g., "Call customerservice@ford.com". The semantics of this request
are that the media stream from the camera and microphone will only be are that the media stream from the camera and microphone will only be
routed through a connection which has been cryptographically verified routed through a connection which has been cryptographically verified
(through the IdP mechanism or an X.509 certificate in the DTLS-SRTP (through the IdP mechanism or an X.509 certificate in the DTLS-SRTP
handshake) as being associated with the stated identity. Browsers handshake) as being associated with the stated identity. Note that
servicing such requests SHOULD clearly indicate that identity to the it is unlikely that browsers would have an X.509 certificate, but
user when asking for permission. The idea behind this type of servers might. Browsers servicing such requests SHOULD clearly
permissions is that a user might have a fairly narrow list of peers indicate that identity to the user when asking for permission. The
he is willing to communicate with, e.g., "my mother" rather than idea behind this type of permissions is that a user might have a
"anyone on Facebook". Narrow permissions grants allow the browser to fairly narrow list of peers he is willing to communicate with, e.g.,
do that enforcement. "my mother" rather than "anyone on Facebook". Narrow permissions
grants allow the browser to do that enforcement.
API Requirement: The API MUST provide a mechanism for the requesting API Requirement: The API MUST provide a mechanism for the requesting
JS to indicate which of these forms of permissions it is JS to indicate which of these forms of permissions it is
requesting. This allows the browser client to know what sort of requesting. This allows the browser client to know what sort of
user interface experience to provide to the user, including what user interface experience to provide to the user, including what
permissions to request from the user and hence what to enforce permissions to request from the user and hence what to enforce
later. For instance, browsers might display a non-invasive door later. For instance, browsers might display a non-invasive door
hanger ("some features of this site may not work..." when asking hanger ("some features of this site may not work..." when asking
for long-term permissions) but a more invasive UI ("here is your for long-term permissions) but a more invasive UI ("here is your
own video") for single-call permissions. The API MAY grant weaker own video") for single-call permissions. The API MAY grant weaker
skipping to change at page 16, line 13 skipping to change at page 15, line 50
microphone input without the JS being able to prevent it. microphone input without the JS being able to prevent it.
UI Requirement: If the UI indication of camera/microphone use are UI Requirement: If the UI indication of camera/microphone use are
displayed in the browser such that minimizing the browser window displayed in the browser such that minimizing the browser window
would hide the indication, or the JS creating an overlapping would hide the indication, or the JS creating an overlapping
window would hide the indication, then the browser SHOULD stop window would hide the indication, then the browser SHOULD stop
camera and microphone input when the indication is hidden. [Note: camera and microphone input when the indication is hidden. [Note:
this may not be necessary in systems that are non-windows-based this may not be necessary in systems that are non-windows-based
but that have good notifications support, such as phones.] but that have good notifications support, such as phones.]
[[OPEN ISSUE: This section does not have WG consensus. Because
screen/application sharing presents a more significant risk than
camera and microphone access (see the discussion in
[I-D.ietf-rtcweb-security] S 4.1.1), we require a higher level of
user consent.
o Browsers MUST not permit permanent screen or application sharing
permissions to be installed as a response to a JS request for
permissions. Instead, they must require some other user action
such as a permissions setting or an application install experience
to grant permission to a site.
o Browsers MUST provide a separate dialog request for screen/
application sharing permissions even if the media request is made
at the same time as camera and microphone.
o The browser MUST indicate any windows which are currently being
shared in some unambiguous way. Windows which are not visible
MUST not be shared even if the application is being shared. If
the screen is being shared, then that MUST be indicated.
-- END OF OPEN ISSUE]]
Clients MAY permit the formation of data channels without any direct Clients MAY permit the formation of data channels without any direct
user approval. Because sites can always tunnel data through the user approval. Because sites can always tunnel data through the
server, further restrictions on the data channel do not provide any server, further restrictions on the data channel do not provide any
additional security. (though see Section 5.3 for a related issue). additional security. (though see Section 5.3 for a related issue).
Implementations which support some form of direct user authentication Implementations which support some form of direct user authentication
SHOULD also provide a policy by which a user can authorize calls only SHOULD also provide a policy by which a user can authorize calls only
to specific counterparties. Specifically, the implementation SHOULD to specific communicating peers. Specifically, the implementation
provide the following interfaces/controls: SHOULD provide the following interfaces/controls:
o Allow future calls to this verified user. o Allow future calls to this verified user.
o Allow future calls to any verified user who is in my system o Allow future calls to any verified user who is in my system
address book (this only works with address book integration, of address book (this only works with address book integration, of
course). course).
Implementations SHOULD also provide a different user interface Implementations SHOULD also provide a different user interface
indication when calls are in progress to users whose identities are indication when calls are in progress to users whose identities are
directly verifiable. Section 5.5 provides more on this. directly verifiable. Section 5.5 provides more on this.
5.3. Communications Consent 5.3. Communications Consent
Browser client implementations of RTCWEB MUST implement ICE. Server Browser client implementations of WebRTC MUST implement ICE. Server
gateway implementations which operate only at public IP addresses gateway implementations which operate only at public IP addresses
MUST implement either full ICE or ICE-Lite. MUST implement either full ICE or ICE-Lite [RFC5245].
Browser implementations MUST verify reachability via ICE prior to Browser implementations MUST verify reachability via ICE prior to
sending any non-ICE packets to a given destination. Implementations sending any non-ICE packets to a given destination. Implementations
MUST NOT provide the ICE transaction ID to JavaScript during the MUST NOT provide the ICE transaction ID to JavaScript during the
lifetime of the transaction (i.e., during the period when the ICE lifetime of the transaction (i.e., during the period when the ICE
stack would accept a new response for that transaction). [Note: stack would accept a new response for that transaction). The JS MUST
this document takes no position on the split between ICE in JS and NOT be permitted to control the local ufrag and password, though it
ICE in the browser. The above text is written the way it is for of course knows it.
editorial convenience and will be modified appropriately if the WG
decides on ICE in the JS.] The JS MUST NOT be permitted to control
the local ufrag and password, though it of course knows it.
While continuing consent is required, that ICE [RFC5245]; Section 10 While continuing consent is required, that ICE [RFC5245]; Section 10
keepalives STUN Binding Indications are one-way and therefore not keepalives STUN Binding Indications are one-way and therefore not
sufficient. The current WG consensus is to use ICE Binding Requests sufficient. The current WG consensus is to use ICE Binding Requests
for continuing consent freshness. ICE already requires that for continuing consent freshness. ICE already requires that
implementations respond to such requests, so this approach is implementations respond to such requests, so this approach is
maximally compatible. A separate document will profile the ICE maximally compatible. A separate document will profile the ICE
timers to be used; see [I-D.muthu-behave-consent-freshness]. timers to be used; see [I-D.muthu-behave-consent-freshness].
5.4. IP Location Privacy 5.4. IP Location Privacy
A side effect of the default ICE behavior is that the peer learns A side effect of the default ICE behavior is that the peer learns
one's IP address, which leaks large amounts of location information, one's IP address, which leaks large amounts of location information.
especially for mobile devices. This has negative privacy This has negative privacy consequences in some circumstances. The
consequences in some circumstances. The API requirements in this API requirements in this section are intended to mitigate this issue.
section are intended to mitigate this issue. Note that these Note that these requirements are NOT intended to protect the user's
requirements are NOT intended to protect the user's IP address from a IP address from a malicious site. In general, the site will learn at
malicious site. In general, the site will learn at least a user's least a user's server reflexive address from any HTTP transaction.
server reflexive address from any HTTP transaction. Rather, these Rather, these requirements are intended to allow a site to cooperate
requirements are intended to allow a site to cooperate with the user with the user to hide the user's IP address from the other side of
to hide the user's IP address from the other side of the call. the call. Hiding the user's IP address from the server requires some
Hiding the user's IP address from the server requires some sort of sort of explicit privacy preserving mechanism on the client (e.g.,
explicit privacy preserving mechanism on the client (e.g., Torbutton Torbutton [https://www.torproject.org/torbutton/]) and is out of
[https://www.torproject.org/torbutton/]) and is out of scope for this scope for this specification.
specification.
API Requirement: The API MUST provide a mechanism to allow the JS to API Requirement: The API MUST provide a mechanism to allow the JS to
suppress ICE negotiation (though perhaps to allow candidate suppress ICE negotiation (though perhaps to allow candidate
gathering) until the user has decided to answer the call [note: gathering) until the user has decided to answer the call [note:
determining when the call has been answered is a question for the determining when the call has been answered is a question for the
JS.] This enables a user to prevent a peer from learning their IP JS.] This enables a user to prevent a peer from learning their IP
address if they elect not to answer a call and also from learning address if they elect not to answer a call and also from learning
whether the user is online. whether the user is online.
API Requirement: The API MUST provide a mechanism for the calling API Requirement: The API MUST provide a mechanism for the calling
application JS to indicate that only TURN candidates are to be application JS to indicate that only TURN candidates are to be
used. This prevents the peer from learning one's IP address at used. This prevents the peer from learning one's IP address at
all. all. This mechanism MUST also permit suppression of the related
address field, since that leaks local addresses.
API Requirement: The API MUST provide a mechanism for the calling API Requirement: The API MUST provide a mechanism for the calling
application to reconfigure an existing call to add non-TURN application to reconfigure an existing call to add non-TURN
candidates. Taken together, this and the previous requirement candidates. Taken together, this and the previous requirement
allow ICE negotiation to start immediately on incoming call allow ICE negotiation to start immediately on incoming call
notification, thus reducing post-dial delay, but also to avoid notification, thus reducing post-dial delay, but also to avoid
disclosing the user's IP address until they have decided to disclosing the user's IP address until they have decided to
answer. They also allow users to completely hide their IP address answer. They also allow users to completely hide their IP address
for the duration of the call. Finally, they allow a mechanism for for the duration of the call. Finally, they allow a mechanism for
the user to optimize performance by reconfiguring to allow non- the user to optimize performance by reconfiguring to allow non-
turn candidates during an active call if the user decides they no turn candidates during an active call if the user decides they no
longer need to hide their IP address longer need to hide their IP address
Note that some enterprises may operate proxies and/or NATs designed
to hide internal IP addresses from the outside world. WebRTC
provides no explicit mechanism to allow this function. Either such
enterprises need to proxy the HTTP/HTTPS and modify the SDP and/or
the JS, or there needs to be browser support to set the "TURN-only"
policy regardless of the site's preferences.
5.5. Communications Security 5.5. Communications Security
Implementations MUST implement DTLS [RFC4347] and DTLS-SRTP Implementations MUST implement SRTP [RFC3711]. Implementations MUST
[RFC5763][RFC5764]. All data channels MUST be secured via DTLS. implement DTLS [RFC4347] and DTLS-SRTP [RFC5763][RFC5764] for SRTP
DTLS-SRTP MUST be offered for every media channel and MUST be the keying. Implementations MUST implement
default; i.e., if an implementation receives an offer for DTLS-SRTP [I-D.ietf-tsvwg-sctp-dtls-encaps].
and SDES, DTLS-SRTP MUST be selected. Media traffic MUST NOT be sent
over plain (unencrypted) RTP. All media channels MUST be secured via SRTP. Media traffic MUST NOT
be sent over plain (unencrypted) RTP. DTLS-SRTP MUST be offered for
every media channel and MUST be the default; i.e., if an
implementation receives an offer for DTLS-SRTP and SDES, DTLS-SRTP
MUST be selected.
All data channels MUST be secured via DTLS.
[OPEN ISSUE: What should the settings be here? MUST?] [OPEN ISSUE: What should the settings be here? MUST?]
Implementations MAY support SDES for media traffic for backward Implementations MAY support SDES for media traffic for backward
compatibility purposes. compatibility purposes.
API Requirement: The API MUST provide a mechanism to indicate that a API Requirement: The API MUST provide a mechanism to indicate that a
fresh DTLS key pair is to be generated for a specific call. This fresh DTLS key pair is to be generated for a specific call. This
is intended to allow for unlinkability. Note that there are also is intended to allow for unlinkability. Note that there are also
settings where it is attractive to use the same keying material settings where it is attractive to use the same keying material
repeatedly, especially those with key continuity-based repeatedly, especially those with key continuity-based
authentication. authentication. Unless the user specifically configures an
external key pair, different key pairs MUST be used for each
origin. (This avoids creating a super-cookie.)
API Requirement: When DTLS-SRTP is used, the API MUST NOT permit the API Requirement: When DTLS-SRTP is used, the API MUST NOT permit the
JS to obtain the negotiated keying material. This requirement JS to obtain the negotiated keying material. This requirement
preserves the end-to-end security of the media. preserves the end-to-end security of the media.
UI Requirements: A user-oriented client MUST provide an UI Requirements: A user-oriented client MUST provide an
"inspector" interface which allows the user to determine the "inspector" interface which allows the user to determine the
security characteristics of the media. [largely derived from security characteristics of the media.
[I-D.kaufman-rtcweb-security-ui]
The following properties SHOULD be displayed "up-front" in the The following properties SHOULD be displayed "up-front" in the
browser chrome, i.e., without requiring the user to ask for them: browser chrome, i.e., without requiring the user to ask for them:
* A client MUST provide a user interface through which a user may * A client MUST provide a user interface through which a user may
determine the security characteristics for currently-displayed determine the security characteristics for currently-displayed
audio and video stream(s) audio and video stream(s)
* A client MUST provide a user interface through which a user may * A client MUST provide a user interface through which a user may
determine the security characteristics for transmissions of determine the security characteristics for transmissions of
their microphone audio and camera video. their microphone audio and camera video.
* The "security characteristics" MUST include an indication as to * The "security characteristics" MUST include an indication as to
skipping to change at page 19, line 10 skipping to change at page 19, line 33
(see Section 5.6) the "security characteristics" MUST include (see Section 5.6) the "security characteristics" MUST include
the verified information. X.509 identities and Web IdP the verified information. X.509 identities and Web IdP
identities have similar semantics and should be displayed in a identities have similar semantics and should be displayed in a
similar way. similar way.
The following properties are more likely to require some "drill- The following properties are more likely to require some "drill-
down" from the user: down" from the user:
* The "security characteristics" MUST indicate the cryptographic * The "security characteristics" MUST indicate the cryptographic
algorithms in use (For example: "AES-CBC" or "Null Cipher".) algorithms in use (For example: "AES-CBC" or "Null Cipher".)
However, if Null ciphers are used, that MUST be presented to
the user at the top-level UI.
* The "security characteristics" MUST indicate whether PFS is * The "security characteristics" MUST indicate whether PFS is
provided. provided.
* The "security characteristics" MUST include some mechanism to * The "security characteristics" MUST include some mechanism to
allow an out-of-band verification of the peer, such as a allow an out-of-band verification of the peer, such as a
certificate fingerprint or an SAS. certificate fingerprint or an SAS.
5.6. Web-Based Peer Authentication 5.6. Web-Based Peer Authentication
In a number of cases, it is desirable for the endpoint (i.e., the In a number of cases, it is desirable for the endpoint (i.e., the
browser) to be able to directly identity the endpoint on the other browser) to be able to directly identity the endpoint on the other
skipping to change at page 23, line 20 skipping to change at page 23, line 40
cryptographically bound to the user's identity and a mechanism for cryptographically bound to the user's identity and a mechanism for
carrying assertions in JSEP messages. Section 5.6.4 carrying assertions in JSEP messages. Section 5.6.4
o The interface to the IdP. Section 5.6.5 specifies a specific o The interface to the IdP. Section 5.6.5 specifies a specific
protocol mechanism which allows the use of any identity protocol protocol mechanism which allows the use of any identity protocol
without requiring specific further protocol support in the browser without requiring specific further protocol support in the browser
o The JavaScript interfaces which the calling application can use to o The JavaScript interfaces which the calling application can use to
specify the IdP to use to generate assertions and to discover what specify the IdP to use to generate assertions and to discover what
assertions were received. assertions were received.
The first two items are defined in this document. The final one is The first two items are defined in this document. The final one is
defined in the companion W3C WebRTC API specification [TODO:REF] defined in the companion W3C WebRTC API specification [webrtc-api].
5.6.4. Binding Identity Assertions to JSEP Offer/Answer Transactions 5.6.4. Binding Identity Assertions to JSEP Offer/Answer Transactions
5.6.4.1. Input to Assertion Generation Process 5.6.4.1. Input to Assertion Generation Process
As discussed above, an identity assertion binds the user's identity As discussed above, an identity assertion binds the user's identity
(as asserted by the IdP) to the JSEP offer/exchange transaction and (as asserted by the IdP) to the JSEP offer/exchange transaction and
specifically to the media. In order to achieve this, the specifically to the media. In order to achieve this, the
PeerConnection must provide the DTLS-SRTP fingerprint to be bound to PeerConnection must provide the DTLS-SRTP fingerprint to be bound to
the identity. This is provided in a JSON structure for the identity. This is provided in a JSON structure for
skipping to change at page 23, line 42 skipping to change at page 24, line 14
{ {
"fingerprint" : "fingerprint" :
{ {
"algorithm":"SHA-1", "algorithm":"SHA-1",
"digest":"4A:AD:B9:B1:3F:...:E5:7C:AB" "digest":"4A:AD:B9:B1:3F:...:E5:7C:AB"
} }
} }
The "algorithm" and digest values correspond directly to the The "algorithm" and digest values correspond directly to the
algorithm and digest in the a=fingerprint line of the SDP. algorithm and digest values in the a=fingerprint line of the SDP.
[RFC4572].
Note: this structure does not need to be interpreted by the IdP or Note: this structure does not need to be interpreted by the IdP or
the IdP proxy. It is consumed solely by the RP's browser. The IdP the IdP proxy. It is consumed solely by the RP's browser. The IdP
merely treats it as an opaque value to be attested to. Thus, new merely treats it as an opaque value to be attested to. Thus, new
parameters can be added to the assertion without modifying the IdP. parameters can be added to the assertion without modifying the IdP.
5.6.4.2. Carrying Identity Assertions 5.6.4.2. Carrying Identity Assertions
Once an IdP has generated an assertion, it is attached to the JSEP Once an IdP has generated an assertion, it is attached to the JSEP
message. This is done by adding a new a-line to the SDP, of the form message. This is done by adding a new a-line to the SDP, of the form
skipping to change at page 24, line 25 skipping to change at page 24, line 42
c=IN IP4 ua1.example.com c=IN IP4 ua1.example.com
a=setup:actpass a=setup:actpass
a=fingerprint: SHA-1 \ a=fingerprint: SHA-1 \
4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB 4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB
a=identity: \ a=identity: \
ImlkcCI6eyJkb21haW4iOiAiZXhhbXBsZS5vcmciLCAicHJvdG9jb2wiOiAiYm9n \ ImlkcCI6eyJkb21haW4iOiAiZXhhbXBsZS5vcmciLCAicHJvdG9jb2wiOiAiYm9n \
dXMifSwiYXNzZXJ0aW9uIjpcIntcImlkZW50aXR5XCI6XCJib2JAZXhhbXBsZS5v \ dXMifSwiYXNzZXJ0aW9uIjpcIntcImlkZW50aXR5XCI6XCJib2JAZXhhbXBsZS5v \
cmdcIixcImNvbnRlbnRzXCI6XCJhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3l6XCIs \ cmdcIixcImNvbnRlbnRzXCI6XCJhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3l6XCIs \
XCJzaWduYXR1cmVcIjpcIjAxMDIwMzA0MDUwNlwifSJ9Cg== XCJzaWduYXR1cmVcIjpcIjAxMDIwMzA0MDUwNlwifSJ9Cg==
t=0 0 t=0 0
m=audio 6056 RTP/AVP 0 m=audio 6056 RTP/SAVP 0
a=sendrecv a=sendrecv
a=tcap:1 UDP/TLS/RTP/SAVP RTP/AVP
a=pcfg:1 t=1
Each identity attribute should be paired (and attests to) with an Each identity attribute should be paired (and attests to) with an
a=fingerprint attribute and therefore can exist either at the session a=fingerprint attribute and therefore can exist either at the session
or media level. Multiple identity attributes may appear at either or media level. Multiple identity attributes may appear at either
level, though it is RECOMMENDED that implementations not do this, level, though it is RECOMMENDED that implementations not do this,
because it becomes very unclear what security claim that they are because it becomes very unclear what security claim that they are
making and the UI guidelines above become unclear. Browsers MAY making and the UI guidelines above become unclear. Browsers MAY
choose refuse to display any identity indicators in the face of choose refuse to display any identity indicators in the face of
multiple identity attributes with different identities but SHOULD multiple identity attributes with different identities but SHOULD
process multiple attributes with the same identity as described process multiple attributes with the same identity as described
skipping to change at page 25, line 18 skipping to change at page 25, line 30
"origin":"https://calling-site.example.com", "origin":"https://calling-site.example.com",
"message":"012345678abcdefghijkl" "message":"012345678abcdefghijkl"
} }
All messages MUST contain a "type" field which indicates the general All messages MUST contain a "type" field which indicates the general
meaning of the message. meaning of the message.
All requests from the PeerConnection object MUST contain an "id" All requests from the PeerConnection object MUST contain an "id"
field which MUST be unique for that PeerConnection object. Any field which MUST be unique for that PeerConnection object. Any
responses from the IdP proxy MUST contain the same id in response, responses from the IdP proxy MUST contain the same id in response,
which allows the PeerConnection to correlate requests and responses. which allows the PeerConnection to correlate requests and responses,
in case there are multiple requests/responses outstanding to the same
proxy.
All requests from the PeerConnection object MUST contain an "origin" All requests from the PeerConnection object MUST contain an "origin"
field containing the origin of the JS which initiated the PC (i.e., field containing the origin of the JS which initiated the PC (i.e.,
the URL of the calling site). This origin value can be used by the the URL of the calling site). This origin value can be used by the
IdP to make access control decisions. For instance, an IdP might IdP to make access control decisions. For instance, an IdP might
only issue identity assertions for certain calling services in the only issue identity assertions for certain calling services in the
same way that some IdPs require that relying Web sites have an API same way that some IdPs require that relying Web sites have an API
key before learning user identity. key before learning user identity.
Any message-specific data is carried in a "message" field. Depending Any message-specific data is carried in a "message" field. Depending
on the message type, this may either be a string or a richer JSON on the message type, this may either be a string or a richer JSON
object. object.
5.6.5.1.1. Errors 5.6.5.1.1. Errors
If an error occurs, the IdP sends a message of type "ERROR". The If an error occurs, the IdP sends a message of type "ERROR". The
message MAY have an "error" field containing freeform text data which message MAY have an "error" field containing freeform text data which
containing additional information about what happened. For instance: containing additional information about what happened. For instance:
{ {
"id":"1",
"type":"ERROR", "type":"ERROR",
"error":"Signature verification failed" "error":"Signature verification failed"
} }
Figure 5: Example error Figure 5: Example error
5.6.5.2. IdP Proxy Setup 5.6.5.2. IdP Proxy Setup
In order to perform an identity transaction, the PeerConnection must In order to perform an identity transaction, the PeerConnection must
first create an IdP proxy. While the details of this are specified first create an IdP proxy. While the details of this are specified
skipping to change at page 26, line 21 skipping to change at page 26, line 36
to verify the source and destination of these messages. to verify the source and destination of these messages.
Initially the IdP proxy is in an unready state; the IdP JS must be Initially the IdP proxy is in an unready state; the IdP JS must be
loaded and there may be several round trips to the IdP server, for loaded and there may be several round trips to the IdP server, for
instance to log the user in. When the IdP proxy is ready to receive instance to log the user in. When the IdP proxy is ready to receive
commands, it delivers a "ready" message. As this message is commands, it delivers a "ready" message. As this message is
unsolicited, it simply contains: unsolicited, it simply contains:
{ "type":"READY" } { "type":"READY" }
[[ OPEN ISSUE: if the W3C half of this converges on WebIntents, then
the READY message will not be necessary.]]
Once the PeerConnection object receives the ready message, it can Once the PeerConnection object receives the ready message, it can
send commands to the IdP proxy. send commands to the IdP proxy.
5.6.5.2.1. Determining the IdP URI 5.6.5.2.1. Determining the IdP URI
In order to ensure that the IdP is under control of the domain owner In order to ensure that the IdP is under control of the domain owner
rather than someone who merely has an account on the domain owner's rather than someone who merely has an account on the domain owner's
server (e.g., in shared hosting scenarios), the IdP JavaScript is server (e.g., in shared hosting scenarios), the IdP JavaScript is
hosted at a deterministic location based on the IdP's domain name. hosted at a deterministic location based on the IdP's domain name.
Each IdP proxy instance is associated with two values: Each IdP proxy instance is associated with two values:
skipping to change at page 27, line 30 skipping to change at page 27, line 42
local policy, as described in Section 5.6.5.2.3.1. local policy, as described in Section 5.6.5.2.3.1.
5.6.5.2.2. Requesting Assertions 5.6.5.2.2. Requesting Assertions
In order to request an assertion, the PeerConnection sends a "SIGN" In order to request an assertion, the PeerConnection sends a "SIGN"
message. Aside from the mandatory fields, this message has a message. Aside from the mandatory fields, this message has a
"message" field containing a string. The contents of this string are "message" field containing a string. The contents of this string are
defined above, but are opaque from the perspective of the IdP. defined above, but are opaque from the perspective of the IdP.
A successful response to a "SIGN" message contains a message field A successful response to a "SIGN" message contains a message field
which is a JS dictionary dictionary consisting of two fields: which is a JS dictionary consisting of two fields:
idp: A dictionary containing the domain name of the provider and the idp: A dictionary containing the domain name of the provider and the
protocol string protocol string
assertion: An opaque field containing the assertion itself. This is assertion: An opaque field containing the assertion itself. This is
only interpretable by the idp or its proxy. only interpretable by the idp or its proxy.
Figure 6 shows an example transaction, with the message "abcde..." Figure 6 shows an example transaction, with the message "abcde..."
(remember, the messages are opaque at this layer) being signed and (remember, the messages are opaque at this layer) being signed and
bound to identity "ekr@example.org". In this case, the message has bound to identity "ekr@example.org". In this case, the message has
presumably been digitally signed/MACed in some way that the IdP can presumably been digitally signed/MACed in some way that the IdP can
skipping to change at page 28, line 31 skipping to change at page 28, line 35
}, },
"assertion":\"{\"identity\":\"bob@example.org\", "assertion":\"{\"identity\":\"bob@example.org\",
\"contents\":\"abcdefghijklmnopqrstuvwyz\", \"contents\":\"abcdefghijklmnopqrstuvwyz\",
\"request_origin\":\"rtcweb://peerconnection\", \"request_origin\":\"rtcweb://peerconnection\",
\"signature\":\"010203040506\"}" \"signature\":\"010203040506\"}"
} }
} }
Figure 6: Example assertion request Figure 6: Example assertion request
The message structure is serialized, base64-encoded, and placed in an
a=identity attribute.
5.6.5.2.3. Verifying Assertions 5.6.5.2.3. Verifying Assertions
In order to verify an assertion, an RP sends a "VERIFY" message to In order to verify an assertion, an RP sends a "VERIFY" message to
the IdP proxy containing the assertion supplied by the AP in the the IdP proxy containing the assertion supplied by the AP in the
"message" field. "message" field.
The IdP proxy verifies the assertion. Depending on the identity The IdP proxy verifies the assertion. Depending on the identity
protocol, this may require one or more round trips to the IdP. For protocol, this may require one or more round trips to the IdP. For
instance, an OAuth-based protocol will likely require using the IdP instance, an OAuth-based protocol will likely require using the IdP
as an oracle, whereas with BrowserID the IdP proxy can likely verify as an oracle, whereas with BrowserID the IdP proxy can likely verify
skipping to change at page 29, line 15 skipping to change at page 29, line 19
identity The identity of the AP from the IdP's perspective. Details identity The identity of the AP from the IdP's perspective. Details
of this are provided in Section 5.6.5.2.3.1 of this are provided in Section 5.6.5.2.3.1
contents The original unmodified string provided by the AP in the contents The original unmodified string provided by the AP in the
original SIGN request. original SIGN request.
request_origin The original origin of the SIGN request on the AP request_origin The original origin of the SIGN request on the AP
side as determined by the origin of the PostMessage call. The IdP side as determined by the origin of the PostMessage call. The IdP
MUST somehow arrange to propagate this information as part of the MUST somehow arrange to propagate this information as part of the
assertion. The receiving PeerConnection MUST verify that this assertion. The receiving PeerConnection MUST verify that this
value is "rtcweb://peerconnection" (which implies that value is "rtcweb://peerconnection" (which implies that
PeerConnection must arrange that its messages to the IdP proxy are PeerConnection must arrange that its messages to the IdP proxy are
from this origin.) [[ OPEN ISSUE: Can a URI person help make a from this origin.) See Section 5.7.4.1 for the security purpose
better URI.]] of this field. [[ OPEN ISSUE: Can a URI person help make a better
URI.]]
Figure 7 shows an example transaction. Line breaks are inserted Figure 7 shows an example transaction. Line breaks are inserted
solely for readability. solely for readability.
PeerConnection -> IdP Proxy: PeerConnection -> IdP Proxy:
{ {
"type":"VERIFY", "type":"VERIFY",
"id":2, "id":2,
"origin":"https://calling-service.example.com/", "origin":"https://calling-service.example.com/",
"message":\"{\"identity\":\"bob@example.org\", "message":\"{\"identity\":\"bob@example.org\",
skipping to change at page 31, line 38 skipping to change at page 31, line 40
In order to protect against malicious content JavaScript, that In order to protect against malicious content JavaScript, that
JavaScript MUST NOT be allowed to have direct access to---or perform JavaScript MUST NOT be allowed to have direct access to---or perform
computations with---DTLS keys. For instance, if content JS were able computations with---DTLS keys. For instance, if content JS were able
to compute digital signatures, then it would be possible for content to compute digital signatures, then it would be possible for content
JS to get an identity assertion for a browser's generated key and JS to get an identity assertion for a browser's generated key and
then use that assertion plus a signature by the key to authenticate a then use that assertion plus a signature by the key to authenticate a
call protected under an ephemeral DH key controlled by the content call protected under an ephemeral DH key controlled by the content
JS, thus violating the security guarantees otherwise provided by the JS, thus violating the security guarantees otherwise provided by the
IdP mechanism. Note that it is not sufficient merely to deny the IdP mechanism. Note that it is not sufficient merely to deny the
content JS direct access to the keys, as some have suggested doing content JS direct access to the keys, as some have suggested doing
with the WebCrypto API. The JS must also not be allowed to perform with the WebCrypto API. [webcrypto]. The JS must also not be allowed
operations that would be valid for a DTLS endpoint. By far the to perform operations that would be valid for a DTLS endpoint. By
safest approach is simply to deny the ability to perform any far the safest approach is simply to deny the ability to perform any
operations that depend on secret information associated with the key. operations that depend on secret information associated with the key.
Operations that depend on public information, such as exporting the Operations that depend on public information, such as exporting the
public key are of course safe. public key are of course safe.
5.7.2. Privacy 5.7.2. Privacy
The requirements in this document are intended to allow: The requirements in this document are intended to allow:
o Users to participate in calls without revealing their location. o Users to participate in calls without revealing their location.
o Potential callees to avoid revealing their location and even o Potential callees to avoid revealing their location and even
presence status prior to agreeing to answer a call. presence status prior to agreeing to answer a call.
However, these privacy protections come at a performance cost in However, these privacy protections come at a performance cost in
terms of using TURN relays and, in the latter case, delaying ICE. terms of using TURN relays and, in the latter case, delaying ICE.
Sites SHOULD make users aware of these tradeoffs. Sites SHOULD make users aware of these tradeoffs.
Note that the protections provided here assume a non-malicious Note that the protections provided here assume a non-malicious
calling service. As the calling service always knows the users calling service. As the calling service always knows the users
status and (absent the use of a technology like Tor) their IP status and (absent the use of a technology like Tor) their IP
skipping to change at page 32, line 17 skipping to change at page 32, line 18
However, these privacy protections come at a performance cost in However, these privacy protections come at a performance cost in
terms of using TURN relays and, in the latter case, delaying ICE. terms of using TURN relays and, in the latter case, delaying ICE.
Sites SHOULD make users aware of these tradeoffs. Sites SHOULD make users aware of these tradeoffs.
Note that the protections provided here assume a non-malicious Note that the protections provided here assume a non-malicious
calling service. As the calling service always knows the users calling service. As the calling service always knows the users
status and (absent the use of a technology like Tor) their IP status and (absent the use of a technology like Tor) their IP
address, they can violate the users privacy at will. Users who wish address, they can violate the users privacy at will. Users who wish
privacy against the calling sites they are using must use separate privacy against the calling sites they are using must use separate
privacy enhancing technologies such as Tor. Combined RTCWEB/Tor privacy enhancing technologies such as Tor. Combined WebRTC/Tor
implementations SHOULD arrange to route the media as well as the implementations SHOULD arrange to route the media as well as the
signaling through Tor. [Currently this will produce very suboptimal signaling through Tor. Currently this will produce very suboptimal
performance.] performance.
Additionally, any identifier which persists across multiple calls is
potentially a problem for privacy, especially for anonymous calling
services. Such services SHOULD instruct the browser to use separate
DTLS keys for each call and also to use TURN throughout the call.
Otherwise, the other side will learn linkable information.
Additionally, browsers SHOULD implement the privacy-preserving CNAME
generation mode of [I-D.ietf-avtcore-6222bis].
5.7.3. Denial of Service 5.7.3. Denial of Service
The consent mechanisms described in this document are intended to The consent mechanisms described in this document are intended to
mitigate denial of service attacks in which an attacker uses clients mitigate denial of service attacks in which an attacker uses clients
to send large amounts of traffic to a victim without the consent of to send large amounts of traffic to a victim without the consent of
the victim. While these mechanisms are sufficient to protect victims the victim. While these mechanisms are sufficient to protect victims
who have not implemented RTCWEB at all, RTCWEB implementations need who have not implemented WebRTC at all, WebRTC implementations need
to be more careful. to be more careful.
Consider the case of a call center which accepts calls via RTCWeb. Consider the case of a call center which accepts calls via RTCWeb.
An attacker proxies the call center's front-end and arranges for An attacker proxies the call center's front-end and arranges for
multiple clients to initiate calls to the call center. Note that multiple clients to initiate calls to the call center. Note that
this requires user consent in many cases but because the data channel this requires user consent in many cases but because the data channel
does not need consent, he can use that directly. Since ICE will does not need consent, he can use that directly. Since ICE will
complete, browsers can then be induced to send large amounts of data complete, browsers can then be induced to send large amounts of data
to the victim call center if it supports the data channel at all. to the victim call center if it supports the data channel at all.
Preventing this attack requires that automated RTCWEB Preventing this attack requires that automated WebRTC implementations
implemementations implement sensible flow control and have the implement sensible flow control and have the ability to triage out
ability to triage out (i.e., stop responding to ICE probes on) calls (i.e., stop responding to ICE probes on) calls which are behaving
which are behaving badly, and especially to be prepared to remotely badly, and especially to be prepared to remotely throttle the data
throttle the data channel in the absence of plausible audio and video channel in the absence of plausible audio and video (which the
(which the attacker cannot control). attacker cannot control).
Another related attack is for the signaling service to swap the ICE Another related attack is for the signaling service to swap the ICE
candidates for the audio and video streams, thus forcing a browser to candidates for the audio and video streams, thus forcing a browser to
send video to the sink that the other victim expects will contain send video to the sink that the other victim expects will contain
audio (perhaps it is only expecting audio!) potentially causing audio (perhaps it is only expecting audio!) potentially causing
overload. Muxing multiple media flows over a single transport makes overload. Muxing multiple media flows over a single transport makes
it harder to individually suppress a single flow by denying ICE it harder to individually suppress a single flow by denying ICE
keepalives. Either media-level (RTCP) mechanisms must be used or the keepalives. Either media-level (RTCP) mechanisms must be used or the
implementation must deny responses entirely, thus termnating the implementation must deny responses entirely, thus terminating the
call. call.
Yet another attack, suggested by Magnus Westerlund, is for the Yet another attack, suggested by Magnus Westerlund, is for the
attacker to cross-connect offers and answers as follows. It induces attacker to cross-connect offers and answers as follows. It induces
the victim to make a call and then uses its control of other users the victim to make a call and then uses its control of other users
browsers to get them to attempt a call to someone. It then browsers to get them to attempt a call to someone. It then
translates their offers into apparent answers to the victim, which translates their offers into apparent answers to the victim, which
looks like large-scale parallel forking. The victim still responds looks like large-scale parallel forking. The victim still responds
to ICE responses and now the browsers all try to send media to the to ICE responses and now the browsers all try to send media to the
victim. Implementations can defend themselves from this attack by victim. Implementations can defend themselves from this attack by
skipping to change at page 33, line 49 skipping to change at page 34, line 9
own IFRAME, loading the IdP proxy HTML/JS, and requesting a own IFRAME, loading the IdP proxy HTML/JS, and requesting a
signature. In order to prevent this attack, we require that all signature. In order to prevent this attack, we require that all
signatures be tied to a specific origin ("rtcweb://...") which cannot signatures be tied to a specific origin ("rtcweb://...") which cannot
be produced by content JavaScript. Thus, while an attacker can be produced by content JavaScript. Thus, while an attacker can
instantiate the IdP proxy, they cannot send messages from an instantiate the IdP proxy, they cannot send messages from an
appropriate origin and so cannot create acceptable assertions. I.e., appropriate origin and so cannot create acceptable assertions. I.e.,
the assertion request must have come from the browser. This origin the assertion request must have come from the browser. This origin
check is enforced on the relying party side, not on the check is enforced on the relying party side, not on the
authenticating party side. The reason for this is to take the burden authenticating party side. The reason for this is to take the burden
of knowing which origins are valid off of the IdP, thus making this of knowing which origins are valid off of the IdP, thus making this
mechanism extensible to other applications besides RTCWEB. The IdP mechanism extensible to other applications besides WebRTC. The IdP
simply needs to gather the origin information (from the posted simply needs to gather the origin information (from the posted
message) and attach it to the assertion. message) and attach it to the assertion.
Note that although this origin check is enforced on the RP side and Note that although this origin check is enforced on the RP side and
not at the IdP, it is absolutely imperative that it be done. The not at the IdP, it is absolutely imperative that it be done. The
mechanisms in this document rely on the browser enforcing access mechanisms in this document rely on the browser enforcing access
restrictions on the DTLS keys and assertion requests which do not restrictions on the DTLS keys and assertion requests which do not
come with the right origin may be from content JS rather than from come with the right origin may be from content JS rather than from
browsers, and therefore those access restrcitions cannot be assumed. browsers, and therefore those access restrictions cannot be assumed.
Note that this check only asserts that the browser (or some other Note that this check only asserts that the browser (or some other
entity with access to the user's authentication data) attests to the entity with access to the user's authentication data) attests to the
request and hence to the fingerprint. It does not demonstrate that request and hence to the fingerprint. It does not demonstrate that
the browser has access to the associated private key. However, the browser has access to the associated private key. However,
attaching one's identity to a key that the user does not control does attaching one's identity to a key that the user does not control does
not appear to provide substantial leverage to an attacker, so a proof not appear to provide substantial leverage to an attacker, so a proof
of possession is omitted for simplicity. of possession is omitted for simplicity.
5.7.4.2. IdP Well-known URI 5.7.4.2. IdP Well-known URI
skipping to change at page 35, line 28 skipping to change at page 35, line 37
their authentication information (it is bad practice to do this in an their authentication information (it is bad practice to do this in an
IFRAME inside the window because then users have no way to determine IFRAME inside the window because then users have no way to determine
the destination for their password). If the user's browser is the destination for their password). If the user's browser is
configured to prevent popups, this may fail (depending on the exact configured to prevent popups, this may fail (depending on the exact
algorithm that the popup blocker uses to suppress popups). It may be algorithm that the popup blocker uses to suppress popups). It may be
necessary to provide a standardized mechanism to allow the IdP proxy necessary to provide a standardized mechanism to allow the IdP proxy
to request popping of a login window. Note that care must be taken to request popping of a login window. Note that care must be taken
here to avoid PeerConnection becoming a general escape hatch from here to avoid PeerConnection becoming a general escape hatch from
popup blocking. One possibility would be to only allow popups when popup blocking. One possibility would be to only allow popups when
the user has explicitly registered a given IdP as one of theirs (this the user has explicitly registered a given IdP as one of theirs (this
is only relevant at the AP side in any case). This is what is only relevant at the AP side in any case).
WebIntents does, and the problem would go away if WebIntents is used.
5.7.4.5.2. Third Party Cookies 5.7.4.5.2. Third Party Cookies
Some browsers allow users to block third party cookies (cookies Some browsers allow users to block third party cookies (cookies
associated with origins other than the top level page) for privacy associated with origins other than the top level page) for privacy
reasons. Any IdP which uses cookies to persist logins will be broken reasons. Any IdP which uses cookies to persist logins will be broken
by third-party cookie blocking. One option is to accept this as a by third-party cookie blocking. One option is to accept this as a
limitation; another is to have the PeerConnection object disable limitation; another is to have the PeerConnection object disable
third-party cookie blocking for the IdP proxy. third-party cookie blocking for the IdP proxy.
5.8. IANA Considerations
[TODO: IANA registration for Identity header. Or should this be in
MMUSIC?]
6. Acknowledgements 6. Acknowledgements
Bernard Aboba, Harald Alvestrand, Richard Barnes, Dan Druta, Cullen Bernard Aboba, Harald Alvestrand, Richard Barnes, Dan Druta, Cullen
Jennings, Hadriel Kaplan, Matthew Kaufman, Jim McEachern, Martin Jennings, Hadriel Kaplan, Matthew Kaufman, Jim McEachern, Martin
Thomson, Magnus Westerland. Thomson, Magnus Westerland. Matthew Kaufman provided the UI material
in Section 5.5.
7. Changes 7. Changes
7.1. Changes since -05
7.1. Changes since -06
Replaced RTCWEB and RTC-Web with WebRTC, except when referring to the
IETF WG
Forbade use in mixed content as discussed in Orlando.
Added a requirement to surface NULL ciphers to the top-level.
Tried to clarify SRTP versus DTLS-SRTP.
Added a section on screen sharing permissions.
Assorted editorial work.
7.2. Changes since -05
The following changes have been made since the -05 draft. The following changes have been made since the -05 draft.
o Response to comments from Richard Barnes o Response to comments from Richard Barnes
o More explanation of the IdP security properties and the federation o More explanation of the IdP security properties and the federation
use case. use case.
o Editorial cleanup. o Editorial cleanup.
7.2. Changes since -03 7.3. Changes since -03
Version -04 was a version control mistake. Please ignore. Version -04 was a version control mistake. Please ignore.
The following changes have been made since the -04 draft. The following changes have been made since the -04 draft.
o Move origin check from IdP to RP per discussion in YVR. o Move origin check from IdP to RP per discussion in YVR.
o Clarified treatment of X.509-level identities. o Clarified treatment of X.509-level identities.
o Editorial cleanup. o Editorial cleanup.
7.3. Changes since -03 7.4. Changes since -03
7.5. Changes since -02
7.4. Changes since -02
The following changes have been made since the -02 draft. The following changes have been made since the -02 draft.
o Forbid persistent HTTP permissions. o Forbid persistent HTTP permissions.
o Clarified the text in S 5.4 to clearly refer to requirements on o Clarified the text in S 5.4 to clearly refer to requirements on
the API to provide functionality to the site. the API to provide functionality to the site.
o Fold in the IETF portion of draft-rescorla-rtcweb-generic-idp o Fold in the IETF portion of draft-rescorla-rtcweb-generic-idp
o Retarget the continuing consent section to assume Binding Requests o Retarget the continuing consent section to assume Binding Requests
o Added some more privacy and linkage text in various places.
o Editorial improvements o Editorial improvements
8. References 8. References
8.1. Normative References 8.1. Normative References
[I-D.ietf-avtcore-6222bis]
Begen, A., Perkins, C., Wing, D., and E. Rescorla,
"Guidelines for Choosing RTP Control Protocol (RTCP)
Canonical Names (CNAMEs)", draft-ietf-avtcore-6222bis-06
(work in progress), July 2013.
[I-D.ietf-rtcweb-security] [I-D.ietf-rtcweb-security]
Rescorla, E., "Security Considerations for RTC-Web", Rescorla, E., "Security Considerations for RTC-Web",
draft-ietf-rtcweb-security-03 (work in progress), draft-ietf-rtcweb-security-04 (work in progress),
June 2012. January 2013.
[I-D.ietf-tsvwg-sctp-dtls-encaps]
Jesup, R., Loreto, S., Stewart, R., and M. Tuexen, "DTLS
Encapsulation of SCTP Packets for RTCWEB",
draft-ietf-tsvwg-sctp-dtls-encaps-00 (work in progress),
February 2013.
[I-D.muthu-behave-consent-freshness] [I-D.muthu-behave-consent-freshness]
Perumal, M., Wing, D., R, R., and H. Kaplan, "STUN Usage Perumal, M., Wing, D., R, R., and H. Kaplan, "STUN Usage
for Consent Freshness", for Consent Freshness",
draft-muthu-behave-consent-freshness-02 (work in draft-muthu-behave-consent-freshness-03 (work in
progress), January 2013. progress), February 2013.
[RFC2119] Bradner, S., "Key words for use in RFCs to Indicate [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", BCP 14, RFC 2119, March 1997. Requirement Levels", BCP 14, RFC 2119, March 1997.
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000.
[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
Norrman, "The Secure Real-time Transport Protocol (SRTP)",
RFC 3711, March 2004.
[RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security", RFC 4347, April 2006. Security", RFC 4347, April 2006.
[RFC4572] Lennox, J., "Connection-Oriented Media Transport over the
Transport Layer Security (TLS) Protocol in the Session
Description Protocol (SDP)", RFC 4572, July 2006.
[RFC4627] Crockford, D., "The application/json Media Type for [RFC4627] Crockford, D., "The application/json Media Type for
JavaScript Object Notation (JSON)", RFC 4627, July 2006. JavaScript Object Notation (JSON)", RFC 4627, July 2006.
[RFC5245] Rosenberg, J., "Interactive Connectivity Establishment [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment
(ICE): A Protocol for Network Address Translator (NAT) (ICE): A Protocol for Network Address Translator (NAT)
Traversal for Offer/Answer Protocols", RFC 5245, Traversal for Offer/Answer Protocols", RFC 5245,
April 2010. April 2010.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, August 2008.
[RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework
for Establishing a Secure Real-time Transport Protocol for Establishing a Secure Real-time Transport Protocol
(SRTP) Security Context Using Datagram Transport Layer (SRTP) Security Context Using Datagram Transport Layer
Security (DTLS)", RFC 5763, May 2010. Security (DTLS)", RFC 5763, May 2010.
[RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer
Security (DTLS) Extension to Establish Keys for the Secure Security (DTLS) Extension to Establish Keys for the Secure
Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. Real-time Transport Protocol (SRTP)", RFC 5764, May 2010.
[RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454,
December 2011. December 2011.
[webcrypto]
Dahl, Sleevi, "Web Cryptography API", June 2013.
Available at http://www.w3.org/TR/WebCryptoAPI/
[webrtc-api]
Bergkvist, Burnett, Jennings, Narayanan, "WebRTC 1.0:
Real-time Communication Between Browsers", October 2011.
Available at
http://dev.w3.org/2011/webrtc/editor/webrtc.html
8.2. Informative References 8.2. Informative References
[I-D.ietf-rtcweb-jsep] [I-D.ietf-rtcweb-jsep]
Uberti, J. and C. Jennings, "Javascript Session Uberti, J. and C. Jennings, "Javascript Session
Establishment Protocol", draft-ietf-rtcweb-jsep-02 (work Establishment Protocol", draft-ietf-rtcweb-jsep-03 (work
in progress), October 2012. in progress), February 2013.
[I-D.jennings-rtcweb-signaling] [I-D.jennings-rtcweb-signaling]
Jennings, C., Rosenberg, J., and R. Jesup, "RTCWeb Offer/ Jennings, C., Rosenberg, J., and R. Jesup, "RTCWeb Offer/
Answer Protocol (ROAP)", Answer Protocol (ROAP)",
draft-jennings-rtcweb-signaling-01 (work in progress), draft-jennings-rtcweb-signaling-01 (work in progress),
October 2011. October 2011.
[I-D.kaufman-rtcweb-security-ui] [I-D.kaufman-rtcweb-security-ui]
Kaufman, M., "Client Security User Interface Requirements Kaufman, M., "Client Security User Interface Requirements
for RTCWEB", draft-kaufman-rtcweb-security-ui-00 (work in for RTCWEB", draft-kaufman-rtcweb-security-ui-00 (work in
skipping to change at page 38, line 19 skipping to change at page 39, line 32
Layer Security (TLS)", RFC 5705, March 2010. Layer Security (TLS)", RFC 5705, March 2010.
[RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol",
RFC 6455, December 2011. RFC 6455, December 2011.
[XmlHttpRequest] [XmlHttpRequest]
van Kesteren, A., "XMLHttpRequest Level 2". van Kesteren, A., "XMLHttpRequest Level 2".
Appendix A. Example IdP Bindings to Specific Protocols Appendix A. Example IdP Bindings to Specific Protocols
[[TODO: These still need some cleanup.]]
This section provides some examples of how the mechanisms described This section provides some examples of how the mechanisms described
in this document could be used with existing authentication protocols in this document could be used with existing authentication protocols
such as BrowserID or OAuth. Note that this does not require browser- such as BrowserID or OAuth. Note that this does not require browser-
level support for either protocol. Rather, the protocols can be fit level support for either protocol. Rather, the protocols can be fit
into the generic framework. (Though BrowserID in particular works into the generic framework. (Though BrowserID in particular works
better with some client side support). better with some client side support).
A.1. BrowserID A.1. BrowserID
BrowserID [https://browserid.org/] is a technology which allows a BrowserID [https://browserid.org/] is a technology which allows a
user with a verified email address to generate an assertion user with a verified email address to generate an assertion
(authenticated by their identity provider) attesting to their (authenticated by their identity provider) attesting to their
identity (phrased as an email address). The way that this is used in identity (phrased as an email address). The way that this is used in
practice is that the relying party embeds JS in their site which practice is that the relying party embeds JS in their site which
talks to the BrowserID code (either hosted on a trusted intermediary talks to the BrowserID code (either hosted on a trusted intermediary
or embedded in the browser). That code generates the assertion which or embedded in the browser). That code generates the assertion which
is passed back to the relying party for verification. The assertion is passed back to the relying party for verification. The assertion
can be verified directly or with a Web service provided by the can be verified directly or with a Web service provided by the
identity provider. It's relatively easy to extend this functionality identity provider. It's relatively easy to extend this functionality
to authenticate RTCWEB calls, as shown below. to authenticate WebRTC calls, as shown below.
+----------------------+ +----------------------+ +----------------------+ +----------------------+
| | | | | | | |
| Alice's Browser | | Bob's Browser | | Alice's Browser | | Bob's Browser |
| | OFFER ------------> | | | | OFFER ------------> | |
| Calling JS Code | | Calling JS Code | | Calling JS Code | | Calling JS Code |
| ^ | | ^ | | ^ | | ^ |
| | | | | | | | | | | |
| v | | v | | v | | v |
| PeerConnection | | PeerConnection | | PeerConnection | | PeerConnection |
skipping to change at page 39, line 49 skipping to change at page 41, line 4
1. The calling JS instantiates a PeerConnection and tells it that it 1. The calling JS instantiates a PeerConnection and tells it that it
is interested in having it authenticated via BrowserID (i.e., it is interested in having it authenticated via BrowserID (i.e., it
provides "browserid.org" as the IdP name.) provides "browserid.org" as the IdP name.)
2. The PeerConnection instantiates the BrowserID signer in the IdP 2. The PeerConnection instantiates the BrowserID signer in the IdP
proxy proxy
3. The BrowserID signer contacts Alice's identity provider, 3. The BrowserID signer contacts Alice's identity provider,
authenticating as Alice (likely via a cookie). authenticating as Alice (likely via a cookie).
4. The identity provider returns a short-term certificate attesting 4. The identity provider returns a short-term certificate attesting
to Alice's identity and her short-term public key. to Alice's identity and her short-term public key.
5. The Browser-ID code signs the fingerprint and returns the signed 5. The Browser-ID code signs the fingerprint and returns the signed
assertion + certificate to the PeerConnection. assertion + certificate to the PeerConnection.
6. The PeerConnection returns the signed information to the calling 6. The PeerConnection returns the signed information to the calling
JS code. JS code.
7. The signed assertion gets sent over the wire to Bob's browser 7. The signed assertion gets sent over the wire to Bob's browser
(via the signaling service) as part of the call setup. (via the signaling service) as part of the call setup.
Obviously, the format of the signed assertion varies depending on The offer might look something like:
what signaling style the WG ultimately adopts. However, for
concreteness, if something like ROAP were adopted, then the entire
message might look like:
{ {
"messageType":"OFFER", "type":"OFFER",
"callerSessionId":"13456789ABCDEF", "sdp":
"seq": 1 "v=0\n
"sdp":"
v=0\n
o=- 2890844526 2890842807 IN IP4 192.0.2.1\n o=- 2890844526 2890842807 IN IP4 192.0.2.1\n
s= \n s= \n
c=IN IP4 192.0.2.1\n c=IN IP4 192.0.2.1\n
t=2873397496 2873404696\n t=2873397496 2873404696\n
m=audio 49170 RTP/AVP 0\n m=audio 49170 RTP/AVP 0\n
a=fingerprint: SHA-1 \ a=fingerprint: SHA-1 \
a=identity [[base-64 encoding of...
4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB\n", 4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB\n",
"identity":{ "identity":{
"idp":{ // Standardized "idp":{ // Standardized
"domain":"browserid.org", "domain":"browserid.org",
"method":"default" "method":"default"
}, },
"assertion": // Contents are browserid-specific "assertion": // Contents are browserid-specific
"\"assertion\": { "\"assertion\": {
\"digest\":\"<hash of the contents from the browser>\", \"digest\":\"<hash of the contents from the browser>\",
\"audience\": \"[TBD]\" \"audience\": \"[TBD]\"
\"valid-until\": 1308859352261, \"valid-until\": 1308859352261,
}, },
\"certificate\": { \"certificate\": {
\"email\": \"rescorla@example.org\", \"email\": \"rescorla@example.org\",
\"public-key\": \"<ekrs-public-key>\", \"public-key\": \"<ekrs-public-key>\",
\"valid-until\": 1308860561861, \"valid-until\": 1308860561861,
}" // certificate is signed by example.org }" // certificate is signed by example.org
} }]]"
} }
Note that while the IdP here is specified as "browserid.org", the Note that while the IdP here is specified as "browserid.org", the
actual certificate is signed by example.org. This is because actual certificate is signed by example.org. This is because
BrowserID is a combined authoritative/third-party system in which BrowserID is a combined authoritative/third-party system in which
browserid.org delegates the right to be authoritative (what BrowserID browserid.org delegates the right to be authoritative (what BrowserID
calls primary) to individual domains. calls primary) to individual domains.
On Bob's side, he receives the signed assertion as part of the call On Bob's side, he receives the signed assertion as part of the call
setup message and a similar procedure happens to verify it. setup message and a similar procedure happens to verify it.
skipping to change at page 41, line 28 skipping to change at page 42, line 25
that Alice is on the other end of the call. that Alice is on the other end of the call.
When Bob returns his answer, he follows the converse procedure, which When Bob returns his answer, he follows the converse procedure, which
provides Alice with a signed assertion of Bob's identity and keying provides Alice with a signed assertion of Bob's identity and keying
material. material.
A.2. OAuth A.2. OAuth
While OAuth is not directly designed for user-to-user authentication, While OAuth is not directly designed for user-to-user authentication,
with a little lateral thinking it can be made to serve. We use the with a little lateral thinking it can be made to serve. We use the
following mapping of OAuth concepts to RTCWEB concepts: following mapping of OAuth concepts to WebRTC concepts:
+----------------------+----------------------+ +----------------------+----------------------+
| OAuth | RTCWEB | | OAuth | WebRTC |
+----------------------+----------------------+ +----------------------+----------------------+
| Client | Relying party | | Client | Relying party |
| Resource owner | Authenticating party | | Resource owner | Authenticating party |
| Authorization server | Identity service | | Authorization server | Identity service |
| Resource server | Identity service | | Resource server | Identity service |
+----------------------+----------------------+ +----------------------+----------------------+
Table 1 Table 1
The idea here is that when Alice wants to authenticate to Bob (i.e., The idea here is that when Alice wants to authenticate to Bob (i.e.,
 End of changes. 93 change blocks. 
217 lines changed or deleted 307 lines changed or added

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