draft-ietf-rtcweb-security-arch-12.txt   draft-ietf-rtcweb-security-arch-13.txt 
RTCWEB E. Rescorla RTCWEB E. Rescorla
Internet-Draft RTFM, Inc. Internet-Draft RTFM, Inc.
Intended status: Standards Track June 8, 2016 Intended status: Standards Track October 30, 2017
Expires: December 10, 2016 Expires: May 3, 2018
WebRTC Security Architecture WebRTC Security Architecture
draft-ietf-rtcweb-security-arch-12 draft-ietf-rtcweb-security-arch-13
Abstract Abstract
The Real-Time Communications on the Web (RTCWEB) working group is This document defines the security architecture for WebRTC, a
tasked with standardizing protocols for enabling real-time protocol suite intended for use with real-time applications that can
communications within user-agents using web technologies (commonly be deployed in browsers - "real time communication on the Web".
called "WebRTC"). This document defines the security architecture
for WebRTC.
Status of This Memo Status of This Memo
This Internet-Draft is submitted in full conformance with the This Internet-Draft is submitted in full conformance with the
provisions of BCP 78 and BCP 79. provisions of BCP 78 and BCP 79.
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on December 10, 2016. This Internet-Draft will expire on May 3, 2018.
Copyright Notice Copyright Notice
Copyright (c) 2016 IETF Trust and the persons identified as the Copyright (c) 2017 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 2, line 32 skipping to change at page 2, line 32
3.1. Authenticated Entities . . . . . . . . . . . . . . . . . 5 3.1. Authenticated Entities . . . . . . . . . . . . . . . . . 5
3.2. Unauthenticated Entities . . . . . . . . . . . . . . . . 6 3.2. Unauthenticated Entities . . . . . . . . . . . . . . . . 6
4. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6 4. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 6
4.1. Initial Signaling . . . . . . . . . . . . . . . . . . . . 8 4.1. Initial Signaling . . . . . . . . . . . . . . . . . . . . 8
4.2. Media Consent Verification . . . . . . . . . . . . . . . 10 4.2. Media Consent Verification . . . . . . . . . . . . . . . 10
4.3. DTLS Handshake . . . . . . . . . . . . . . . . . . . . . 11 4.3. DTLS Handshake . . . . . . . . . . . . . . . . . . . . . 11
4.4. Communications and Consent Freshness . . . . . . . . . . 11 4.4. Communications and Consent Freshness . . . . . . . . . . 11
5. Detailed Technical Description . . . . . . . . . . . . . . . 12 5. Detailed Technical Description . . . . . . . . . . . . . . . 12
5.1. Origin and Web Security Issues . . . . . . . . . . . . . 12 5.1. Origin and Web Security Issues . . . . . . . . . . . . . 12
5.2. Device Permissions Model . . . . . . . . . . . . . . . . 12 5.2. Device Permissions Model . . . . . . . . . . . . . . . . 12
5.3. Communications Consent . . . . . . . . . . . . . . . . . 15 5.3. Communications Consent . . . . . . . . . . . . . . . . . 14
5.4. IP Location Privacy . . . . . . . . . . . . . . . . . . . 15 5.4. IP Location Privacy . . . . . . . . . . . . . . . . . . . 14
5.5. Communications Security . . . . . . . . . . . . . . . . . 16 5.5. Communications Security . . . . . . . . . . . . . . . . . 15
5.6. Web-Based Peer Authentication . . . . . . . . . . . . . . 18 5.6. Web-Based Peer Authentication . . . . . . . . . . . . . . 17
5.6.1. Trust Relationships: IdPs, APs, and RPs . . . . . . . 19 5.6.1. Trust Relationships: IdPs, APs, and RPs . . . . . . . 18
5.6.2. Overview of Operation . . . . . . . . . . . . . . . . 20 5.6.2. Overview of Operation . . . . . . . . . . . . . . . . 20
5.6.3. Items for Standardization . . . . . . . . . . . . . . 22 5.6.3. Items for Standardization . . . . . . . . . . . . . . 21
5.6.4. Binding Identity Assertions to JSEP Offer/Answer 5.6.4. Binding Identity Assertions to JSEP Offer/Answer
Transactions . . . . . . . . . . . . . . . . . . . . 22 Transactions . . . . . . . . . . . . . . . . . . . . 21
5.6.4.1. Carrying Identity Assertions . . . . . . . . . . 23 5.6.4.1. Carrying Identity Assertions . . . . . . . . . . 22
5.6.4.2. a=identity Attribute . . . . . . . . . . . . . . 23 5.6.4.2. a=identity Attribute . . . . . . . . . . . . . . 23
5.6.5. Determining the IdP URI . . . . . . . . . . . . . . . 24 5.6.5. Determining the IdP URI . . . . . . . . . . . . . . . 23
5.6.5.1. Authenticating Party . . . . . . . . . . . . . . 25 5.6.5.1. Authenticating Party . . . . . . . . . . . . . . 24
5.6.5.2. Relying Party . . . . . . . . . . . . . . . . . . 25 5.6.5.2. Relying Party . . . . . . . . . . . . . . . . . . 25
5.6.6. Requesting Assertions . . . . . . . . . . . . . . . . 25 5.6.6. Requesting Assertions . . . . . . . . . . . . . . . . 25
5.6.7. Managing User Login . . . . . . . . . . . . . . . . . 27 5.6.7. Managing User Login . . . . . . . . . . . . . . . . . 26
5.7. Verifying Assertions . . . . . . . . . . . . . . . . . . 27 5.7. Verifying Assertions . . . . . . . . . . . . . . . . . . 26
5.7.1. Identity Formats . . . . . . . . . . . . . . . . . . 28 5.7.1. Identity Formats . . . . . . . . . . . . . . . . . . 27
6. Security Considerations . . . . . . . . . . . . . . . . . . . 28 6. Security Considerations . . . . . . . . . . . . . . . . . . . 28
6.1. Communications Security . . . . . . . . . . . . . . . . . 29 6.1. Communications Security . . . . . . . . . . . . . . . . . 28
6.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 30 6.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 29
6.3. Denial of Service . . . . . . . . . . . . . . . . . . . . 30 6.3. Denial of Service . . . . . . . . . . . . . . . . . . . . 29
6.4. IdP Authentication Mechanism . . . . . . . . . . . . . . 31 6.4. IdP Authentication Mechanism . . . . . . . . . . . . . . 31
6.4.1. PeerConnection Origin Check . . . . . . . . . . . . . 32 6.4.1. PeerConnection Origin Check . . . . . . . . . . . . . 31
6.4.2. IdP Well-known URI . . . . . . . . . . . . . . . . . 32 6.4.2. IdP Well-known URI . . . . . . . . . . . . . . . . . 31
6.4.3. Privacy of IdP-generated identities and the hosting 6.4.3. Privacy of IdP-generated identities and the hosting
site . . . . . . . . . . . . . . . . . . . . . . . . 32 site . . . . . . . . . . . . . . . . . . . . . . . . 32
6.4.4. Security of Third-Party IdPs . . . . . . . . . . . . 33 6.4.4. Security of Third-Party IdPs . . . . . . . . . . . . 32
6.4.5. Web Security Feature Interactions . . . . . . . . . . 33 6.4.5. Web Security Feature Interactions . . . . . . . . . . 32
6.4.5.1. Popup Blocking . . . . . . . . . . . . . . . . . 33 6.4.5.1. Popup Blocking . . . . . . . . . . . . . . . . . 32
6.4.5.2. Third Party Cookies . . . . . . . . . . . . . . . 33 6.4.5.2. Third Party Cookies . . . . . . . . . . . . . . . 33
7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 34 7. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 33
8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 34 8. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 33
9. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 9. Changes . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
9.1. Changes since -10 . . . . . . . . . . . . . . . . . . . . 34 9.1. Changes since -10 . . . . . . . . . . . . . . . . . . . . 33
9.2. Changes since -06 . . . . . . . . . . . . . . . . . . . . 34 9.2. Changes since -06 . . . . . . . . . . . . . . . . . . . . 34
9.3. Changes since -05 . . . . . . . . . . . . . . . . . . . . 35 9.3. Changes since -05 . . . . . . . . . . . . . . . . . . . . 34
9.4. Changes since -03 . . . . . . . . . . . . . . . . . . . . 35 9.4. Changes since -03 . . . . . . . . . . . . . . . . . . . . 34
9.5. Changes since -03 . . . . . . . . . . . . . . . . . . . . 35 9.5. Changes since -03 . . . . . . . . . . . . . . . . . . . . 34
9.6. Changes since -02 . . . . . . . . . . . . . . . . . . . . 35 9.6. Changes since -02 . . . . . . . . . . . . . . . . . . . . 34
10. References . . . . . . . . . . . . . . . . . . . . . . . . . 36 10. References . . . . . . . . . . . . . . . . . . . . . . . . . 35
10.1. Normative References . . . . . . . . . . . . . . . . . . 36 10.1. Normative References . . . . . . . . . . . . . . . . . . 35
10.2. Informative References . . . . . . . . . . . . . . . . . 38 10.2. Informative References . . . . . . . . . . . . . . . . . 38
Appendix A. Example IdP Bindings to Specific Protocols . . . . . 39 Appendix A. Example IdP Bindings to Specific Protocols . . . . . 38
A.1. BrowserID . . . . . . . . . . . . . . . . . . . . . . . . 39 A.1. OAuth . . . . . . . . . . . . . . . . . . . . . . . . . . 39
A.2. OAuth . . . . . . . . . . . . . . . . . . . . . . . . . . 42 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 40
Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 43
1. Introduction 1. Introduction
The Real-Time Communications on the Web (WebRTC) 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 WebRTC 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) WebRTC communications are directly based[RFC3261] soft phones) WebRTC communications are directly
controlled by some Web server, via a JavaScript (JS) API as shown in controlled by some Web server, via a JavaScript (JS) API as shown in
skipping to change at page 5, line 28 skipping to change at page 5, line 28
Conversely, if the browser is compromised, then no security Conversely, if the browser is compromised, then no security
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 can be granted permissions to access sensitive resources, and those
which cannot be authenticated and thus are untrusted. which cannot be authenticated and thus are untrusted.
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, and can infer restricted network, such as behind a firewall, and can infer
authentication from firewall behavior). authentication from firewall behavior).
skipping to change at page 6, line 9 skipping to change at page 6, line 9
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. Additionally, sometimes we need to and how much to trust them. Additionally, sometimes we need to
identify the communicating peer before we know what policies to identify the communicating peer before we know what policies to
apply. apply.
It's also worth noting that there are settings where authentication
is non-cryptographic, such as other machines behind a firewall.
Naturally, the level of trust one can have in identities verified in
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
mean that it is not possible to have any interaction with them, but mean that it is not possible to have any interaction with them, but
it means that we must assume that they will behave maliciously and it means that we must assume that they will behave maliciously and
design a system which is secure even if they do so. design a system which is secure even if they do so.
4. Overview 4. Overview
skipping to change at page 6, line 41 skipping to change at page 6, line 36
recognize the tension between security (or performance) and privacy. recognize the tension between security (or performance) and privacy.
The example shown here is aimed towards settings where we are more The example shown here is aimed towards settings where we are more
concerned about secure calling than about privacy, but as we shall concerned about secure calling than about privacy, but as we shall
see, there are settings where one might wish to make different see, there are settings where one might wish to make different
tradeoffs--this architecture is still compatible with those settings. tradeoffs--this architecture is still compatible with those settings.
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 Connect) 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. Alice overview of Identity Providers and the relevant terminology. Alice
and Bob might have relationships with different IdPs as well. 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
skipping to change at page 8, line 45 skipping to change at page 8, line 43
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
access permissions till later). They are both connected to the access permissions till later). They are both connected to the
calling service via HTTPS and so know the origin with some level of calling service via HTTPS and so know the origin with some level of
confidence. They also have accounts with some identity provider. confidence. They also have accounts with some identity provider.
This sort of identity service is becoming increasingly common in the This sort of identity service is becoming increasingly common in the
Web environment (with technologies such as BrowserID, Federated Web environment (with technologies such as Federated Google Login,
Google Login, Facebook Connect, OAuth, OpenID, WebFinger), and is Facebook Connect, OAuth, OpenID, WebFinger), and is often provided as
often provided as a side effect service of a user's ordinary accounts a side effect service of a user's ordinary accounts with some
with some service. In this example, we show Alice and Bob using a service. In this example, we show Alice and Bob using a separate
separate identity service, though the identity service may be the identity service, though the identity service may be the same entity
same entity as the calling service or there may be no identity as the calling service or there may be no identity service at all.
service at all.
Alice is logged onto the calling service and decides to call Bob. 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 She 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 calling service presents a JS UI in the form of a button next to
Bob's name which says "Call". Alice clicks the button, which Bob's name which says "Call". Alice clicks the button, which
initiates a JS callback that instantiates a PeerConnection object. initiates a JS callback that instantiates a PeerConnection object.
This does not require a security check: JS from any origin is allowed This does not require a security check: JS from any origin is allowed
to get this far. to get this far.
Once the PeerConnection is created, the calling service JS needs to Once the PeerConnection is created, the calling service JS needs to
skipping to change at page 9, line 38 skipping to change at page 9, line 34
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 an
BrowserID assertion. The assertion may bind other information to the OAuth token. 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]. preferably over TLS [XmlHttpRequest] or by WebSockets [RFC6455]. preferably over TLS
[RFC5246]. The signaling server processes the message from Alice's [RFC5246]. The signaling server processes the message from Alice's
browser, determines that this is a call to Bob and sends a signaling browser, determines that this is a call to Bob and sends a signaling
message to Bob's browser (again, the format is currently undefined). message to Bob's browser (again, the format is currently undefined).
The JS on Bob's browser processes it, and alerts Bob to the incoming The JS on Bob's browser processes it, and alerts Bob to the incoming
call and to Alice's identity. In this case, Alice has provided an call and to Alice's identity. In this case, Alice has provided an
skipping to change at page 11, line 13 skipping to change at page 11, line 11
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 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 or checks have completed], Alice and Bob can set up a secure channel or
channels. This is performed via DTLS [RFC4347] (for the data channels. This is performed via DTLS [RFC4347] and DTLS-SRTP
channel) and DTLS-SRTP [RFC5763] keying for SRTP [RFC3711] for the [RFC5763] keying for SRTP [RFC3711] for the media channel and SCTP
media channel and SCTP over DTLS [I-D.ietf-tsvwg-sctp-dtls-encaps] over DTLS [I-D.ietf-tsvwg-sctp-dtls-encaps] for data channels.
for data channels. Specifically, Alice and Bob perform a DTLS Specifically, Alice and Bob perform a DTLS handshake on every channel
handshake on every channel which has been established by ICE. The which has been established by ICE. The total number of channels
total number of channels depends on the amount of muxing; in the most depends on the amount of muxing; in the most likely case we are using
likely case we are using both RTP/RTCP mux and muxing multiple media both RTP/RTCP mux and muxing multiple media streams on the same
streams on the same channel, in which case there is only one DTLS channel, in which case there is only one DTLS handshake. Once the
handshake. Once the DTLS handshake has completed, the keys are DTLS handshake has completed, the keys are exported [RFC5705] and
exported [RFC5705] and used to key SRTP for the media channels. 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 their 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
skipping to change at page 12, line 48 skipping to change at page 12, line 46
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.
Because HTTP origins cannot be securely established against network Because HTTP origins cannot be securely established against network
attackers, implementations MUST NOT allow the setting of permanent attackers, implementations MUST NOT allow the setting of permanent
access permissions for HTTP origins. Implementations MAY also opt to access permissions for HTTP origins. Implementations MUST refuse all
refuse all permissions grants for HTTP origins, but it is RECOMMENDED permissions grants for HTTP origins.
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. Note that handshake) as being associated with the stated identity. Note that
it is unlikely that browsers would have an X.509 certificate, but it is unlikely that browsers would have an X.509 certificate, but
servers might. Browsers servicing such requests SHOULD clearly servers might. Browsers servicing such requests SHOULD clearly
indicate that identity to the user when asking for permission. The indicate that identity to the user when asking for permission. The
idea behind this type of permissions is that a user might have a idea behind this type of permissions is that a user might have a
fairly narrow list of peers he is willing to communicate with, e.g., fairly narrow list of peers he is willing to communicate with, e.g.,
"my mother" rather than "anyone on Facebook". Narrow permissions "my mother" rather than "anyone on Facebook". Narrow permissions
grants allow the browser to do that enforcement. 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
requesting. This allows the browser client to know what sort of
user interface experience to provide to the user, including what
permissions to request from the user and hence what to enforce
later. For instance, browsers might display a non-invasive door
hanger ("some features of this site may not work..." when asking
for long-term permissions) but a more invasive UI ("here is your
own video") for single-call permissions. The API MAY grant weaker
permissions than the JS asked for if the user chooses to authorize
only those permissions, but if it intends to grant stronger ones
it SHOULD display the appropriate UI for those permissions and
MUST clearly indicate what permissions are being requested.
API Requirement: The API MUST provide a mechanism for the requesting
JS to relinquish the ability to see or modify the media (e.g., via JS to relinquish the ability to see or modify the media (e.g., via
MediaStream.record()). Combined with secure authentication of the MediaStream.record()). Combined with secure authentication of the
communicating peer, this allows a user to be sure that the calling communicating peer, this allows a user to be sure that the calling
site is not accessing or modifying their conversion. site is not accessing or modifying their conversion.
UI Requirement: The UI MUST clearly indicate when the user's camera UI Requirement: The UI MUST clearly indicate when the user's camera
and microphone are in use. This indication MUST NOT be and microphone are in use. This indication MUST NOT be
suppressable by the JS and MUST clearly indicate how to terminate suppressable by the JS and MUST clearly indicate how to terminate
device access, and provide a UI means to immediately stop camera/ device access, and provide a UI means to immediately stop camera/
microphone input without the JS being able to prevent it. microphone input without the JS being able to prevent it.
skipping to change at page 14, line 4 skipping to change at page 13, line 33
and microphone are in use. This indication MUST NOT be and microphone are in use. This indication MUST NOT be
suppressable by the JS and MUST clearly indicate how to terminate suppressable by the JS and MUST clearly indicate how to terminate
device access, and provide a UI means to immediately stop camera/ device access, and provide a UI means to immediately stop camera/
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 o Browsers MUST not permit permanent screen or application sharing
permissions to be installed as a response to a JS request for permissions to be installed as a response to a JS request for
permissions. Instead, they must require some other user action permissions. Instead, they must require some other user action
such as a permissions setting or an application install experience such as a permissions setting or an application install experience
to grant permission to a site. to grant permission to a site.
o Browsers MUST provide a separate dialog request for screen/ o Browsers MUST provide a separate dialog request for screen/
application sharing permissions even if the media request is made application sharing permissions even if the media request is made
at the same time as camera and microphone. at the same time as camera and microphone.
o The browser MUST indicate any windows which are currently being o The browser MUST indicate any windows which are currently being
shared in some unambiguous way. Windows which are not visible shared in some unambiguous way. Windows which are not visible
MUST not be shared even if the application is being shared. If MUST not be shared even if the application is being shared. If
the screen is being shared, then that MUST be indicated. 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 communicating peers. Specifically, the implementation to specific communicating peers. Specifically, the implementation
SHOULD provide the following interfaces/controls: SHOULD provide the following interfaces/controls:
skipping to change at page 15, line 33 skipping to change at page 15, line 4
requires that implementations respond to such requests, so this requires that implementations respond to such requests, so this
approach is maximally compatible. A separate document will profile approach is maximally compatible. A separate document will profile
the ICE timers to be used; see [I-D.muthu-behave-consent-freshness]. the ICE 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.
This has negative privacy consequences in some circumstances. The This has negative privacy consequences in some circumstances. The
API requirements in this section are intended to mitigate this issue. API requirements in this section are intended to mitigate this issue.
Note that these requirements are NOT intended to protect the user's Note that these requirements are NOT intended to protect the user's
IP address from a malicious site. In general, the site will learn at IP address from a malicious site. In general, the site will learn at
least a user's server reflexive address from any HTTP transaction. least a user's server reflexive address from any HTTP transaction.
Rather, these requirements are intended to allow a site to cooperate Rather, these requirements are intended to allow a site to cooperate
with the user to hide the user's IP address from the other side of with the user to hide the user's IP address from the other side of
the call. Hiding the user's IP address from the server requires some the call. Hiding the user's IP address from the server requires some
sort of explicit privacy preserving mechanism on the client (e.g., sort of explicit privacy preserving mechanism on the client (e.g.,
Torbutton [https://www.torproject.org/torbutton/]) and is out of Tor Browser [https://www.torproject.org/projects/torbrowser.html.en])
scope for this specification. and is out of scope for this 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
skipping to change at page 16, line 34 skipping to change at page 16, line 7
the JS, or there needs to be browser support to set the "TURN-only" the JS, or there needs to be browser support to set the "TURN-only"
policy regardless of the site's preferences. policy regardless of the site's preferences.
5.5. Communications Security 5.5. Communications Security
Implementations MUST implement SRTP [RFC3711]. Implementations MUST Implementations MUST implement SRTP [RFC3711]. Implementations MUST
implement DTLS [RFC4347] and DTLS-SRTP [RFC5763][RFC5764] for SRTP implement DTLS [RFC4347] and DTLS-SRTP [RFC5763][RFC5764] for SRTP
keying. Implementations MUST implement keying. Implementations MUST implement
[I-D.ietf-tsvwg-sctp-dtls-encaps]. [I-D.ietf-tsvwg-sctp-dtls-encaps].
All media channels MUST be secured via SRTP. Media traffic MUST NOT All media channels MUST be secured via SRTP and SRTCP. Media traffic
be sent over plain (unencrypted) RTP; that is, implementations MUST MUST NOT be sent over plain (unencrypted) RTP or RTCP; that is,
NOT negotiate cipher suites with NULL encryption modes. DTLS-SRTP implementations MUST NOT negotiate cipher suites with NULL encryption
MUST be offered for every media channel. WebRTC implementations MUST modes. DTLS-SRTP MUST be offered for every media channel. WebRTC
NOT offer SDES or select it if offered. implementations MUST NOT offer SDP Security Descriptions [RFC4568] or
select it if offered. A SRTP MKI MUST NOT be used.
All data channels MUST be secured via DTLS. All data channels MUST be secured via DTLS.
All implementations MUST implement DTLS 1.0, with the cipher suite All implementations MUST implement DTLS 1.0, with the cipher suite
TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA with the the P-256 curve TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA with the the P-256 curve
[FIPS186]. The DTLS-SRTP protection profile [FIPS186]. The DTLS-SRTP protection profile
SRTP_AES128_CM_HMAC_SHA1_80 MUST be supported for SRTP. SRTP_AES128_CM_HMAC_SHA1_80 MUST be supported for SRTP.
Implementations SHOULD implement DTLS 1.2 with the Implementations SHOULD implement DTLS 1.2 with the
TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cipher suite. TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256 cipher suite.
Implementations MUST favor cipher suites which support PFS over non- Implementations MUST favor cipher suites which support PFS over non-
PFS cipher suites and SHOULD favor AEAD over non-AEAD cipher suites. PFS cipher suites and SHOULD favor AEAD over non-AEAD cipher suites.
Implementations MUST NOT implement DTLS renegotiation and MUST reject
it with an appropriate alert ("no_renegotiation" for TLS 1.2) if
offered.
API Requirement: The API MUST generate a new authentication key pair API Requirement: The API MUST generate a new authentication key pair
for every new call by default. This is intended to allow for for every new call by default. This is intended to allow for
unlinkability. unlinkability.
API Requirement: The API MUST provide a means to reuse a key pair API Requirement: The API MUST provide a means to reuse a key pair
for calls. This can be used to enable key continuity-based for calls. This can be used to enable key continuity-based
authentication, and could be used to amortize key generation authentication, and could be used to amortize key generation
costs. costs.
API Requirement: Unless the user specifically configures an external API Requirement: Unless the user specifically configures an external
skipping to change at page 17, line 37 skipping to change at page 17, line 13
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
whether the cryptographic keys were delivered out-of-band (from
a server) or were generated as a result of a pairwise
negotiation.
* If the far endpoint was directly verified, either via a third- * If the far endpoint was directly verified, either via a third-
party verifiable X.509 certificate or via a Web IdP mechanism party verifiable X.509 certificate or via a Web IdP mechanism
(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:
skipping to change at page 18, line 32 skipping to change at page 17, line 47
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 identify the endpoint on the other browser) to be able to directly identify the endpoint on the other
side without trusting the signaling service to which they are side without trusting the signaling service to which they are
connected. For instance, users may be making a call via a federated connected. For instance, users may be making a call via a federated
system where they wish to get direct authentication of the other system where they wish to get direct authentication of the other
side. Alternately, they may be making a call on a site which they side. Alternately, they may be making a call on a site which they
minimally trust (such as a poker site) but to someone who has an minimally trust (such as a poker site) but to someone who has an
identity on a site they do trust (such as a social network.) identity on a site they do trust (such as a social network.)
Recently, a number of Web-based identity technologies (OAuth, Recently, a number of Web-based identity technologies (OAuth,
BrowserID, Facebook Connect etc.) have been developed. While the Facebook Connect etc.) have been developed. While the details vary,
details vary, what these technologies share is that they have a Web- what these technologies share is that they have a Web-based (i.e.,
based (i.e., HTTP/HTTPS) identity provider which attests to your HTTP/HTTPS) identity provider which attests to your identity. For
identity. For instance, if I have an account at example.org, I could instance, if I have an account at example.org, I could use the
use the example.org identity provider to prove to others that I was example.org identity provider to prove to others that I was
alice@example.org. The development of these technologies allows us alice@example.org. The development of these technologies allows us
to separate calling from identity provision: I could call you on to separate calling from identity provision: I could call you on
Poker Galaxy but identify myself as alice@example.org. Poker Galaxy but identify myself as alice@example.org.
Whatever the underlying technology, the general principle is that the Whatever the underlying technology, the general principle is that the
party which is being authenticated is NOT the signaling site but party which is being authenticated is NOT the signaling site but
rather the user (and their browser). Similarly, the relying party is rather the user (and their browser). Similarly, the relying party is
the browser and not the signaling site. Thus, the browser MUST the browser and not the signaling site. Thus, the browser MUST
securely generate the input to the IdP assertion process and MUST generate the input to the IdP assertion process and display the
securely display the results of the verification process to the user results of the verification process to the user in a way which cannot
in a way which cannot be imitated by the calling site. be imitated by the calling site.
The mechanisms defined in this document do not require the browser to The mechanisms defined in this document do not require the browser to
implement any particular identity protocol or to support any implement any particular identity protocol or to support any
particular IdP. Instead, this document provides a generic interface particular IdP. Instead, this document provides a generic interface
which any IdP can implement. Thus, new IdPs and protocols can be which any IdP can implement. Thus, new IdPs and protocols can be
introduced without change to either the browser or the calling introduced without change to either the browser or the calling
service. This avoids the need to make a commitment to any particular service. This avoids the need to make a commitment to any particular
identity protocol, although browsers may opt to directly implement identity protocol, although browsers may opt to directly implement
some identity protocols in order to provide superior performance or some identity protocols in order to provide superior performance or
UI properties. UI properties.
skipping to change at page 22, line 46 skipping to change at page 22, line 18
"digest": "4A:AD:B9:B1:3F:...:E5:7C:AB" "digest": "4A:AD:B9:B1:3F:...:E5:7C:AB"
}, { }, {
"algorithm": "sha-1", "algorithm": "sha-1",
"digest": "74:E9:76:C8:19:...:F4:45:6B" "digest": "74:E9:76:C8:19:...:F4:45:6B"
} ] } ]
} }
The "fingerprint" value is an array of objects. Each object in the The "fingerprint" value is an array of objects. Each object in the
array contains "algorithm" and "digest" values, which correspond array contains "algorithm" and "digest" values, which correspond
directly to the algorithm and digest values in the "a=fingerprint" directly to the algorithm and digest values in the "a=fingerprint"
line of the SDP [RFC4572]. line of the SDP [RFC8122].
This object is encoded in a JSON [RFC4627] string for passing to the This object is encoded in a JSON [RFC4627] string for passing to the
IdP. IdP.
This structure does not need to be interpreted by the IdP or the IdP 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 merely 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 parameters treats it as an opaque value to be attested to. Thus, new parameters
can be added to the assertion without modifying the IdP. can be added to the assertion without modifying the IdP.
5.6.4.1. Carrying Identity Assertions 5.6.4.1. Carrying Identity Assertions
skipping to change at page 29, line 7 skipping to change at page 28, line 23
Much of the security analysis of this problem is contained in Much of the security analysis of this problem is contained in
[I-D.ietf-rtcweb-security] or in the discussion of the particular [I-D.ietf-rtcweb-security] or in the discussion of the particular
issues above. In order to avoid repetition, this section focuses on issues above. In order to avoid repetition, this section focuses on
(a) residual threats that are not addressed by this document and (b) (a) residual threats that are not addressed by this document and (b)
threats produced by failure/misbehavior of one of the components in threats produced by failure/misbehavior of one of the components in
the system. the system.
6.1. Communications Security 6.1. Communications Security
While this document favors DTLS-SRTP, it permits a variety of IF HTTPS is not used to secure communications to the signaling
communications security mechanisms and thus the level of server, and the identity mechanism used in Section 5.6 is not used,
communications security actually provided varies considerably. Any then any on-path attacker can replace the DTLS-SRTP fingerprints in
pair of implementations which have multiple security mechanisms in the handshake and thus substitute its own identity for that of either
common are subject to being downgraded to the weakest of those common endpoint.
mechanisms by any attacker who can modify the signaling traffic. If
communications are over HTTP, this means any on-path attacker. If
communications are over HTTPS, this means the signaling server.
Implementations which wish to avoid downgrade attack should only
offer the strongest available mechanism, which is DTLS/DTLS-SRTP.
Note that the implication of this choice will be that interop to non-
DTLS-SRTP devices will need to happen through gateways.
Even if only DTLS/DTLS-SRTP are used, the signaling server can Even if HTTPS is used, the signaling server can potentially mount a
potentially mount a man-in-the-middle attack unless implementations man-in-the-middle attack unless implementations have some mechanism
have some mechanism for independently verifying keys. The UI for independently verifying keys. The UI requirements in Section 5.5
requirements in Section 5.5 are designed to provide such a mechanism are designed to provide such a mechanism for motivated/security
for motivated/security conscious users, but are not suitable for conscious users, but are not suitable for general use. The identity
general use. The identity service mechanisms in Section 5.6 are more service mechanisms in Section 5.6 are more suitable for general use.
suitable for general use. Note, however, that a malicious signaling Note, however, that a malicious signaling service can strip off any
service can strip off any such identity assertions, though it cannot such identity assertions, though it cannot forge new ones. Note that
forge new ones. Note that all of the third-party security mechanisms all of the third-party security mechanisms available (whether X.509
available (whether X.509 certificates or a third-party IdP) rely on certificates or a third-party IdP) rely on the security of the third
the security of the third party--this is of course also true of your party--this is of course also true of your connection to the Web site
connection to the Web site itself. Users who wish to assure itself. Users who wish to assure themselves of security against a
themselves of security against a malicious identity provider can only malicious identity provider can only do so by verifying peer
do so by verifying peer credentials directly, e.g., by checking the credentials directly, e.g., by checking the peer's fingerprint
peer's fingerprint against a value delivered out of band. against a value delivered out of band.
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
skipping to change at page 36, line 27 skipping to change at page 35, line 35
(work in progress), July 2013. (work in progress), July 2013.
[I-D.ietf-rtcweb-rtp-usage] [I-D.ietf-rtcweb-rtp-usage]
Perkins, C., Westerlund, M., and J. Ott, "Web Real-Time Perkins, C., Westerlund, M., and J. Ott, "Web Real-Time
Communication (WebRTC): Media Transport and Use of RTP", Communication (WebRTC): Media Transport and Use of RTP",
draft-ietf-rtcweb-rtp-usage-26 (work in progress), March draft-ietf-rtcweb-rtp-usage-26 (work in progress), March
2016. 2016.
[I-D.ietf-rtcweb-security] [I-D.ietf-rtcweb-security]
Rescorla, E., "Security Considerations for WebRTC", draft- Rescorla, E., "Security Considerations for WebRTC", draft-
ietf-rtcweb-security-08 (work in progress), February 2015. ietf-rtcweb-security-09 (work in progress), October 2017.
[I-D.ietf-tsvwg-sctp-dtls-encaps] [I-D.ietf-tsvwg-sctp-dtls-encaps]
Tuexen, M., Stewart, R., Jesup, R., and S. Loreto, "DTLS Tuexen, M., Stewart, R., Jesup, R., and S. Loreto, "DTLS
Encapsulation of SCTP Packets", draft-ietf-tsvwg-sctp- Encapsulation of SCTP Packets", draft-ietf-tsvwg-sctp-
dtls-encaps-09 (work in progress), January 2015. dtls-encaps-09 (work in progress), January 2015.
[I-D.muthu-behave-consent-freshness] [I-D.muthu-behave-consent-freshness]
Perumal, M., Wing, D., R, R., and T. Reddy, "STUN Usage Perumal, M., Wing, D., R, R., and T. Reddy, "STUN Usage
for Consent Freshness", draft-muthu-behave-consent- for Consent Freshness", draft-muthu-behave-consent-
freshness-04 (work in progress), July 2013. freshness-04 (work in progress), July 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, Requirement Levels", BCP 14, RFC 2119,
DOI 10.17487/RFC2119, March 1997, DOI 10.17487/RFC2119, March 1997, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc2119>. editor.org/info/rfc2119>.
[RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818,
DOI 10.17487/RFC2818, May 2000, DOI 10.17487/RFC2818, May 2000, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc2818>. editor.org/info/rfc2818>.
[RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K. [RFC3711] Baugher, M., McGrew, D., Naslund, M., Carrara, E., and K.
Norrman, "The Secure Real-time Transport Protocol (SRTP)", Norrman, "The Secure Real-time Transport Protocol (SRTP)",
RFC 3711, DOI 10.17487/RFC3711, March 2004, RFC 3711, DOI 10.17487/RFC3711, March 2004,
<http://www.rfc-editor.org/info/rfc3711>. <https://www.rfc-editor.org/info/rfc3711>.
[RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer
Security", RFC 4347, DOI 10.17487/RFC4347, April 2006, Security", RFC 4347, DOI 10.17487/RFC4347, April 2006,
<http://www.rfc-editor.org/info/rfc4347>. <https://www.rfc-editor.org/info/rfc4347>.
[RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session
Description Protocol", RFC 4566, DOI 10.17487/RFC4566, Description Protocol", RFC 4566, DOI 10.17487/RFC4566,
July 2006, <http://www.rfc-editor.org/info/rfc4566>. July 2006, <https://www.rfc-editor.org/info/rfc4566>.
[RFC4572] Lennox, J., "Connection-Oriented Media Transport over the [RFC4568] Andreasen, F., Baugher, M., and D. Wing, "Session
Transport Layer Security (TLS) Protocol in the Session Description Protocol (SDP) Security Descriptions for Media
Description Protocol (SDP)", RFC 4572, Streams", RFC 4568, DOI 10.17487/RFC4568, July 2006,
DOI 10.17487/RFC4572, July 2006, <https://www.rfc-editor.org/info/rfc4568>.
<http://www.rfc-editor.org/info/rfc4572>.
[RFC4627] Crockford, D., "The application/json Media Type for [RFC4627] Crockford, D., "The application/json Media Type for
JavaScript Object Notation (JSON)", RFC 4627, JavaScript Object Notation (JSON)", RFC 4627,
DOI 10.17487/RFC4627, July 2006, DOI 10.17487/RFC4627, July 2006, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc4627>. editor.org/info/rfc4627>.
[RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data [RFC4648] Josefsson, S., "The Base16, Base32, and Base64 Data
Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006, Encodings", RFC 4648, DOI 10.17487/RFC4648, October 2006,
<http://www.rfc-editor.org/info/rfc4648>. <https://www.rfc-editor.org/info/rfc4648>.
[RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax
Specifications: ABNF", STD 68, RFC 5234, Specifications: ABNF", STD 68, RFC 5234,
DOI 10.17487/RFC5234, January 2008, DOI 10.17487/RFC5234, January 2008, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc5234>. editor.org/info/rfc5234>.
[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,
DOI 10.17487/RFC5245, April 2010, DOI 10.17487/RFC5245, April 2010, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc5245>. editor.org/info/rfc5245>.
[RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security
(TLS) Protocol Version 1.2", RFC 5246, (TLS) Protocol Version 1.2", RFC 5246,
DOI 10.17487/RFC5246, August 2008, DOI 10.17487/RFC5246, August 2008, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc5246>. editor.org/info/rfc5246>.
[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, DOI 10.17487/RFC5763, May Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May
2010, <http://www.rfc-editor.org/info/rfc5763>. 2010, <https://www.rfc-editor.org/info/rfc5763>.
[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, Real-time Transport Protocol (SRTP)", RFC 5764,
DOI 10.17487/RFC5764, May 2010, DOI 10.17487/RFC5764, May 2010, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc5764>. editor.org/info/rfc5764>.
[RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known [RFC5785] Nottingham, M. and E. Hammer-Lahav, "Defining Well-Known
Uniform Resource Identifiers (URIs)", RFC 5785, Uniform Resource Identifiers (URIs)", RFC 5785,
DOI 10.17487/RFC5785, April 2010, DOI 10.17487/RFC5785, April 2010, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc5785>. editor.org/info/rfc5785>.
[RFC5890] Klensin, J., "Internationalized Domain Names for [RFC5890] Klensin, J., "Internationalized Domain Names for
Applications (IDNA): Definitions and Document Framework", Applications (IDNA): Definitions and Document Framework",
RFC 5890, DOI 10.17487/RFC5890, August 2010, RFC 5890, DOI 10.17487/RFC5890, August 2010,
<http://www.rfc-editor.org/info/rfc5890>. <https://www.rfc-editor.org/info/rfc5890>.
[RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454,
DOI 10.17487/RFC6454, December 2011, DOI 10.17487/RFC6454, December 2011, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc6454>. editor.org/info/rfc6454>.
[RFC8122] Lennox, J. and C. Holmberg, "Connection-Oriented Media
Transport over the Transport Layer Security (TLS) Protocol
in the Session Description Protocol (SDP)", RFC 8122,
DOI 10.17487/RFC8122, March 2017, <https://www.rfc-
editor.org/info/rfc8122>.
[webcrypto] [webcrypto]
Dahl, Sleevi, , "Web Cryptography API", June 2013. Dahl, Sleevi, "Web Cryptography API", June 2013.
Available at http://www.w3.org/TR/WebCryptoAPI/ Available at http://www.w3.org/TR/WebCryptoAPI/
[webrtc-api] [webrtc-api]
Bergkvist, Burnett, Jennings, Narayanan, , "WebRTC 1.0: Bergkvist, Burnett, Jennings, Narayanan, "WebRTC 1.0:
Real-time Communication Between Browsers", October 2011. Real-time Communication Between Browsers", October 2011.
Available at http://dev.w3.org/2011/webrtc/editor/ Available at http://dev.w3.org/2011/webrtc/editor/
webrtc.html webrtc.html
10.2. Informative References 10.2. Informative References
[I-D.ietf-rtcweb-jsep] [I-D.ietf-rtcweb-jsep]
Uberti, J., Jennings, C., and E. Rescorla, "Javascript Uberti, J., Jennings, C., and E. Rescorla, "JavaScript
Session Establishment Protocol", draft-ietf-rtcweb-jsep-14 Session Establishment Protocol", draft-ietf-rtcweb-jsep-24
(work in progress), March 2016. (work in progress), October 2017.
[RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S., [RFC2617] Franks, J., Hallam-Baker, P., Hostetler, J., Lawrence, S.,
Leach, P., Luotonen, A., and L. Stewart, "HTTP Leach, P., Luotonen, A., and L. Stewart, "HTTP
Authentication: Basic and Digest Access Authentication", Authentication: Basic and Digest Access Authentication",
RFC 2617, DOI 10.17487/RFC2617, June 1999, RFC 2617, DOI 10.17487/RFC2617, June 1999,
<http://www.rfc-editor.org/info/rfc2617>. <https://www.rfc-editor.org/info/rfc2617>.
[RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston,
A., Peterson, J., Sparks, R., Handley, M., and E. A., Peterson, J., Sparks, R., Handley, M., and E.
Schooler, "SIP: Session Initiation Protocol", RFC 3261, Schooler, "SIP: Session Initiation Protocol", RFC 3261,
DOI 10.17487/RFC3261, June 2002, DOI 10.17487/RFC3261, June 2002, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc3261>. editor.org/info/rfc3261>.
[RFC5705] Rescorla, E., "Keying Material Exporters for Transport [RFC5705] Rescorla, E., "Keying Material Exporters for Transport
Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705, Layer Security (TLS)", RFC 5705, DOI 10.17487/RFC5705,
March 2010, <http://www.rfc-editor.org/info/rfc5705>. March 2010, <https://www.rfc-editor.org/info/rfc5705>.
[RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265, [RFC6265] Barth, A., "HTTP State Management Mechanism", RFC 6265,
DOI 10.17487/RFC6265, April 2011, DOI 10.17487/RFC6265, April 2011, <https://www.rfc-
<http://www.rfc-editor.org/info/rfc6265>. editor.org/info/rfc6265>.
[RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol",
RFC 6455, DOI 10.17487/RFC6455, December 2011, RFC 6455, DOI 10.17487/RFC6455, December 2011,
<http://www.rfc-editor.org/info/rfc6455>. <https://www.rfc-editor.org/info/rfc6455>.
[XmlHttpRequest] [XmlHttpRequest]
van Kesteren, A., "XMLHttpRequest Level 2", January 2012. van Kesteren, A., "XMLHttpRequest Level 2", January 2012.
Appendix A. Example IdP Bindings to Specific Protocols Appendix A. Example IdP Bindings to Specific Protocols
[[TODO: These still need some cleanup.]] [[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 OAuth. Note that this does not require browser-level support
level support for either protocol. Rather, the protocols can be fit for either protocol. Rather, the protocols can be fit into the
into the generic framework. (Though BrowserID in particular works generic framework.
better with some client side support).
A.1. BrowserID
BrowserID [https://browserid.org/] is a technology which allows a
user with a verified email address to generate an assertion
(authenticated by their identity provider) attesting to their
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
talks to the BrowserID code (either hosted on a trusted intermediary
or embedded in the browser). That code generates the assertion which
is passed back to the relying party for verification. The assertion
can be verified directly or with a Web service provided by the
identity provider. It's relatively easy to extend this functionality
to authenticate WebRTC calls, as shown below.
+----------------------+ +----------------------+
| | | |
| Alice's Browser | | Bob's Browser |
| | OFFER ------------> | |
| Calling JS Code | | Calling JS Code |
| ^ | | ^ |
| | | | | |
| v | | v |
| PeerConnection | | PeerConnection |
| | ^ | | | ^ |
| Finger| |Signed | |Signed | | |
| print | |Finger | |Finger | |"Alice"|
| | |print | |print | | |
| v | | | v | |
| +--------------+ | | +---------------+ |
| | IdP Proxy | | | | IdP Proxy | |
| | to | | | | to | |
| | BrowserID | | | | BrowserID | |
| | Signer | | | | Verifier | |
| +--------------+ | | +---------------+ |
| ^ | | ^ |
+-----------|----------+ +----------|-----------+
| |
| Get certificate |
v | Check
+----------------------+ | certificate
| | |
| Identity |/-------------------------------+
| Provider |
| |
+----------------------+
The way this mechanism works is as follows. On Alice's side, Alice
goes to initiate a call.
1. The calling JS instantiates a PeerConnection and tells it that it
is interested in having it authenticated via BrowserID (i.e., it
provides "browserid.org" as the IdP name.)
2. The PeerConnection instantiates the BrowserID signer in the IdP
proxy
3. The BrowserID signer contacts Alice's identity provider,
authenticating as Alice (likely via a cookie).
4. The identity provider returns a short-term certificate attesting
to Alice's identity and her short-term public key.
5. The Browser-ID code signs the fingerprint and returns the signed
assertion + certificate to the PeerConnection.
6. The PeerConnection returns the signed information to the calling
JS code.
7. The signed assertion gets sent over the wire to Bob's browser
(via the signaling service) as part of the call setup.
The offer might look something like:
{
"type":"OFFER",
"sdp":
"v=0\n
o=- 2890844526 2890842807 IN IP4 192.0.2.1\n
s= \n
c=IN IP4 192.0.2.1\n
t=2873397496 2873404696\n
a=fingerprint:SHA-1 ...\n
4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB\n
a=identity [[base-64 encoding of identity assertion:
{
"idp":{ // Standardized
"domain":"browserid.org",
"method":"default"
},
// Assertion contents are browserid-specific
"assertion": "{
\"assertion\": {
\"digest\":\"<hash of the SIGN message>\",
\"audience\": \"<audience>\"
\"valid-until\": 1308859352261,
},
\"certificate\": {
\"email\": \"rescorla@example.org\",
\"public-key\": \"<ekrs-public-key>\",
\"valid-until\": 1308860561861,
\"signature\": \"<signature from example.org>\"
},
\"content\": \"<content of the SIGN message>\"
}"
}
]]\n
m=audio 49170 RTP/AVP 0\n
..."
}
Note that while the IdP here is specified as "browserid.org", the
actual certificate is signed by example.org. This is because
BrowserID is a combined authoritative/third-party system in which
browserid.org delegates the right to be authoritative (what BrowserID
calls primary) to individual domains.
On Bob's side, he receives the signed assertion as part of the call
setup message and a similar procedure happens to verify it.
1. The calling JS instantiates a PeerConnection and provides it the
relevant signaling information, including the signed assertion.
2. The PeerConnection instantiates the IdP proxy which examines the
IdP name and brings up the BrowserID verification code.
3. The BrowserID verifier contacts the identity provider to verify
the certificate and then uses the key to verify the signed
fingerprint.
4. Alice's verified identity is returned to the PeerConnection (it
already has the fingerprint).
5. At this point, Bob's browser can display a trusted UI indication
that Alice is on the other end of the call.
When Bob returns his answer, he follows the converse procedure, which
provides Alice with a signed assertion of Bob's identity and keying
material.
A.2. OAuth A.1. 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 WebRTC concepts: following mapping of OAuth concepts to WebRTC concepts:
+----------------------+----------------------+ +----------------------+----------------------+
| OAuth | WebRTC | | OAuth | WebRTC |
+----------------------+----------------------+ +----------------------+----------------------+
| Client | Relying party | | Client | Relying party |
| Resource owner | Authenticating party | | Resource owner | Authenticating party |
 End of changes. 64 change blocks. 
331 lines changed or deleted 158 lines changed or added

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