idnits 2.17.1 draft-ietf-rtcweb-security-arch-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** The document seems to lack an IANA Considerations section. (See Section 2.2 of https://www.ietf.org/id-info/checklist for how to handle the case when there are no actions for IANA.) ** The abstract seems to contain references ([I-D.ietf-rtcweb-security]), which it shouldn't. Please replace those with straight textual mentions of the documents in question. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == The document seems to contain a disclaimer for pre-RFC5378 work, but was first submitted on or after 10 November 2008. The disclaimer is usually necessary only for documents that revise or obsolete older RFCs, and that take significant amounts of text from those RFCs. If you can contact all authors of the source material and they are willing to grant the BCP78 rights to the IETF Trust, you can and should remove the disclaimer. Otherwise, the disclaimer is needed and you can ignore this comment. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (January 22, 2012) is 4477 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) == Missing Reference: 'REF' is mentioned on line 305, but not defined == Outdated reference: A later version (-12) exists of draft-ietf-rtcweb-security-01 ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) == Outdated reference: A later version (-01) exists of draft-rescorla-rtcweb-generic-idp-00 -- Obsolete informational reference (is this intentional?): RFC 4347 (Obsoleted by RFC 6347) -- Obsolete informational reference (is this intentional?): RFC 5245 (Obsoleted by RFC 8445, RFC 8839) Summary: 3 errors (**), 0 flaws (~~), 5 warnings (==), 3 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 RTCWEB E. Rescorla 3 Internet-Draft RTFM, Inc. 4 Intended status: Standards Track January 22, 2012 5 Expires: July 25, 2012 7 RTCWEB Security Architecture 8 draft-ietf-rtcweb-security-arch-00 10 Abstract 12 The Real-Time Communications on the Web (RTCWEB) working group is 13 tasked with standardizing protocols for real-time communications 14 between Web browsers. The major use cases for RTCWEB technology are 15 real-time audio and/or video calls, Web conferencing, and direct data 16 transfer. Unlike most conventional real-time systems (e.g., SIP- 17 based soft phones) RTCWEB communications are directly controlled by 18 some Web server, which poses new security challenges. For instance, 19 a Web browser might expose a JavaScript API which allows a server to 20 place a video call. Unrestricted access to such an API would allow 21 any site which a user visited to "bug" a user's computer, capturing 22 any activity which passed in front of their camera. [I-D.ietf- 23 rtcweb-security] defines the RTCWEB threat model. This document 24 defines an architecture which provides security within that threat 25 model. 27 Legal 29 THIS DOCUMENT AND THE INFORMATION CONTAINED THEREIN ARE PROVIDED ON 30 AN "AS IS" BASIS AND THE CONTRIBUTOR, THE ORGANIZATION HE/SHE 31 REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE 32 IETF TRUST, AND THE INTERNET ENGINEERING TASK FORCE, DISCLAIM ALL 33 WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY 34 WARRANTY THAT THE USE OF THE INFORMATION THEREIN WILL NOT INFRINGE 35 ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS 36 FOR A PARTICULAR PURPOSE. 38 Status of this Memo 40 This Internet-Draft is submitted in full conformance with the 41 provisions of BCP 78 and BCP 79. 43 Internet-Drafts are working documents of the Internet Engineering 44 Task Force (IETF). Note that other groups may also distribute 45 working documents as Internet-Drafts. The list of current Internet- 46 Drafts is at http://datatracker.ietf.org/drafts/current/. 48 Internet-Drafts are draft documents valid for a maximum of six months 49 and may be updated, replaced, or obsoleted by other documents at any 50 time. It is inappropriate to use Internet-Drafts as reference 51 material or to cite them other than as "work in progress." 53 This Internet-Draft will expire on July 25, 2012. 55 Copyright Notice 57 Copyright (c) 2012 IETF Trust and the persons identified as the 58 document authors. All rights reserved. 60 This document is subject to BCP 78 and the IETF Trust's Legal 61 Provisions Relating to IETF Documents 62 (http://trustee.ietf.org/license-info) in effect on the date of 63 publication of this document. Please review these documents 64 carefully, as they describe your rights and restrictions with respect 65 to this document. Code Components extracted from this document must 66 include Simplified BSD License text as described in Section 4.e of 67 the Trust Legal Provisions and are provided without warranty as 68 described in the Simplified BSD License. 70 This document may contain material from IETF Documents or IETF 71 Contributions published or made publicly available before November 72 10, 2008. The person(s) controlling the copyright in some of this 73 material may not have granted the IETF Trust the right to allow 74 modifications of such material outside the IETF Standards Process. 75 Without obtaining an adequate license from the person(s) controlling 76 the copyright in such materials, this document may not be modified 77 outside the IETF Standards Process, and derivative works of it may 78 not be created outside the IETF Standards Process, except to format 79 it for publication as an RFC or to translate it into languages other 80 than English. 82 Table of Contents 84 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 85 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 86 3. Trust Model . . . . . . . . . . . . . . . . . . . . . . . . . 4 87 3.1. Authenticated Entities . . . . . . . . . . . . . . . . . . 5 88 3.2. Unauthenticated Entities . . . . . . . . . . . . . . . . . 5 89 4. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 90 4.1. Initial Signaling . . . . . . . . . . . . . . . . . . . . 7 91 4.2. Media Consent Verification . . . . . . . . . . . . . . . . 9 92 4.3. DTLS Handshake . . . . . . . . . . . . . . . . . . . . . . 10 93 4.4. Communications and Consent Freshness . . . . . . . . . . . 10 94 5. Detailed Technical Description . . . . . . . . . . . . . . . . 10 95 5.1. Origin and Web Security Issues . . . . . . . . . . . . . . 10 96 5.2. Device Permissions Model . . . . . . . . . . . . . . . . . 11 97 5.3. Communications Consent . . . . . . . . . . . . . . . . . . 12 98 5.4. IP Location Privacy . . . . . . . . . . . . . . . . . . . 13 99 5.5. Communications Security . . . . . . . . . . . . . . . . . 13 100 5.6. Web-Based Peer Authentication . . . . . . . . . . . . . . 15 101 6. Security Considerations . . . . . . . . . . . . . . . . . . . 16 102 6.1. Communications Security . . . . . . . . . . . . . . . . . 16 103 6.2. Privacy . . . . . . . . . . . . . . . . . . . . . . . . . 16 104 6.3. Denial of Service . . . . . . . . . . . . . . . . . . . . 17 105 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 17 106 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 107 8.1. Normative References . . . . . . . . . . . . . . . . . . . 18 108 8.2. Informative References . . . . . . . . . . . . . . . . . . 18 109 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . . 19 111 1. Introduction 113 The Real-Time Communications on the Web (RTCWEB) working group is 114 tasked with standardizing protocols for real-time communications 115 between Web browsers. The major use cases for RTCWEB technology are 116 real-time audio and/or video calls, Web conferencing, and direct data 117 transfer. Unlike most conventional real-time systems, (e.g., SIP- 118 based[RFC3261] soft phones) RTCWEB communications are directly 119 controlled by some Web server, as shown in Figure 1. 121 +----------------+ 122 | | 123 | Web Server | 124 | | 125 +----------------+ 126 ^ ^ 127 / \ 128 HTTP / \ HTTP 129 / \ 130 / \ 131 v v 132 JS API JS API 133 +-----------+ +-----------+ 134 | | Media | | 135 | Browser |<---------->| Browser | 136 | | | | 137 +-----------+ +-----------+ 139 Figure 1: A simple RTCWEB system 141 This system presents a number of new security challenges, which are 142 analyzed in [I-D.ietf-rtcweb-security]. This document describes a 143 security architecture for RTCWEB which addresses the threats and 144 requirements described in that document. 146 2. Terminology 148 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 149 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 150 document are to be interpreted as described in RFC 2119 [RFC2119]. 152 3. Trust Model 154 The basic assumption of this architecture is that network resources 155 exist in a hierarchy of trust, rooted in the browser, which serves as 156 the user's TRUSTED COMPUTING BASE (TCB). Any security property which 157 the user wishes to have enforced must be ultimately guaranteed by the 158 browser (or transitively by some property the browser verifies). 159 Conversely, if the browser is compromised, then no security 160 guarantees are possible. Note that there are cases (e.g., Internet 161 kiosks) where the user can't really trust the browser that much. In 162 these cases, the level of security provided is limited by how much 163 they trust the browser. 165 Optimally, we would not rely on trust in any entities other than the 166 browser. However, this is unfortunately not possible if we wish to 167 have a functional system. Other network elements fall into two 168 categories: those which can be authenticated by the browser and thus 169 are partly trusted--though to the minimum extent necessary--and those 170 which cannot be authenticated and thus are untrusted. This is a 171 natural extension of the end-to-end principle. 173 3.1. Authenticated Entities 175 There are two major classes of authenticated entities in the system: 177 o Calling services: Web sites whose origin we can verify (optimally 178 via HTTPS). 179 o Other users: RTCWEB peers whose origin we can verify 180 cryptographically (optimally via DTLS-SRTP). 182 Note that merely being authenticated does not make these entities 183 trusted. For instance, just because we can verify that 184 https://www.evil.org/ is owned by Dr. Evil does not mean that we can 185 trust Dr. Evil to access our camera an microphone. However, it gives 186 the user an opportunity to determine whether he wishes to trust Dr. 187 Evil or not; after all, if he desires to contact Dr. Evil (perhaps to 188 arrange for ransom payment), it's safe to temporarily give him access 189 to the camera and microphone for the purpose of the call, but he 190 doesn't want Dr. Evil to be able to access his camera and microphone 191 other than during the call. The point here is that we must first 192 identify other elements before we can determine whether and how much 193 to trust them. 195 It's also worth noting that there are settings where authentication 196 is non-cryptographic, such as other machines behind a firewall. 197 Naturally, the level of trust one can have in identities verified in 198 this way depends on how strong the topology enforcement is. 200 3.2. Unauthenticated Entities 202 Other than the above entities, we are not generally able to identify 203 other network elements, thus we cannot trust them. This does not 204 mean that it is not possible to have any interaction with them, but 205 it means that we must assume that they will behave maliciously and 206 design a system which is secure even if they do so. 208 4. Overview 210 This section describes a typical RTCWeb session and shows how the 211 various security elements interact and what guarantees are provided 212 to the user. The example in this section is a "best case" scenario 213 in which we provide the maximal amount of user authentication and 214 media privacy with the minimal level of trust in the calling service. 215 Simpler versions with lower levels of security are also possible and 216 are noted in the text where applicable. It's also important to 217 recognize the tension between security (or performance) and privacy. 218 The example shown here is aimed towards settings where we are more 219 concerned about secure calling than about privacy, but as we shall 220 see, there are settings where one might wish to make different 221 tradeoffs--this architecture is still compatible with those settings. 223 For the purposes of this example, we assume the topology shown in the 224 figure below. This topology is derived from the topology shown in 225 Figure 1, but separates Alice and Bob's identities from the process 226 of signaling. Specifically, Alice and Bob have relationships with 227 some Identity Provider (IdP) that supports a protocol such OpenID or 228 BrowserID) that can be used to attest to their identity. This 229 separation isn't particularly important in "closed world" cases where 230 Alice and Bob are users on the same social network and have 231 identities based on that network. However, there are important 232 settings where that is not the case, such as federation (calls from 233 one network to another) and calling on untrusted sites, such as where 234 two users who have a relationship via a given social network want to 235 call each other on another, untrusted, site, such as a poker site. 237 +----------------+ 238 | | 239 | Signaling | 240 | Server | 241 | | 242 +----------------+ 243 ^ ^ 244 / \ 245 HTTPS / \ HTTPS 246 / \ 247 / \ 248 v v 249 JS API JS API 250 +-----------+ +-----------+ 251 | | Media | | 252 Alice | Browser |<---------->| Browser | Bob 253 | | (DTLS-SRTP)| | 254 +-----------+ +-----------+ 255 ^ ^--+ +--^ ^ 256 | | | | 257 v | | v 258 +-----------+ | | +-----------+ 259 | |<--------+ | | 260 | IdP | | | IdP | 261 | | +------->| | 262 +-----------+ +-----------+ 264 Figure 2: A call with IdP-based identity 266 4.1. Initial Signaling 268 Alice and Bob are both users of a common calling service; they both 269 have approved the calling service to make calls (we defer the 270 discussion of device access permissions till later). They are both 271 connected to the calling service via HTTPS and so know the origin 272 with some level of confidence. They also have accounts with some 273 identity provider. This sort of identity service is becoming 274 increasingly common in the Web environment in technologies such 275 (BrowserID, Federated Google Login, Facebook Connect, OAuth, OpenID, 276 WebFinger), and is often provided as a side effect service of your 277 ordinary accounts with some service. In this example, we show Alice 278 and Bob using a separate identity service, though they may actually 279 be using the same identity service as calling service or have no 280 identity service at all. 282 Alice is logged onto the calling service and decides to call Bob. She 283 can see from the calling service that he is online and the calling 284 service presents a JS UI in the form of a button next to Bob's name 285 which says "Call". Alice clicks the button, which initiates a JS 286 callback that instantiates a PeerConnection object. This does not 287 require a security check: JS from any origin is allowed to get this 288 far. 290 Once the PeerConnection is created, the calling service JS needs to 291 set up some media. Because this is an audio/video call, it creates 292 two MediaStreams, one connected to an audio input and one connected 293 to a video input. At this point the first security check is 294 required: untrusted origins are not allowed to access the camera and 295 microphone. In this case, because Alice is a long-term user of the 296 calling service, she has made a permissions grant (i.e., a setting in 297 the browser) to allow the calling service to access her camera and 298 microphone any time it wants. The browser checks this setting when 299 the camera and microphone requests are made and thus allows them. 301 In the current W3C API, once some streams have been added, Alice's 302 browser + JS generates a signaling message The format of this data is 303 currently undefined. It may be a complete message as defined by ROAP 304 [I-D.jennings-rtcweb-signaling] or separate media description and 305 transport messages as defined in JSEP [REF] or may be assembled 306 piecemeal by the JS. In either case, it will contain: 308 o Media channel information 309 o ICE candidates 310 o A fingerprint attribute binding the communication to Alice's 311 public key [RFC5763] 313 [Note that the above implies that this information should appear in 314 JSEP's transport-level messages.] Prior to sending out the signaling 315 message, the PeerConnection code contacts the identity service and 316 obtains an assertion binding Alice's identity to her fingerprint. 317 The exact details depend on the identity service (though as discussed 318 in [I-D.rescorla-rtcweb-generic-idp] PeerConnection can be agnostic 319 to them), but for now it's easiest to think of as a BrowserID 320 assertion. The assertion may bind other information to the identity 321 besides the fingerprint, but at minimum it needs to bind the 322 fingerprint. 324 This message is sent to the signaling server, e.g., by XMLHttpRequest 325 [XmlHttpRequest] or by WebSockets 326 [I-D.ietf-hybi-thewebsocketprotocol]. The signaling server processes 327 the message from Alice's browser, determines that this is a call to 328 Bob and sends a signaling message to Bob's browser (again, the format 329 is currently undefined). The JS on Bob's browser processes it, and 330 alerts Bob to the incoming call and to Alice's identity. In this 331 case, Alice has provided an identity assertion and so Bob's browser 332 contacts Alice's identity provider (again, this is done in a generic 333 way so the browser has no specific knowledge of the IdP) to verity 334 the assertion. This allows the browser to display a trusted element 335 indicating that a call is coming in from Alice. If Alice is in Bob's 336 address book, then this interface might also include her real name, a 337 picture, etc. The calling site will also provide some user interface 338 element (e.g., a button) to allow Bob to answer the call, though this 339 is most likely not part of the trusted UI. 341 If Bob agrees [I am ignoring early media for now], a PeerConnection 342 is instantiated with the message from Alice's side. Then, a similar 343 process occurs as on Alice's browser: Bob's browser verifies that 344 the calling service is approved, the media streams are created, and a 345 return signaling message containing media information, ICE 346 candidates, and a fingerprint is sent back to Alice via the signaling 347 service. If Bob has a relationship with an IdP, the message will 348 also come with an identity assertion. 350 At this point, Alice and Bob each know that the other party wants to 351 have a secure call with them. Based purely on the interface provided 352 by the signaling server, they know that the signaling server claims 353 that the call is from Alice to Bob. Because the far end sent an 354 identity assertion along with their message, they know that this is 355 verifiable from the IdP as well. Of course, the call works perfectly 356 well if either Alice or Bob doesn't have a relationship with an IdP; 357 they just get a lower level of assurance. Moreover, Alice might wish 358 to make an anonymous call through an anonymous calling site, in which 359 case she would of course just not provide any identity assertion and 360 the calling site would mask her identity from Bob. 362 4.2. Media Consent Verification 364 As described in ([I-D.ietf-rtcweb-security]; Section 4.2) This 365 proposal specifies that media consent verification be performed via 366 ICE. Thus, Alice and Bob perform ICE checks with each other. At the 367 completion of these checks, they are ready to send non-ICE data. 369 At this point, Alice knows that (a) Bob (assuming he is verified via 370 his IdP) or someone else who the signaling service is claiming is Bob 371 is willing to exchange traffic with her and (b) that either Bob is at 372 the IP address which she has verified via ICE or there is an attacker 373 who is on-path to that IP address detouring the traffic. Note that 374 it is not possible for an attacker who is on-path but not attached to 375 the signaling service to spoof these checks because they do not have 376 the ICE credentials. Bob's security guarantees with respect to Alice 377 are the converse of this. 379 4.3. DTLS Handshake 381 Once the ICE checks have completed [more specifically, once some ICE 382 checks have completed], Alice and Bob can set up a secure channel. 383 This is performed via DTLS [RFC4347] (for the data channel) and DTLS- 384 SRTP [RFC5763] for the media channel. Specifically, Alice and Bob 385 perform a DTLS handshake on every channel which has been established 386 by ICE. The total number of channels depends on the amount of 387 muxing; in the most likely case we are using both RTP/RTCP mux and 388 muxing multiple media streams on the same channel, in which case 389 there is only one DTLS handshake. Once the DTLS handshake has 390 completed, the keys are extracted and used to key SRTP for the media 391 channels. 393 At this point, Alice and Bob know that they share a set of secure 394 data and/or media channels with keys which are not known to any 395 third-party attacker. If Alice and Bob authenticated via their IdPs, 396 then they also know that the signaling service is not attacking them. 397 Even if they do not use an IdP, as long as they have minimal trust in 398 the signaling service not to perform a man-in-the-middle attack, they 399 know that their communications are secure against the signaling 400 service as well. 402 4.4. Communications and Consent Freshness 404 From a security perspective, everything from here on in is a little 405 anticlimactic: Alice and Bob exchange data protected by the keys 406 negotiated by DTLS. Because of the security guarantees discussed in 407 the previous sections, they know that the communications are 408 encrypted and authenticated. 410 The one remaining security property we need to establish is "consent 411 freshness", i.e., allowing Alice to verify that Bob is still prepared 412 to receive her communications. ICE specifies periodic STUN 413 keepalizes but only if media is not flowing. Because the consent 414 issue is more difficult here, we require RTCWeb implementations to 415 periodically send keepalives. If a keepalive fails and no new ICE 416 channels can be established, then the session is terminated. 418 5. Detailed Technical Description 420 5.1. Origin and Web Security Issues 422 The basic unit of permissions for RTCWEB is the origin 423 [I-D.abarth-origin]. Because the security of the origin depends on 424 being able to authenticate content from that origin, the origin can 425 only be securely established if data is transferred over HTTPS 427 [RFC2818]. Thus, clients MUST treat HTTP and HTTPS origins as 428 different permissions domains and SHOULD NOT permit access to any 429 RTCWEB functionality from scripts fetched over non-secure (HTTP) 430 origins. If an HTTPS origin contains mixed active content 431 (regardless of whether it is present on the specific page attempting 432 to access RTCWEB functionality), any access MUST be treated as if it 433 came from the HTTP origin. For instance, if a 434 https://www.example.com/example.html loads 435 https://www.example.com/example.js and 436 http://www.example.org/jquery.js, any attempt by example.js to access 437 RTCWeb functionality MUST be treated as if it came from 438 http://www.example.com/. Note that many browsers already track mixed 439 content and either forbid it by default or display a warning. [[ OPEN 440 ISSUE: This seems to be wrong, but I'm not sure what's right yet. ]] 442 5.2. Device Permissions Model 444 Implementations MUST obtain explicit user consent prior to providing 445 access to the camera and/or microphone. Implementations MUST at 446 minimum support the following two permissions models: 448 o Requests for one-time camera/microphone access. 449 o Requests for permanent access. 451 In addition, they SHOULD support requests for access to a single 452 communicating peer. E.g., "Call customerservice@ford.com". Browsers 453 servicing such requests SHOULD clearly indicate that identity to the 454 user when asking for permission. 456 API Requirement: The API MUST provide a mechanism for the requesting 457 JS to indicate which of these forms of permissions it is 458 requesting. This allows the client to know what sort of user 459 interface experience to provide. In particular, browsers might 460 display a non-invasive door hanger ("some features of this site 461 may not work..." when asking for long-term permissions) but a more 462 invasive UI ("here is your own video") for single-call 463 permissions. The API MAY grant weaker permissions than the JS 464 asked for if the user chooses to authorize only those permissions, 465 but if it intends to grant stronger ones it SHOULD display the 466 appropriate UI for those permissions and MUST clearly indicate 467 what permissions are being requested. 469 API Requirement: The API MUST provide a mechanism for the requesting 470 JS to relinquish the ability to see or modify the media (e.g., via 471 MediaStream.record()). Combined with secure authentication of the 472 communicating peer, this allows a user to be sure that the calling 473 site is not accessing or modifying their conversion. 475 UI Requirement: The UI MUST clearly indicate when the user's camera 476 and microphone are in use. This indication MUST NOT be 477 suppressable by the JS and MUST clearly indicate how to terminate 478 a call, and provide a UI means to immediately stop camera/ 479 microphone input without the JS being able to prevent it. 481 UI Requirement: If the UI indication of camera/microphone use are 482 displayed in the browser such that minimizing the browser window 483 would hide the indication, or the JS creating an overlapping 484 window would hide the indication, then the browser SHOULD stop 485 camera and microphone input. [Note: this may not be necessary in 486 systems that are non-windows-based but that have good 487 notifications support, such as phones.] 489 Clients MAY permit the formation of data channels without any direct 490 user approval. Because sites can always tunnel data through the 491 server, further restrictions on the data channel do not provide any 492 additional security. (though see Section 5.3 for a related issue). 494 Implementations which support some form of direct user authentication 495 SHOULD also provide a policy by which a user can authorize calls only 496 to specific counterparties. Specifically, the implementation SHOULD 497 provide the following interfaces/controls: 499 o Allow future calls to this verified user. 500 o Allow future calls to any verified user who is in my system 501 address book (this only works with address book integration, of 502 course). 504 Implementations SHOULD also provide a different user interface 505 indication when calls are in progress to users whose identities are 506 directly verifiable. Section 5.5 provides more on this. 508 5.3. Communications Consent 510 Browser client implementations of RTCWEB MUST implement ICE. Server 511 gateway implementations which operate only at public IP addresses may 512 implement ICE-Lite. 514 Browser implementations MUST verify reachability via ICE prior to 515 sending any non-ICE packets to a given destination. Implementations 516 MUST NOT provide the ICE transaction ID to JavaScript. [Note: this 517 document takes no position on the split between ICE in JS and ICE in 518 the browser. The above text is written the way it is for editorial 519 convenience and will be modified appropriately if the WG decides on 520 ICE in the JS.] 522 Implementations MUST send keepalives no less frequently than every 30 523 seconds regardless of whether traffic is flowing or not. If a 524 keepalive fails then the implementation MUST either attempt to find a 525 new valid path via ICE or terminate media for that ICE component. 526 Note that ICE [RFC5245]; Section 10 keepalives use STUN Binding 527 Indications which are one-way and therefore not sufficient. We will 528 need to define a new mechanism for this. [PROPOSED SOLUTION: 529 Replace STUN Binding Indications with STUN Binding Requests and 530 require that a failed transaction causes the results above.] 532 5.4. IP Location Privacy 534 A side effect of the default ICE behavior is that the peer learns 535 one's IP address, which leaks large amounts of location information, 536 especially for mobile devices. This has negative privacy 537 consequences in some circumstances. The following two API 538 requirements are intended to mitigate this issue: 540 API Requirement: The API MUST provide a mechanism to suppress ICE 541 negotiation (though perhaps to allow candidate gathering) until 542 the user has decided to answer the call [note: determining when 543 the call has been answered is a question for the JS.] This 544 enables a user to prevent a peer from learning their IP address if 545 they elect not to answer a call and also from learning whether the 546 user is online. 548 API Requirement: The API MUST provide a mechanism for the calling 549 application to indicate that only TURN candidates are to be used. 550 This prevents the peer from learning one's IP address at all. The 551 API MUST provide a mechanism for the calling application to 552 reconfigure an existing call to add non-TURN candidates. Taken 553 together, these requirements allow ICE negotiation to start 554 immediately on incoming call notification, thus reducing post-dial 555 delay, but also to avoid disclosing the user's IP address until 556 they have decided to answer. 558 5.5. Communications Security 560 Implementations MUST implement DTLS and DTLS-SRTP. All data channels 561 MUST be secured via DTLS. DTLS-SRTP MUST be offered for every media 562 channel and MUST be the default; i.e., if an implementation receives 563 an offer for DTLS-SRTP and SDES and/or plain RTP, DTLS-SRTP MUST be 564 selected. 566 [OPEN ISSUE: What should the settings be here? MUST?] 567 Implementations MAY support SDES and RTP for media traffic for 568 backward compatibility purposes. 570 API Requirement: The API MUST provide a mechanism to indicate that a 571 fresh DTLS key pair is to be generated for a specific call. This 572 is intended to allow for unlinkability. Note that there are also 573 settings where it is attractive to use the same keying material 574 repeatedly, especially those with key continuity-based 575 authentication. 577 API Requirement: The API MUST provide a mechanism to indicate that a 578 fresh DTLS key pair is to be generated for a specific call. This 579 is intended to allow for unlinkability. 581 API Requirement: When DTLS-SRTP is used, the API MUST NOT permit the 582 JS to obtain the negotiated keying material. This requirement 583 preserves the end-to-end security of the media. 585 UI Requirements: A user-oriented client MUST provide an 586 "inspector" interface which allows the user to determine the 587 security characteristics of the media. [largely derived from 588 [I-D.kaufman-rtcweb-security-ui] 589 The following properties SHOULD be displayed "up-front" in the 590 browser chrome, i.e., without requiring the user to ask for them: 592 * A client MUST provide a user interface through which a user may 593 determine the security characteristics for currently-displayed 594 audio and video stream(s) 595 * A client MUST provide a user interface through which a user may 596 determine the security characteristics for transmissions of 597 their microphone audio and camera video. 598 * The "security characteristics" MUST include an indication as to 599 whether or not the transmission is cryptographically protected 600 and whether that protection is based on a key that was 601 delivered out-of-band (from a server) or was generated as a 602 result of a pairwise negotiation. 603 * If the far endpoint was directly verified (see Section 5.6) the 604 "security characteristics" MUST include the verified 605 information. 606 The following properties are more likely to require some "drill- 607 down" from the user: 609 * If the transmission is cryptographically protected, the The 610 algorithms in use (For example: "AES-CBC" or "Null Cipher".) 611 * If the transmission is cryptographically protected, the 612 "security characteristics" MUST indicate whether PFS is 613 provided. 614 * If the transmission is cryptographically protected via an end- 615 to-end mechanism the "security characteristics" MUST include 616 some mechanism to allow an out-of-band verification of the 617 peer, such as a certificate fingerprint or an SAS. 619 5.6. Web-Based Peer Authentication 621 In a number of cases, it is desirable for the endpoint (i.e., the 622 browser) to be able to directly identity the endpoint on the other 623 side without trusting only the signaling service to which they are 624 connected. For instance, users may be making a call via a federated 625 system where they wish to get direct authentication of the other 626 side. Alternately, they may be making a call on a site which they 627 minimally trust (such as a poker site) but to someone who has an 628 identity on a site they do trust (such as a social network.) 630 Recently, a number of Web-based identity technologies (OAuth, 631 BrowserID, Facebook Connect), etc. have been developed. While the 632 details vary, what these technologies share is that they have a Web- 633 based (i.e., HTTP/HTTPS identity provider) which attests to your 634 identity. For instance, if I have an account at example.org, I could 635 use the example.org identity provider to prove to others that I was 636 alice@example.org. The development of these technologies allows us 637 to separate calling from identity provision: I could call you on 638 Poker Galaxy but identify myself as alice@example.org. 640 Whatever the underlying technology, the general principle is that the 641 party which is being authenticated is NOT the signaling site but 642 rather the user (and their browser). Similarly, the relying party is 643 the browser and not the signaling site. Thus, the browser MUST 644 securely generate the input to the IdP assertion process and MUST 645 securely display the results of the verification process to the user 646 in a way which cannot be imitated by the calling site. 648 In order to make this work, we must standardize the following items: 650 o The precise information from the signaling message that must be 651 cryptographically bound to the user's identity. At minimum this 652 MUST be the fingerprint, but we may choose to add other 653 information as the signaling protocol firms up. This will be 654 defined in a future version of this document. 655 o The interface to the IdP. [I-D.rescorla-rtcweb-generic-idp] 656 specifies a specific protocol mechanism which allows the use of 657 any identity protocol without requiring specific further protocol 658 support in the browser. 659 o The JavaScript interfaces which the calling application can use to 660 specify the IdP to use to generate assertions and to discover what 661 assertions were received. These interfaces should be defined in 662 the W3C document. 664 6. Security Considerations 666 Much of the security analysis of this problem is contained in 667 [I-D.ietf-rtcweb-security] or in the discussion of the particular 668 issues above. In order to avoid repetition, this section focuses on 669 (a) residual threats that are not addressed by this document and (b) 670 threats produced by failure/misbehavior of one of the components in 671 the system. 673 6.1. Communications Security 675 While this document favors DTLS-SRTP, it permits a variety of 676 communications security mechanisms and thus the level of 677 communications security actually provided varies considerably. Any 678 pair of implementations which have multiple security mechanisms in 679 common are subject to being downgraded to the weakest of those common 680 mechanisms by any attacker who can modify the signaling traffic. If 681 communications are over HTTP, this means any on-path attacker. If 682 communications are over HTTPS, this means the signaling server. 683 Implementations which wish to avoid downgrade attack should only 684 offer the strongest available mechanism, which is DTLS/DTLS-SRTP. 685 Note that the implication of this choice will be that interop to non- 686 DTLS-SRTP devices will need to happen through gateways. 688 Even if only DTLS/DTLS-SRTP are used, the signaling server can 689 potentially mount a man-in-the-middle attack unless implementations 690 have some mechanism for independently verifying keys. The UI 691 requirements in Section 5.5 are designed to provide such a mechanism 692 for motivated/security conscious users, but are not suitable for 693 general use. The identity service mechanisms in Section 5.6 are more 694 suitable for general use. Note, however, that a malicious signaling 695 service can strip off any such identity assertions, though it cannot 696 forge new ones. 698 6.2. Privacy 700 The requirements in this document are intended to allow: 702 o Users to participate in calls without revealing their location. 703 o Potential callees to avoid revealing their location and even 704 presence status prior to agreeing to answer a call. 706 However, these privacy protections come at a performance cost in 707 terms of using TURN relays and, in the latter case, delaying ICE. 708 Sites SHOULD make users aware of these tradeoffs. 710 Note that the protections provided here assume a non-malicious 711 calling service. As the calling service always knows the users 712 status and (absent the use of a technology like Tor) their IP 713 address, they can violate the users privacy at will. Users who wish 714 privacy against the calling sites they are using must use separate 715 privacy enhancing technologies such as Tor. 717 6.3. Denial of Service 719 The consent mechanisms described in this document are intended to 720 mitigate denial of service attacks in which an attacker uses clients 721 to send large amounts of traffic to a victim without the consent of 722 the victim. While these mechanisms are sufficient to protect victims 723 who have not implemented RTCWEB at all, RTCWEB implementations need 724 to be more careful. 726 Consider the case of a call center which accepts calls via RTCWeb. 727 An attacker proxies the call center's front-end and arranges for 728 multiple clients to initiate calls to the call center. Note that 729 this requires user consent in many cases but because the data channel 730 does not need consent, he can use that directly. Since ICE will 731 complete, browsers can then be induced to send large amounts of data 732 to the victim call center if it supports the data channel at all. 733 Preventing this attack requires that automated RTCWEB 734 implemementations implement sensible flow control and have the 735 ability to triage out (i.e., stop responding to ICE probes on) calls 736 which are behaving badly, and especially to be prepared to remotely 737 throttle the data channel in the absence of plausible audio and video 738 (which the attacker cannot control). 740 Another related attack is for the signaling service to swap the ICE 741 candidates for the audio and video streams, thus forcing a browser to 742 send video to the sink that the other victim expects will contain 743 audio (perhaps it is only expecting audio!) potentially causing 744 overload. Muxing multiple media flows over a single transport makes 745 it harder to individually suppress a single flow by denying ICE 746 keepalives. Media-level (RTCP) mechanisms must be used in this case. 748 Note that attacks based on confusing one end or the other about 749 consent are possible primarily even in the face of the third-party 750 identity mechanism as long as major parts of the signaling messages 751 are not signed. On the other hand, signing the entire message 752 severely restricts the capabilities of the calling application, so 753 there are difficult tradeoffs here. 755 7. Acknowledgements 757 Bernard Aboba, Harald Alvestrand, Cullen Jennings, Hadriel Kaplan, 758 Matthew Kaufman, Magnus Westerland. 760 8. References 762 8.1. Normative References 764 [I-D.abarth-origin] 765 Barth, A., "The Web Origin Concept", 766 draft-abarth-origin-09 (work in progress), November 2010. 768 [I-D.ietf-rtcweb-security] 769 Rescorla, E., "Security Considerations for RTC-Web", 770 draft-ietf-rtcweb-security-01 (work in progress), 771 October 2011. 773 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 774 Requirement Levels", BCP 14, RFC 2119, March 1997. 776 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 778 8.2. Informative References 780 [I-D.ietf-hybi-thewebsocketprotocol] 781 Fette, I. and A. Melnikov, "The WebSocket protocol", 782 draft-ietf-hybi-thewebsocketprotocol-17 (work in 783 progress), September 2011. 785 [I-D.jennings-rtcweb-signaling] 786 Jennings, C., Rosenberg, J., Uberti, J., and R. Jesup, 787 "RTCWeb Offer/Answer Protocol (ROAP)", 788 draft-jennings-rtcweb-signaling-01 (work in progress), 789 October 2011. 791 [I-D.kaufman-rtcweb-security-ui] 792 Kaufman, M., "Client Security User Interface Requirements 793 for RTCWEB", draft-kaufman-rtcweb-security-ui-00 (work in 794 progress), June 2011. 796 [I-D.rescorla-rtcweb-generic-idp] 797 Rescorla, E., "RTCWeb Generic Identity Provider 798 Interface", draft-rescorla-rtcweb-generic-idp-00 (work in 799 progress), January 2012. 801 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 802 A., Peterson, J., Sparks, R., Handley, M., and E. 803 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 804 June 2002. 806 [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 807 Security", RFC 4347, April 2006. 809 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 810 (ICE): A Protocol for Network Address Translator (NAT) 811 Traversal for Offer/Answer Protocols", RFC 5245, 812 April 2010. 814 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 815 for Establishing a Secure Real-time Transport Protocol 816 (SRTP) Security Context Using Datagram Transport Layer 817 Security (DTLS)", RFC 5763, May 2010. 819 [XmlHttpRequest] 820 van Kesteren, A., "XMLHttpRequest Level 2". 822 Author's Address 824 Eric Rescorla 825 RTFM, Inc. 826 2064 Edgewood Drive 827 Palo Alto, CA 94303 828 USA 830 Phone: +1 650 678 2350 831 Email: ekr@rtfm.com