idnits 2.17.1 draft-ietf-rtcweb-security-arch-01.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 (March 12, 2012) is 4428 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) == Outdated reference: A later version (-12) exists of draft-ietf-rtcweb-security-01 == Outdated reference: A later version (-04) exists of draft-muthu-behave-consent-freshness-00 ** Obsolete normative reference: RFC 2818 (Obsoleted by RFC 9110) ** Obsolete normative reference: RFC 4347 (Obsoleted by RFC 6347) ** Obsolete normative reference: RFC 5245 (Obsoleted by RFC 8445, RFC 8839) == Outdated reference: A later version (-26) exists of draft-ietf-rtcweb-jsep-00 == Outdated reference: A later version (-01) exists of draft-rescorla-rtcweb-generic-idp-00 Summary: 5 errors (**), 0 flaws (~~), 6 warnings (==), 1 comment (--). 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 March 12, 2012 5 Expires: September 13, 2012 7 RTCWEB Security Architecture 8 draft-ietf-rtcweb-security-arch-01 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 September 13, 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 . . . . . . . . . . . . . . . . . . . . . . . 18 106 8. References . . . . . . . . . . . . . . . . . . . . . . . . . . 18 107 8.1. Normative References . . . . . . . . . . . . . . . . . . . 18 108 8.2. Informative References . . . . . . . . . . . . . . . . . . 19 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 [I-D.ietf-rtcweb-jsep] or may be 306 assembled 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 it is currently unclear where JSEP will eventually put 314 this information, in the SDP or in the transport info.] Prior to 315 sending out the signaling message, the PeerConnection code contacts 316 the identity service and obtains an assertion binding Alice's 317 identity to her fingerprint. The exact details depend on the 318 identity service (though as discussed in 319 [I-D.rescorla-rtcweb-generic-idp] PeerConnection can be agnostic to 320 them), but for now it's easiest to think of as a BrowserID assertion. 321 The assertion may bind other information to the identity besides the 322 fingerprint, but at minimum it needs to bind the fingerprint. 324 This message is sent to the signaling server, e.g., by XMLHttpRequest 325 [XmlHttpRequest] or by WebSockets [RFC6455] The signaling server 326 processes the message from Alice's browser, determines that this is a 327 call to Bob and sends a signaling message to Bob's browser (again, 328 the format is currently undefined). The JS on Bob's browser 329 processes it, and alerts Bob to the incoming call and to Alice's 330 identity. In this case, Alice has provided an identity assertion and 331 so Bob's browser contacts Alice's identity provider (again, this is 332 done in a generic way so the browser has no specific knowledge of the 333 IdP) to verity the assertion. This allows the browser to display a 334 trusted element indicating that a call is coming in from Alice. If 335 Alice is in Bob's address book, then this interface might also 336 include her real name, a picture, etc. The calling site will also 337 provide some user interface element (e.g., a button) to allow Bob to 338 answer the call, though this is most likely not part of the trusted 339 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 exported [RFC5705] and used to key SRTP for 391 the media 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 [RFC6454]. 423 Because the security of the origin depends on being able to 424 authenticate content from that origin, the origin can only be 425 securely established if data is transferred over HTTPS [RFC2818]. 427 Thus, clients MUST treat HTTP and HTTPS origins as different 428 permissions domains. [Note: this follows directly from the origin 429 security model and is stated here merely for clarity.] 431 Many web browsers currently forbid by default any active mixed 432 content on HTTPS pages. I.e., when JS is loaded from an HTTP origin 433 onto an HTTPS page, an error is displayed and the content is not 434 executed unless the user overrides the error. Any browser which 435 enforces such a policy will also not permit access to RTCWEB 436 functionality from mixed content pages. It is RECOMMENDED that 437 browsers which allow active mixed content nevertheless disable RTCWEB 438 functionality in mixed content settings. [[ OPEN ISSUE: Should this 439 be a 2119 MUST? It's not clear what set of conditions would make 440 this OK, other than that browser manufacturers have traditionally 441 been permissive here here.]] Note that it is possible for a page 442 which was not mixed content to become mixed content during the 443 duration of the call. Implementations MAY choose to terminate the 444 call or display a warning at that point, but it is also permissible 445 to ignore this condition. This is a deliberate implementation 446 complexity versus security tradeoff. 448 5.2. Device Permissions Model 450 Implementations MUST obtain explicit user consent prior to providing 451 access to the camera and/or microphone. Implementations MUST at 452 minimum support the following two permissions models: 454 o Requests for one-time camera/microphone access. 455 o Requests for permanent access. 457 In addition, they SHOULD support requests for access to a single 458 communicating peer. E.g., "Call customerservice@ford.com". Browsers 459 servicing such requests SHOULD clearly indicate that identity to the 460 user when asking for permission. 462 API Requirement: The API MUST provide a mechanism for the requesting 463 JS to indicate which of these forms of permissions it is 464 requesting. This allows the client to know what sort of user 465 interface experience to provide. In particular, browsers might 466 display a non-invasive door hanger ("some features of this site 467 may not work..." when asking for long-term permissions) but a more 468 invasive UI ("here is your own video") for single-call 469 permissions. The API MAY grant weaker permissions than the JS 470 asked for if the user chooses to authorize only those permissions, 471 but if it intends to grant stronger ones it SHOULD display the 472 appropriate UI for those permissions and MUST clearly indicate 473 what permissions are being requested. 475 API Requirement: The API MUST provide a mechanism for the requesting 476 JS to relinquish the ability to see or modify the media (e.g., via 477 MediaStream.record()). Combined with secure authentication of the 478 communicating peer, this allows a user to be sure that the calling 479 site is not accessing or modifying their conversion. 481 UI Requirement: The UI MUST clearly indicate when the user's camera 482 and microphone are in use. This indication MUST NOT be 483 suppressable by the JS and MUST clearly indicate how to terminate 484 a call, and provide a UI means to immediately stop camera/ 485 microphone input without the JS being able to prevent it. 487 UI Requirement: If the UI indication of camera/microphone use are 488 displayed in the browser such that minimizing the browser window 489 would hide the indication, or the JS creating an overlapping 490 window would hide the indication, then the browser SHOULD stop 491 camera and microphone input. [Note: this may not be necessary in 492 systems that are non-windows-based but that have good 493 notifications support, such as phones.] 495 Clients MAY permit the formation of data channels without any direct 496 user approval. Because sites can always tunnel data through the 497 server, further restrictions on the data channel do not provide any 498 additional security. (though see Section 5.3 for a related issue). 500 Implementations which support some form of direct user authentication 501 SHOULD also provide a policy by which a user can authorize calls only 502 to specific counterparties. Specifically, the implementation SHOULD 503 provide the following interfaces/controls: 505 o Allow future calls to this verified user. 506 o Allow future calls to any verified user who is in my system 507 address book (this only works with address book integration, of 508 course). 510 Implementations SHOULD also provide a different user interface 511 indication when calls are in progress to users whose identities are 512 directly verifiable. Section 5.5 provides more on this. 514 5.3. Communications Consent 516 Browser client implementations of RTCWEB MUST implement ICE. Server 517 gateway implementations which operate only at public IP addresses may 518 implement ICE-Lite. 520 Browser implementations MUST verify reachability via ICE prior to 521 sending any non-ICE packets to a given destination. Implementations 522 MUST NOT provide the ICE transaction ID to JavaScript. [Note: this 523 document takes no position on the split between ICE in JS and ICE in 524 the browser. The above text is written the way it is for editorial 525 convenience and will be modified appropriately if the WG decides on 526 ICE in the JS.] 528 Implementations MUST send keepalives no less frequently than every 30 529 seconds regardless of whether traffic is flowing or not. If a 530 keepalive fails then the implementation MUST either attempt to find a 531 new valid path via ICE or terminate media for that ICE component. 532 Note that ICE [RFC5245]; Section 10 keepalives use STUN Binding 533 Indications which are one-way and therefore not sufficient. Instead, 534 the consent freshness mechanism [I-D.muthu-behave-consent-freshness] 535 MUST be used. 537 5.4. IP Location Privacy 539 A side effect of the default ICE behavior is that the peer learns 540 one's IP address, which leaks large amounts of location information, 541 especially for mobile devices. This has negative privacy 542 consequences in some circumstances. The following two API 543 requirements are intended to mitigate this issue: 545 API Requirement: The API MUST provide a mechanism to suppress ICE 546 negotiation (though perhaps to allow candidate gathering) until 547 the user has decided to answer the call [note: determining when 548 the call has been answered is a question for the JS.] This 549 enables a user to prevent a peer from learning their IP address if 550 they elect not to answer a call and also from learning whether the 551 user is online. 553 API Requirement: The API MUST provide a mechanism for the calling 554 application to indicate that only TURN candidates are to be used. 555 This prevents the peer from learning one's IP address at all. The 556 API MUST provide a mechanism for the calling application to 557 reconfigure an existing call to add non-TURN candidates. Taken 558 together, these requirements allow ICE negotiation to start 559 immediately on incoming call notification, thus reducing post-dial 560 delay, but also to avoid disclosing the user's IP address until 561 they have decided to answer. 563 5.5. Communications Security 565 Implementations MUST implement DTLS [RFC4347] and DTLS-SRTP 566 [RFC5763][RFC5764]. All data channels MUST be secured via DTLS. 567 DTLS-SRTP MUST be offered for every media channel and MUST be the 568 default; i.e., if an implementation receives an offer for DTLS-SRTP 569 and SDES and/or plain RTP, DTLS-SRTP MUST be selected. 571 [OPEN ISSUE: What should the settings be here? MUST?] 572 Implementations MAY support SDES and RTP for media traffic for 573 backward compatibility purposes. 575 API Requirement: The API MUST provide a mechanism to indicate that a 576 fresh DTLS key pair is to be generated for a specific call. This 577 is intended to allow for unlinkability. Note that there are also 578 settings where it is attractive to use the same keying material 579 repeatedly, especially those with key continuity-based 580 authentication. 582 API Requirement: The API MUST provide a mechanism to indicate that a 583 fresh DTLS key pair is to be generated for a specific call. This 584 is intended to allow for unlinkability. 586 API Requirement: When DTLS-SRTP is used, the API MUST NOT permit the 587 JS to obtain the negotiated keying material. This requirement 588 preserves the end-to-end security of the media. 590 UI Requirements: A user-oriented client MUST provide an 591 "inspector" interface which allows the user to determine the 592 security characteristics of the media. [largely derived from 593 [I-D.kaufman-rtcweb-security-ui] 594 The following properties SHOULD be displayed "up-front" in the 595 browser chrome, i.e., without requiring the user to ask for them: 597 * A client MUST provide a user interface through which a user may 598 determine the security characteristics for currently-displayed 599 audio and video stream(s) 600 * A client MUST provide a user interface through which a user may 601 determine the security characteristics for transmissions of 602 their microphone audio and camera video. 603 * The "security characteristics" MUST include an indication as to 604 whether or not the transmission is cryptographically protected 605 and whether that protection is based on a key that was 606 delivered out-of-band (from a server) or was generated as a 607 result of a pairwise negotiation. 608 * If the far endpoint was directly verified (see Section 5.6) the 609 "security characteristics" MUST include the verified 610 information. 611 The following properties are more likely to require some "drill- 612 down" from the user: 614 * If the transmission is cryptographically protected, the The 615 algorithms in use (For example: "AES-CBC" or "Null Cipher".) 616 * If the transmission is cryptographically protected, the 617 "security characteristics" MUST indicate whether PFS is 618 provided. 620 * If the transmission is cryptographically protected via an end- 621 to-end mechanism the "security characteristics" MUST include 622 some mechanism to allow an out-of-band verification of the 623 peer, such as a certificate fingerprint or an SAS. 625 5.6. Web-Based Peer Authentication 627 In a number of cases, it is desirable for the endpoint (i.e., the 628 browser) to be able to directly identity the endpoint on the other 629 side without trusting only the signaling service to which they are 630 connected. For instance, users may be making a call via a federated 631 system where they wish to get direct authentication of the other 632 side. Alternately, they may be making a call on a site which they 633 minimally trust (such as a poker site) but to someone who has an 634 identity on a site they do trust (such as a social network.) 636 Recently, a number of Web-based identity technologies (OAuth, 637 BrowserID, Facebook Connect), etc. have been developed. While the 638 details vary, what these technologies share is that they have a Web- 639 based (i.e., HTTP/HTTPS identity provider) which attests to your 640 identity. For instance, if I have an account at example.org, I could 641 use the example.org identity provider to prove to others that I was 642 alice@example.org. The development of these technologies allows us 643 to separate calling from identity provision: I could call you on 644 Poker Galaxy but identify myself as alice@example.org. 646 Whatever the underlying technology, the general principle is that the 647 party which is being authenticated is NOT the signaling site but 648 rather the user (and their browser). Similarly, the relying party is 649 the browser and not the signaling site. Thus, the browser MUST 650 securely generate the input to the IdP assertion process and MUST 651 securely display the results of the verification process to the user 652 in a way which cannot be imitated by the calling site. 654 In order to make this work, we must standardize the following items: 656 o The precise information from the signaling message that must be 657 cryptographically bound to the user's identity. At minimum this 658 MUST be the fingerprint, but we may choose to add other 659 information as the signaling protocol firms up. This will be 660 defined in a future version of this document. 661 o The interface to the IdP. [I-D.rescorla-rtcweb-generic-idp] 662 specifies a specific protocol mechanism which allows the use of 663 any identity protocol without requiring specific further protocol 664 support in the browser. 665 o The JavaScript interfaces which the calling application can use to 666 specify the IdP to use to generate assertions and to discover what 667 assertions were received. These interfaces should be defined in 668 the W3C document. 670 6. Security Considerations 672 Much of the security analysis of this problem is contained in 673 [I-D.ietf-rtcweb-security] or in the discussion of the particular 674 issues above. In order to avoid repetition, this section focuses on 675 (a) residual threats that are not addressed by this document and (b) 676 threats produced by failure/misbehavior of one of the components in 677 the system. 679 6.1. Communications Security 681 While this document favors DTLS-SRTP, it permits a variety of 682 communications security mechanisms and thus the level of 683 communications security actually provided varies considerably. Any 684 pair of implementations which have multiple security mechanisms in 685 common are subject to being downgraded to the weakest of those common 686 mechanisms by any attacker who can modify the signaling traffic. If 687 communications are over HTTP, this means any on-path attacker. If 688 communications are over HTTPS, this means the signaling server. 689 Implementations which wish to avoid downgrade attack should only 690 offer the strongest available mechanism, which is DTLS/DTLS-SRTP. 691 Note that the implication of this choice will be that interop to non- 692 DTLS-SRTP devices will need to happen through gateways. 694 Even if only DTLS/DTLS-SRTP are used, the signaling server can 695 potentially mount a man-in-the-middle attack unless implementations 696 have some mechanism for independently verifying keys. The UI 697 requirements in Section 5.5 are designed to provide such a mechanism 698 for motivated/security conscious users, but are not suitable for 699 general use. The identity service mechanisms in Section 5.6 are more 700 suitable for general use. Note, however, that a malicious signaling 701 service can strip off any such identity assertions, though it cannot 702 forge new ones. 704 6.2. Privacy 706 The requirements in this document are intended to allow: 708 o Users to participate in calls without revealing their location. 709 o Potential callees to avoid revealing their location and even 710 presence status prior to agreeing to answer a call. 712 However, these privacy protections come at a performance cost in 713 terms of using TURN relays and, in the latter case, delaying ICE. 714 Sites SHOULD make users aware of these tradeoffs. 716 Note that the protections provided here assume a non-malicious 717 calling service. As the calling service always knows the users 718 status and (absent the use of a technology like Tor) their IP 719 address, they can violate the users privacy at will. Users who wish 720 privacy against the calling sites they are using must use separate 721 privacy enhancing technologies such as Tor. Combined RTCWEB/Tor 722 implementations SHOULD arrange to route the media as well as the 723 signaling through Tor. [Currently this will produce very suboptimal 724 performance.] 726 6.3. Denial of Service 728 The consent mechanisms described in this document are intended to 729 mitigate denial of service attacks in which an attacker uses clients 730 to send large amounts of traffic to a victim without the consent of 731 the victim. While these mechanisms are sufficient to protect victims 732 who have not implemented RTCWEB at all, RTCWEB implementations need 733 to be more careful. 735 Consider the case of a call center which accepts calls via RTCWeb. 736 An attacker proxies the call center's front-end and arranges for 737 multiple clients to initiate calls to the call center. Note that 738 this requires user consent in many cases but because the data channel 739 does not need consent, he can use that directly. Since ICE will 740 complete, browsers can then be induced to send large amounts of data 741 to the victim call center if it supports the data channel at all. 742 Preventing this attack requires that automated RTCWEB 743 implemementations implement sensible flow control and have the 744 ability to triage out (i.e., stop responding to ICE probes on) calls 745 which are behaving badly, and especially to be prepared to remotely 746 throttle the data channel in the absence of plausible audio and video 747 (which the attacker cannot control). 749 Another related attack is for the signaling service to swap the ICE 750 candidates for the audio and video streams, thus forcing a browser to 751 send video to the sink that the other victim expects will contain 752 audio (perhaps it is only expecting audio!) potentially causing 753 overload. Muxing multiple media flows over a single transport makes 754 it harder to individually suppress a single flow by denying ICE 755 keepalives. Media-level (RTCP) mechanisms must be used in this case. 757 [TODO: Write up Magnus's ICE forking attack when we get some clarity 758 on it.] 760 Note that attacks based on confusing one end or the other about 761 consent are possible primarily even in the face of the third-party 762 identity mechanism as long as major parts of the signaling messages 763 are not signed. On the other hand, signing the entire message 764 severely restricts the capabilities of the calling application, so 765 there are difficult tradeoffs here. 767 7. Acknowledgements 769 Bernard Aboba, Harald Alvestrand, Cullen Jennings, Hadriel Kaplan, 770 Matthew Kaufman, Magnus Westerland. 772 8. References 774 8.1. Normative References 776 [I-D.ietf-rtcweb-security] 777 Rescorla, E., "Security Considerations for RTC-Web", 778 draft-ietf-rtcweb-security-01 (work in progress), 779 October 2011. 781 [I-D.muthu-behave-consent-freshness] 782 Perumal, M., Wing, D., and H. Kaplan, "STUN Usage for 783 Consent Freshness", 784 draft-muthu-behave-consent-freshness-00 (work in 785 progress), March 2012. 787 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 788 Requirement Levels", BCP 14, RFC 2119, March 1997. 790 [RFC2818] Rescorla, E., "HTTP Over TLS", RFC 2818, May 2000. 792 [RFC4347] Rescorla, E. and N. Modadugu, "Datagram Transport Layer 793 Security", RFC 4347, April 2006. 795 [RFC5245] Rosenberg, J., "Interactive Connectivity Establishment 796 (ICE): A Protocol for Network Address Translator (NAT) 797 Traversal for Offer/Answer Protocols", RFC 5245, 798 April 2010. 800 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 801 for Establishing a Secure Real-time Transport Protocol 802 (SRTP) Security Context Using Datagram Transport Layer 803 Security (DTLS)", RFC 5763, May 2010. 805 [RFC5764] McGrew, D. and E. Rescorla, "Datagram Transport Layer 806 Security (DTLS) Extension to Establish Keys for the Secure 807 Real-time Transport Protocol (SRTP)", RFC 5764, May 2010. 809 [RFC6454] Barth, A., "The Web Origin Concept", RFC 6454, 810 December 2011. 812 8.2. Informative References 814 [I-D.ietf-rtcweb-jsep] 815 Uberti, J. and C. Jennings, "Javascript Session 816 Establishment Protocol", draft-ietf-rtcweb-jsep-00 (work 817 in progress), March 2012. 819 [I-D.jennings-rtcweb-signaling] 820 Jennings, C., Rosenberg, J., and R. Jesup, "RTCWeb Offer/ 821 Answer Protocol (ROAP)", 822 draft-jennings-rtcweb-signaling-01 (work in progress), 823 October 2011. 825 [I-D.kaufman-rtcweb-security-ui] 826 Kaufman, M., "Client Security User Interface Requirements 827 for RTCWEB", draft-kaufman-rtcweb-security-ui-00 (work in 828 progress), June 2011. 830 [I-D.rescorla-rtcweb-generic-idp] 831 Rescorla, E., "RTCWeb Generic Identity Provider 832 Interface", draft-rescorla-rtcweb-generic-idp-00 (work in 833 progress), January 2012. 835 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 836 A., Peterson, J., Sparks, R., Handley, M., and E. 837 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 838 June 2002. 840 [RFC5705] Rescorla, E., "Keying Material Exporters for Transport 841 Layer Security (TLS)", RFC 5705, March 2010. 843 [RFC6455] Fette, I. and A. Melnikov, "The WebSocket Protocol", 844 RFC 6455, December 2011. 846 [XmlHttpRequest] 847 van Kesteren, A., "XMLHttpRequest Level 2". 849 Author's Address 851 Eric Rescorla 852 RTFM, Inc. 853 2064 Edgewood Drive 854 Palo Alto, CA 94303 855 USA 857 Phone: +1 650 678 2350 858 Email: ekr@rtfm.com