idnits 2.17.1 draft-ietf-simple-chat-12.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 : ---------------------------------------------------------------------------- == There are 1 instance of lines with non-RFC2606-compliant FQDNs in the document. 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, and may have content which was first submitted before 10 November 2008. The disclaimer is necessary when there are original authors that you have been unable to contact, or if some do not wish to grant the BCP78 rights to the IETF Trust. If you are able to get all authors (current and original) to grant those rights, 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 (December 16, 2011) is 4509 days in the past. Is this intentional? -- Found something which looks like a code comment -- if you have code sections in the document, please surround them with '' and '' lines. Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Downref: Normative reference to an Informational RFC: RFC 4353 ** Obsolete normative reference: RFC 4566 (Obsoleted by RFC 8866) ** Obsolete normative reference: RFC 5246 (Obsoleted by RFC 8446) -- Obsolete informational reference (is this intentional?): RFC 4474 (Obsoleted by RFC 8224) Summary: 3 errors (**), 0 flaws (~~), 2 warnings (==), 4 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group A. Niemi 3 Internet-Draft Nokia 4 Intended status: Standards Track M. Garcia-Martin 5 Expires: June 18, 2012 Ericsson 6 G. Sandbakken, Ed. 7 Cisco Systems 8 December 16, 2011 10 Multi-party Chat Using the Message Session Relay Protocol (MSRP) 11 draft-ietf-simple-chat-12 13 Abstract 15 The Message Session Relay Protocol (MSRP) defines a mechanism for 16 sending instant messages within a peer-to-peer session, negotiated 17 using the Session Initiation Protocol (SIP) and the Session 18 Description Protocol (SDP). This document defines the necessary 19 tools for establishing multi-party chat sessions, or chat rooms, 20 using MSRP. 22 Status of this Memo 24 This Internet-Draft is submitted in full conformance with the 25 provisions of BCP 78 and BCP 79. 27 Internet-Drafts are working documents of the Internet Engineering 28 Task Force (IETF). Note that other groups may also distribute 29 working documents as Internet-Drafts. The list of current Internet- 30 Drafts is at http://datatracker.ietf.org/drafts/current/. 32 Internet-Drafts are draft documents valid for a maximum of six months 33 and may be updated, replaced, or obsoleted by other documents at any 34 time. It is inappropriate to use Internet-Drafts as reference 35 material or to cite them other than as "work in progress." 37 This Internet-Draft will expire on June 18, 2012. 39 Copyright Notice 41 Copyright (c) 2011 IETF Trust and the persons identified as the 42 document authors. All rights reserved. 44 This document is subject to BCP 78 and the IETF Trust's Legal 45 Provisions Relating to IETF Documents 46 (http://trustee.ietf.org/license-info) in effect on the date of 47 publication of this document. Please review these documents 48 carefully, as they describe your rights and restrictions with respect 49 to this document. Code Components extracted from this document must 50 include Simplified BSD License text as described in Section 4.e of 51 the Trust Legal Provisions and are provided without warranty as 52 described in the Simplified BSD License. 54 This document may contain material from IETF Documents or IETF 55 Contributions published or made publicly available before November 56 10, 2008. The person(s) controlling the copyright in some of this 57 material may not have granted the IETF Trust the right to allow 58 modifications of such material outside the IETF Standards Process. 59 Without obtaining an adequate license from the person(s) controlling 60 the copyright in such materials, this document may not be modified 61 outside the IETF Standards Process, and derivative works of it may 62 not be created outside the IETF Standards Process, except to format 63 it for publication as an RFC or to translate it into languages other 64 than English. 66 Table of Contents 68 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4 69 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 4 70 3. Motivations and Requirements . . . . . . . . . . . . . . . . . 6 71 4. Overview of Operation . . . . . . . . . . . . . . . . . . . . 7 72 5. Creating, Joining, and Deleting a Chat Room . . . . . . . . . 10 73 5.1. Creating a Chat Room . . . . . . . . . . . . . . . . . . . 10 74 5.2. Joining a Chat Room . . . . . . . . . . . . . . . . . . . 10 75 5.3. Deleting a Chat Room . . . . . . . . . . . . . . . . . . . 11 76 6. Sending and Receiving Instant Messages . . . . . . . . . . . . 12 77 6.1. Regular Messages . . . . . . . . . . . . . . . . . . . . . 12 78 6.2. Private Messages . . . . . . . . . . . . . . . . . . . . . 13 79 6.3. MSRP reports and responses . . . . . . . . . . . . . . . . 15 80 7. Nicknames . . . . . . . . . . . . . . . . . . . . . . . . . . 16 81 7.1. Using Nicknames within a Conference . . . . . . . . . . . 16 82 7.2. Modifying a Nickname . . . . . . . . . . . . . . . . . . . 18 83 7.3. Removing a Nickname . . . . . . . . . . . . . . . . . . . 18 84 7.4. Nicknames in Conference Event Packages . . . . . . . . . . 18 85 8. The SDP 'chatroom' attribute . . . . . . . . . . . . . . . . . 18 86 9. Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 87 9.1. Joining a chat room . . . . . . . . . . . . . . . . . . . 21 88 9.2. Setting up a nickname . . . . . . . . . . . . . . . . . . 23 89 9.3. Sending a regular message to the chat room . . . . . . . . 24 90 9.4. Sending a private message to a participant . . . . . . . . 26 91 9.5. Chunked private message . . . . . . . . . . . . . . . . . 27 92 9.6. Nickname in a conference information document . . . . . . 28 93 10. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 29 94 10.1. New MSRP Method . . . . . . . . . . . . . . . . . . . . . 29 95 10.2. New MSRP Header . . . . . . . . . . . . . . . . . . . . . 30 96 10.3. New MSRP Status Codes . . . . . . . . . . . . . . . . . . 30 97 10.4. New SDP Attribute . . . . . . . . . . . . . . . . . . . . 30 98 11. Security Considerations . . . . . . . . . . . . . . . . . . . 31 99 12. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 32 100 13. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . 32 101 14. References . . . . . . . . . . . . . . . . . . . . . . . . . . 32 102 14.1. Normative References . . . . . . . . . . . . . . . . . . . 32 103 14.2. Informative References . . . . . . . . . . . . . . . . . . 34 104 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 34 106 1. Introduction 108 The Message Session Relay Protocol (MSRP) [RFC4975] defines a 109 mechanism for sending a series of instant messages within a session. 110 The Session Initiation Protocol (SIP) [RFC3261] in combination with 111 the Session Description Protocol (SDP) [RFC4566] allows for two peers 112 to establish and manage such sessions. 114 In another application of SIP, a user agent can join in a multi-party 115 conversation called a conference that is hosted by a specialized user 116 agent called a focus [RFC4353]. Such a conference can naturally 117 involve MSRP sessions. It is the responsibility of an entity 118 handling the media to relay instant messages received from one 119 participant to the rest of the participants in the conference. 121 Several such systems already exist in the Internet. Participants in 122 a chat room can be identified with a pseudonym or nickname, and 123 decide whether their real identity is disclosed to other 124 participants. Participants can also use a rich set of features such 125 as the ability to send private instant messages to other 126 participants. 128 Similar conferences supporting chat rooms are already available 129 today. For example, Internet Relay Chat (IRC) [RFC2810], Extensible 130 Messaging and Presence Protocol (XMPP): Core [RFC6120] based chat 131 rooms, and many other proprietary systems provide chat room 132 functionality. Specifying equivalent functionality for MSRP-based 133 systems provides competitive features and enables interworking 134 between the systems. 136 This document defines requirements, conventions, and extensions for 137 providing private messages and nickname management in centralized 138 conferences with MSRP. Participants in a chat room can be identified 139 by a pseudonym, and decide if their real identity is disclosed to 140 other participants. This memo uses the SIP Conferencing Framework 141 [RFC4353] as a design basis. It also aims to be compatible with the 142 A Framework for Centralized Conferencing [RFC5239]. Should 143 requirements arise, future mechanisms for providing similar 144 functionality in generic conferences might be developed, for example, 145 where the media is not only restricted to MSRP. The mechanisms 146 described in this document provide a future compatible short-term 147 solution for MSRP centralized conferences. 149 2. Terminology 151 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 152 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 153 document are to be interpreted as described in RFC 2119, BCP 14 154 [RFC2119], and indicate requirement levels for compliant 155 implementations. 157 This memo deals with tightly coupled SIP conferences defined in SIP 158 Conferencing Framework [RFC4353] and adopts the terminology from that 159 document. In addition to that terminology, we introduce some new 160 terms: 162 Nickname: a pseudonym or descriptive name associated to a 163 participant. See Section 7 for details 165 Multi-party chat: an instance of a tightly coupled conference, in 166 which the media exchanged between the participants consist of MSRP 167 based instant messages. Also known as a chat room. 169 Chat Room: a synonym for a multi-party chat. 171 Chat Room URI: a URI that identifies a particular chat room, and is 172 a synonym of a Conference URI defined in RFC 4353 [RFC4353]. 174 Sender: the conference participant that originally created an 175 instant message and sent it to the chat room for delivery. 177 Recipient: the destination conference participant(s). This 178 defaults to the full conference participant list, minus the IM 179 Sender. 181 MSRP switch: a media level entity that is a MSRP endpoint. It is a 182 special MSRP endpoint that receives MSRP messages, and delivers 183 them to the other conference participants. The MSRP switch has a 184 similar role to a conference mixer with the exception that the 185 MSRP switch does not actually "mix" together different input media 186 streams; it merely relays the messages between participants. 188 Private Instant Message: an instant message sent in a chat room 189 intended for a single participant. A private IM is usually 190 rendered distinctly from the rest of the IMs, indicating that the 191 message was a private communication. 193 Anonymous URI: a URI concealing the participant's SIP AOR from the 194 other participants in the conference. The allocation of such a 195 URI is out of scope of this specification. An anonymous URI must 196 be valid for the length of the conference, and will be utilized by 197 the MSRP switch to forward messages to and from anonymous 198 participants. 200 Conference Event Package: a notification mechanism that allows 201 conference participants to learn conference information including 202 roster and state changes in a conference. This would typically be 203 A Session Initiation Protocol (SIP) Event Package for Conference 204 State [RFC4575] or Conference Event Package Data Format Extension 205 for Centralized Conferencing [I-D.ietf-xcon-event-package]. 207 3. Motivations and Requirements 209 Although conference frameworks describing many types of conferencing 210 applications already exist, such as the Framework for Centralized 211 Conferencing [RFC5239] and the SIP Conferencing Framework [RFC4353], 212 the exact details of session-based instant messaging conferences are 213 not well-defined at the moment. 215 To allow interoperable chat implementations, for both conference- 216 aware, and conference-unaware user agents, certain conventions for 217 MSRP conferences need to be defined. It also seems beneficial to 218 provide a set of features that enhance the baseline multi-party MSRP 219 in order to be able to create systems that have functionality on par 220 with existing chat systems, as well as enable building interworking 221 gateways to these existing chat systems. 223 We define the following requirements: 225 REQ-1: A basic requirement is the existence of a multi-party 226 conference, where participants can join and leave the 227 conference and get instant messages exchanged to the rest of 228 the participants. 230 REQ-2: A conference participant must be able to determine the 231 identities of the sender and recipient of the received IMs. 233 REQ-3: A conference participant must be able to determine the 234 recipient of the received message. For instance, the 235 recipient of the message might be the entire conference or a 236 single participant of the conference (i.e., a private 237 message). 239 REQ-4: It must be possible to send a message to a single participant 240 within the conference (i.e., a private instant message). 242 REQ-5: A conference participant may have a nickname or pseudonym 243 associated with their real identity. 245 REQ-6: It must be possible for a participant to change their 246 nickname during the progress of the conference. 248 REQ-7: It must be possible that a participant is only known by an 249 anonymous identity and not their real identity to the rest of 250 the conference. 252 REQ-8: It must be possible for the conference participants to learn 253 the chat room capabilities described in this document. 255 4. Overview of Operation 257 In order to set up a conference, one must first be created. Users 258 wishing to host a conference themselves can of course do just that; 259 their User Agent (UA) simply morphs from an ordinary UA into a 260 special purpose one called a Focus UA. Another, commonly used setup 261 is one where a dedicated node in the network functions as a Focus UA. 263 Each chat room has an identity of its own: a SIP URI that 264 participants use to join the conference, e.g. by sending an INVITE 265 request. The conference focus processes the invitations, and as 266 such, maintains SIP dialogs with each participant. In a multi-party 267 chat, or chat room, MSRP is one of the established media streams. 268 Each conference participant establishes an MSRP session with the MSRP 269 switch, which is a special purpose MSRP application. The MSRP 270 sessions can be relayed by one or more MSRP relays, which are 271 specified in RFC 4976 [RFC4976]. This is illustrated in Figure 1 272 MSRP Sessions 273 +---------------------------+ 274 | +-----------+ | 275 +---+--+ +---+--+ | | 276 | SIP | | SIP | | | 277 | MSRP | | MSRP | +--+---+----+ 278 |Client| |Client| | MSRP | 279 +---+--+ ++-----+ | Relay | 280 | | +-----+-----+ 281 SIP Dialogs | / | 282 | | | MSRP Sessions 283 +----+------+--+ | 284 | Conference | +-------+-----+ 285 | Focus UA | | MSRP | 286 | |........| Switch | 287 | | | | 288 +---+--------+-+ +-------+-----+ 289 | \ | 290 SIP Dialogs | | | MSRP Sessions 291 | \ | 292 +--+---+ +-+----+ +-----+------+ 293 | SIP | | SIP | | MSRP | 294 | MSRP | | MSRP | | Relay | 295 |Client| |Client| +-+-------+--+ 296 +---+--+ +--+---+ | | 297 | +-----------+ | 298 +------------------------------+ 299 MSRP sessions 301 Figure 1: Multi-party chat overview shown with MSRP Relays and a 302 conference Focus UA 304 The MSRP switch is similar to a conference mixer in that it handles 305 media sessions with each of the participants and bridges these 306 streams together. However, unlike a conference mixer, the MSRP 307 switch merely forwards messages between participants but doesn't 308 actually mix the streams in any way. The system is illustrated in 309 Figure 2. 311 +------+ 312 | MSRP | 313 |Client| 314 +------+ +--.---+ +------+ 315 | MSRP | | | MSRP | 316 |Client| | _|Client| 317 +------._ | ,' +------+ 318 `._ | ,' 319 `.. +----------+ ,' 320 `| |' 321 | MSRP | 322 | Switch | 323 ,| |_ 324 _,-'' +----------+ ``-._ 325 +------.-' | `--+------+ 326 | MSRP | | | MSRP | 327 |Client| | |Client| 328 +------+ | +------+ 329 +---'--+ 330 | MSRP | 331 |Client| 332 +------+ 334 Figure 2: Multi-party chat in a Centralized Conference 336 Typically conference participants also subscribe to a conference 337 event package to gather information about the conference roster in 338 the form of conference state notifications. For example, 339 participants can learn about other participants' identities, 340 including their nicknames. 342 All messages in the chat room use the 'Message/CPIM' wrapper content 343 type [RFC3862], so that it is possible to distinguish between private 344 and regular messages. When a participant wants to send an instant 345 message to the conference, it constructs an MSRP SEND request and 346 submits it to the MSRP switch including a regular payload (e.g. a 347 Message/CPIM message that contains a text, HTML, an image, etc.). 348 The Message/CPIM To header is set to the chat room URI. The switch 349 then fans out the SEND request to all of the other participants using 350 their existing MSRP sessions. 352 A participant can also send a private instant message addressed to a 353 participant whose identity has been learned, e.g. via a conference 354 event package. In this case the sender creates an MSRP SEND request 355 with a Message/CPIM wrapper whose To header contains not the chat 356 room URI but the recipient's URI. The MSRP switch then forwards the 357 SEND request to that recipient. This specification supports the 358 sending of private messages to one and only one recipient. However, 359 if the recipient is logged from different endpoints, the MSRP switch 360 will distribute the private message to each endpoint the recipient is 361 logged. 363 We extend the current MSRP negotiation that takes place in SDP 364 [RFC4566] to allow participants to learn whether the chat room 365 supports and is willing to accept (e.g. due to local policy 366 restrictions) certain MSRP functions defined in this memo, such as 367 nicknames or private messaging. 369 Naturally, when a participant wishes to leave a chat room, it sends a 370 SIP BYE request to the Focus UA and terminates the SIP dialog with 371 the focus and MSRP sessions with the MSRP switch. 373 This document assumes that each chat room is allocated its own SIP 374 URI. A user joining a chat room sends an INVITE request to that SIP 375 URI, and as a result, a new MSRP session is established between the 376 user and the MSRP switch. It is assumed that an MSRP session is 377 mapped to a chat room. If a user wants to join a second chat room, 378 he creates a different INVITE request, through a different SIP 379 dialog, which leads to the creation of a second MSRP session between 380 the user and the MSRP switch. Notice that these two MSRP sessions 381 can still be multiplexed over the same TCP connection as per regular 382 MSRP procedures. However, each chat room is associated to a unique 383 MSRP session and a unique SIP dialog. 385 5. Creating, Joining, and Deleting a Chat Room 387 5.1. Creating a Chat Room 389 Since we consider a chat room a particular type of conference having 390 MSRP media, the methods defined by the SIP Conference Framework 391 [RFC4353] for creating conferences are directly applicable to a chat 392 room. 394 Once a chat room is created, it is identified by a SIP URI, like any 395 other conference. 397 5.2. Joining a Chat Room 399 Participants usually join the conference by sending an INVITE request 400 to the conference URI. As long as the conference policy allows, the 401 INVITE request is accepted by the focus and the user is brought into 402 the conference. 404 The MSRP switch needs to be aware of the URIs of the participant 405 (SIP, Tel, or IM URIs) in order to validate messages sent from this 406 participant prior to their forwarding. This information is known to 407 the focus of the conference. Therefore an interface between the 408 focus and the MSRP switch is assumed. However, the interface between 409 the focus and the MSRP switch is outside the scope of this document. 411 Conference aware participants will detect that the peer is a focus 412 due to the presence of the "isfocus" feature tag [RFC3840] in the 413 Contact header field of the 200-class response to the INVITE request. 414 Conference unaware participants will not notice it is a focus, and 415 can not apply the additional mechanisms defined in this document. 416 Participants are also aware that the mixer is an MSRP switch due to 417 the presence of a 'message' media type and either TCP/MSRP or TCP/ 418 TLS/MSRP as the protocol field in the media line of SDP [RFC4566]. 420 The conference focus of a chat room MUST include support for a 421 Message/CPIM [RFC3862] top-level wrapper for the MSRP messages by 422 setting the 'accept-types' MSRP media line attribute in the SDP offer 423 or answer to include 'Message/CPIM'. 425 Note that the 'Message/CPIM' wrapper is used to carry the sender 426 information that, otherwise, it will not be available to the 427 recipient. Additionally, 'Message/CPIM' wrapper carries the 428 recipient information (e.g. To and Cc: headers). 430 If a participant wants to remain anonymous to the rest of the 431 participants in the conference, the participant's UA must provide an 432 anonymous URI to the conference focus. The URI will be used in the 433 From and To headers in the 'Message/CPIM' wrapper, and can be learned 434 by the other participants of the conference. Notice that in order 435 for the anonymity mechanism to work, the anonymous URI must not 436 reveal the participant's SIP AOR. The mechanism for acquiring an 437 anonymous URI is outside the scope of this specification. 439 The conference focus of a chat room MUST learn the chat room 440 capabilities of each participant that joins the chat room. The 441 conference focus MUST inform the MSRP switch of such support in order 442 to prevent the MSRP switch from distributing private messages to 443 participants who do not support private messaging. The recipient 444 would not be able to render the message as private, and any potential 445 reply would be sent to the whole chat room. 447 5.3. Deleting a Chat Room 449 As with creating a conference, the methods defined by the SIP 450 Conference Framework [RFC4353] for deleting a conference are directly 451 applicable to a chat room. The MSRP switch will terminate the MSRP 452 sessions with all the participants. 454 Deleting a chat room is an action that heavily depends on the policy 455 of the chat room. The policy can determine that the chat room is 456 deleted when the creator leaves the conference, or with any out of 457 band mechanism. 459 6. Sending and Receiving Instant Messages 461 6.1. Regular Messages 463 This section describes the conventions used to send and receive 464 instant messages that are addressed to all the participants in the 465 chat room. These are sent over a regular MSRP SEND request that 466 contains a Message/CPIM wrapper [RFC3862] that in turn contains the 467 desired payload (e.g. text, image, video-clip, etc.). 469 When a chat room participant wishes to send an instant message to all 470 the other participants in the chat room, it constructs an MSRP SEND 471 request according to the procedures specified in RFC 4975 [RFC4975]. 472 The sender MAY choose the desired MSRP report model (e.g., populate 473 the Success-Report and Failure-Report MSRP header fields). 475 The SEND request MUST contain a top-level wrapper of type 'Message/ 476 CPIM' according to RFC 3862 [RFC3862]. The actual instant message 477 payload MUST be included as payload of the 'Message/CPIM' wrapper and 478 MAY be of any type negotiated in the SDP 'accept-types' attribute 479 according to the MSRP rules. 481 On sending a regular message the sender MUST populate the To header 482 of the Message/CPIM wrapper with the URI of the chat room. The 483 sender SHOULD populate the From header of the Message/CPIM wrapper 484 with a proper identity by which the user is recognized in the 485 conference. Identities that can be used (among others) are: 487 o A SIP URI [RFC3261] representing the participant's address-of- 488 record 490 o A tel URI [RFC3966] representing the participant's telephone 491 number 493 o An IM URI [RFC3860] representing the participant's instant 494 messaging address 496 o An Anonymous URI representing the participant's anonymous address 498 An MSRP switch that receives a SEND request from a participant SHOULD 499 first verify that the From header field of the Message/CPIM wrapper 500 is correctly populated with a valid URI of a participant. This 501 imposes a requirement for the focus of the conference to inform the 502 MSRP switch of the URIs by which the participant is known, in order 503 for the MSRP switch to validate messages. Section 6.3 provides 504 further information with the actions to be taken in case this 505 validation fails. 507 Then the MSRP switch should inspect the To header field of the 508 Message/CPIM wrapper. If the MSRP switch receives a message 509 containing several To header fields in the Message/CPIM wrapper the 510 MSRP switch MUST reject the MSRP SEND request with a 403 response, as 511 per procedures in RFC 4975 [RFC4975]. Then, if the To header field 512 of the Message/CPIM wrapper contains the chat room URI and there are 513 no other To header fields, the MSRP switch can generate a copy of the 514 SEND request to each of the participants in the conference except the 515 sender. The MSRP switch MUST NOT modify the content received in the 516 SEND request. However, the MSRP switch MAY re-chunk any of the 517 outbound MSRP SEND requests. 519 Note that the MSRP switch does not need to wait for the reception of 520 the complete MSRP chunk or MSRP message before it starts the 521 distribution to the rest of the participants. Instead, once the MSRP 522 switch has received the headers of the Message/CPIM wrapper it SHOULD 523 start the distribution process. Having the header of the Message/ 524 CPIM wrapper only in the first chunk, the MSRP switch MUST track the 525 Message-Id until the last chunk of the message has been distributed. 527 An MSRP endpoint that receives a SEND request from the MSRP switch 528 containing a Message/CPIM wrapper SHOULD first inspect the To header 529 field of the Message/CPIM wrapper. If the To header field is set to 530 the chat room URI, it should render it as a regular message that has 531 been distributed to all the participants in the conference. Then the 532 MSRP endpoint SHOULD inspect the From header field of the Message/ 533 CPIM wrapper to identify the sender. The From header field will 534 include a URI that identifies the sender. The endpoint might have 535 also received further identity information through a subscription to 536 a conference event package. 538 6.2. Private Messages 540 This section describes the conventions used to send and receive 541 private instant messages, i.e., instant messages that are addressed 542 to one participant of the chat room rather to all of them. A chat 543 room can signal support for private messages using the 'chatroom' 544 attribute in SDP (see Section 8 for details). 546 When a chat room participant wishes to send a private instant message 547 to a participant in the chat room, it follows the same procedures for 548 creating a SEND request as for regular messages (Section 6.1). The 549 only difference is that the MSRP endpoint MUST populate a single To 550 header of the Message/CPIM wrapper with the identity of the intended 551 recipient. The identity can be SIP, TEL, and IM URIs typically 552 learned from the information received in notifications of a 553 conference event package. 555 As for regular messages, an MSRP switch that receives a SEND request 556 from a participant SHOULD first verify that the From header field of 557 the Message/CPIM wrapper is correctly populated with a valid URI 558 (i.e., the URI is a participant of this chat room). Section 6.3 559 provides further information with the actions to be taken in case 560 this validation fails. 562 Then the MSRP switch MUST inspect the To header field of the Message/ 563 CPIM wrapper. If the MSRP switch receives a message containing 564 several To header fields in the Message/CPIM wrapper the MSRP switch 565 MUST reject the MSRP SEND request with a 403 response, as per 566 procedures in RFC 4975 [RFC4975]. Then the MSRP switch MUST verify 567 that the To header of the Message/CPIM wrapper matches the URI of a 568 participant of the chat room. If this To header field does not 569 contain the URI of a participant of the chat room or if the To header 570 field cannot be resolved (e.g., caused by a mistyped URI), the MSRP 571 switch MUST reject the request with a 404 response. This new 404 572 status code indicates a failure to resolve the recipient URI in the 573 To header field of the Message/CPIM wrapper. 575 Notice the importance of the From and To headers in the Message/ 576 CPIM wrapper. If an intermediary modifies these values, the MSRP 577 switch might not be able to identify the source or intended 578 destination of the message, resulting in a rejection of the 579 message. 581 Finally, the MSRP switch MUST verify that the recipient supports 582 private messages. If the recipient does not support private 583 messages, the MSRP switch MUST reject the request with a 428 584 response. This new response 428 indicates that the recipient does 585 not support private messages. Any potential REPORT request that the 586 MSRP switch sends to the sender MUST include a Message/CPIM wrapper 587 containing the original From header field included in the SEND 588 request and the To header field of the original Message/CPIM wrapper. 589 The MSRP switch MUST NOT forward private messages to a recipient that 590 does not support private messaging. 592 If successful, the MSRP switch should search its mapping table to 593 find the MSRP sessions established towards the recipient. If a match 594 is found the MSRP switch MUST create a SEND request and MUST copy the 595 contents of the sender's message to it. 597 An MSRP endpoint that receives a SEND request from the MSRP switch 598 does the same validations as for regular messages (Section 6.1). If 599 the To header field is different from the chat room URI, the MSRP 600 endpoints knows that this is a private message. The endpoint should 601 render who it is from based on the value of the From header of the 602 Message/CPIM wrapper. The endpoint can also use the sender's 603 nickname, possibly learned via a conference event package, to render 604 such nickname rather than the sender's actual URI. 606 It is possible that a participant, identified by a SIP Address of 607 Record or other valid URI, joins a conference of instant messages 608 from two or more different SIP UAs. It is RECOMMENDED that the MSRP 609 switch can map a URI to two or more MSRP sessions. If the policy of 610 the server allows for this, the MSRP switch MUST copy all messages 611 intended to the recipient through each MSRP session mapped to the 612 recipient's URI. 614 6.3. MSRP reports and responses 616 This section discusses the common procedures for regular and private 617 messages with respect to MSRP reports and responses. Any particular 618 procedure affecting only regular messages or only private messages is 619 discussed in the previous Section 6.1 or Section 6.2, respectively. 621 MSRP switches MUST follow the success report and failure report 622 handling described in section 7 of RFC 4975 [RFC4975], complemented 623 with the procedures described in this section. The MSRP switch MUST 624 act as an MSRP endpoint receiver of the request according to section 625 5.3 of RFC 4975 [RFC4975]. 627 If the MSRP switch receives an MSRP SEND request that does not 628 contain a Message/CPIM wrapper, the MSRP switch MUST reject the 629 request with a 415 response (specified in RFC 4975 [RFC4975]). 631 If the MSRP switch receives an MSRP SEND request where the URI 632 included in the From header field of the Message/CPIM wrapper is not 633 valid, (e.g, because it does not "belong" to the sender of the 634 message or is not a valid participant of the chat room), the MSRP 635 switch MUST reject the request with a 403 response. In non-error 636 cases, the MSRP switch MUST construct responses according to section 637 7.2 of RFC 4975 [RFC4975]. 639 When the MSRP switch forwards a SEND request, it MAY use any report 640 model in the copies intended for the recipients. The receiver 641 reports from the recipients MUST NOT be forwarded to the originator 642 of the original SEND request. This could lead to having the sender 643 receiving multiple reports for a single MSRP request. 645 7. Nicknames 647 A common characteristic of existing chat room services is that 648 participants have the ability to present themselves with a nickname 649 to the rest of the participants of the conference. It is used for 650 easy reference of participants in the chat room, and can also provide 651 anonymous participants with a meaningful descriptive name. 653 A nickname is a useful construct in many use cases, of which MSRP 654 chat is but one example. It is associated with a URI of which the 655 participant is known to the focus. Therefore, if a user joins the 656 chat room under the same URI from multiple devices, he or she may 657 request the same nickname across all these devices. 659 A nickname is a user selectable appearance of which the participant 660 wants to be known to the other participants. It is not a 'display- 661 name', but it is used somewhat like a display name. A main 662 difference is that a nickname is unique inside a chat room to allow 663 an unambiguous reference to a participant in the chat. Nicknames may 664 be long lived, or may be temporary. Users also need to reserve a 665 nickname prior to its utilization. 667 This memo specifies the nickname as a string. The nickname string 668 MUST be unambiguous within the scope of the chat room (conference 669 instance). This scope is similar to having a nickname unique inside 670 a chat room from Extensible Messaging and Presence Protocol 671 [RFC6120]. The chat room may have policies associated with 672 nicknames. It may not accept nickname strings at all, or a it may 673 provide a wider unambiguous scope like a domain or server, similar to 674 Internet Relay Chat (IRC) [RFC2810]. 676 7.1. Using Nicknames within a Conference 678 This memo provides a mechanism to reserve a nickname for a 679 participant for as long as the participant is logged into the chat 680 room. The mechanism is based on a NICKNAME MSRP method (see below) 681 and a new "Use-Nickname" header. Note that other mechanisms may 682 exist (for example, a web page reservation system), although they are 683 outside the scope of this document. 685 A conference participant who has established an MSRP session with the 686 MSRP switch, where the MSRP switch has indicated the support and 687 availability of nicknames with the 'nicknames' token in the 688 'chatroom' SDP attribute, MAY send a NICKNAME request to the MSRP 689 switch. The NICKNAME request MUST include a new Use-Nickname header 690 that contains the nickname string that the participant wants to 691 reserve. MSRP NICKNAME requests MUST NOT include Success-Report or 692 Failure-Report header fields. 694 An MSRP switch that receives a NICKNAME request containing a nickname 695 in the Use-Nickname header field SHOULD first verify whether the 696 policy of the chat room allows the nickname functionality. If not 697 allowed, the MSRP switch MUST reject the request with a 501 response, 698 as per RFC 4975 [RFC4975]. 700 If the policy of the chat room allows the usage of nicknames, the 701 MSRP switch SHOULD validate that the SIP AOR is entitled to reserve 702 the nickname. This may include, e.g., allowing that the 703 participant's URI may use the same nickname when the participant has 704 joined the chat room from different devices under the same URI. The 705 participant's authenticated identity can be derived after a 706 successful SIP Digest Authentication [RFC3261], be included in a 707 trusted SIP P-Asserted-Identity header field [RFC3325], be included 708 in a valid SIP Identity header field [RFC4474], or be derived from 709 any other present or future SIP authentication mechanism. Once the 710 MSRP switch has validated that the participant is entitled to reserve 711 the requested nickname, the MSRP switch MUST answer the NICKNAME 712 request with a 200 response as per regular MSRP procedures. 714 The reservation of a nickname can fail, e.g. if the NICKNAME request 715 contains a malformed or non-existent Use-Nickname header field, or if 716 the same nickname has already been reserved by another participant 717 (i.e., by another URI) in the chat room. The validation can also 718 fail where the sender of the message is not entitled to reserve the 719 nickname. In any of these cases the MSRP switch MUST answer the 720 NICKNAME request with a 423 response. The semantics of the 423 721 response are: "Nickname usage failed; the nickname is not allocated 722 to this user". 724 As indicated earlier, this specification defines a new MSRP header 725 field: "Use-Nickname". The Use-Nickname header field carries a 726 nickname string, and SHOULD be included in the NICKNAME requests. 728 The syntax of the NICKNAME method and the "Use-Nickname" header field 729 is built upon the MSRP formal syntax [RFC4975] 731 ext-method =/ NICKNAMEm 732 NICKNAMEm = %x4E.49.43.4B.4E.41.4D.45 ; NICKNAME in caps 733 ext-header =/ Use-Nickname 734 ; ext-header defined in RFC 4975 735 Use-Nickname = "Use-Nickname:" SP nickname 736 nickname = quoted-string 737 ; quoted-string defined in RFC 4975 739 Once the MSRP switch has reserved a nickname and has bound it to a 740 URI (e.g., a SIP Address-of-Record), the MSRP server MAY allow the 741 usage of the same nickname by the same user (identified by the same 742 URI, such as a SIP AoR) over a second MSRP session. This might be 743 the case if the user joins the same chat room from a different SIP 744 User Agent. In this case, the user MAY request the same or a 745 different nickname than that used in conjunction with the first MSRP 746 session; the MSRP server MAY accept the usage of the same nickname by 747 the same user. The MSRP switch MUST NOT automatically assign the 748 same nickname to more than one MSRP session established from the same 749 URI, because this can create confusion to the user as whether the 750 same nickname is bound to the second MSRP session. 752 7.2. Modifying a Nickname 754 Typically a participant will reserve a nickname as soon as the 755 participant joins the chat room. But it is also possible for a 756 participant to modify his/her own nickname and replace it with a new 757 one at any time during the duration of the MSRP session. 758 Modification of the nickname is not different from the initial 759 reservation and usage of a nickname, thus the NICKNAME method is used 760 as described in Section 7.1. 762 If a NICKNAME request that attempts to modify the current nickname of 763 the user for some reason fails, the current nickname stays in effect. 764 A new nickname comes into effect and the old one is released only 765 after a NICKNAME request is accepted with a 200 response. 767 7.3. Removing a Nickname 769 If the participant no longer wants to be known by a nickname in the 770 conference, the participant can follow the method described in 771 Section 7.2. The nickname element of the Use-Nickname header MUST be 772 set to an empty quoted string. 774 7.4. Nicknames in Conference Event Packages 776 Typically the conference focus acts as a notifier of the conference 777 event package. To notify subscribers of the nickname reserved for a 778 given participant, it is RECOMMENDED that conference focus and 779 endpoints support Conference Event Package Data Format Extension for 780 Centralized Conferencing [I-D.ietf-xcon-event-package]. The 781 Conference Information Data Model for Centralized Conferencing 782 [I-D.ietf-xcon-common-data-model] extends the user element from RFC 783 4575 [RFC4575] with a 'nickname' attribute. 785 8. The SDP 'chatroom' attribute 787 There are a handful of use cases where a participant would like to 788 learn the chat room capabilities supported by the MSRP switch and the 789 chat room. For example, a participant would like to learn if the 790 MSRP switch supports private messaging, otherwise, the participant 791 may send what he believes is a private instant message addressed to a 792 participant, but since the MSRP switch does not support the functions 793 specified in this memo, the message gets eventually distributed to 794 all the participants of the chat room. 796 The reverse case also exists. A participant, say Alice, whose user 797 agent does not support the extensions defined by this document joins 798 the chat room. The MSRP switch learns that Alice's application does 799 not support private messaging nor nicknames. If another participant, 800 say Bob, sends a private message to Alice, the MSRP switch does not 801 distribute it to Alice, because Alice is not able to differentiate it 802 from a regular message sent to the whole roster. Furthermore, if 803 Alice replied to this message, she would do it to the whole roster. 804 Because of this, the MSRP switch also keeps track of users who do not 805 support the extensions defined in this document. 807 In another scenario, the policy of a chat room may indicate that 808 certain functions are not allowed. For example, the policy may 809 indicate that nicknames or private messages are not allowed. 811 In order to provide the user with a good chat room experience, we 812 define a new 'chatroom' SDP attribute. The 'chatroom' attribute is a 813 media-level value attribute [RFC4566] that MAY be included in 814 conjunction with an MSRP media stream (i.e., when an m= line in SDP 815 indicates "TCP/MSRP" or "TCP/TLS/MSRP"). The 'chatroom' attribute 816 without further modifiers (e.g., chat-tokens) indicates that the 817 endpoint supports the procedures described in this document for 818 transferring MSRP messages to/from a multi-party conference. The 819 'chatroom' attribute can be complemented with additional modifiers 820 that further indicate the intersection of support and chat room local 821 policy allowance for a number of functions specified in this 822 document. Specifically, we provide the means for indicating support 823 to use nicknames and private messaging. 825 The 'chatroom' SDP attribute has the following Augmented BNF (ABNF) 826 [RFC5234] syntax: 828 attribute =/ chatroom-attr 829 ; attribute defined in RFC 4566 830 chatroom-attr = chatroom-label [":" chat-token 831 *(SP chat-token)] 832 chatroom-label = "chatroom" 833 chat-token = (nicknames-token / private-msg-token / 834 ext-token) 835 nicknames-token = "nickname" 836 private-msg-token = "private-messages" 837 ext-token = private-token / standard-token 838 private-token = toplabel "." *(domainlabel ".") token 839 ; toplabel defined in RFC 3261 840 ; domainlabel defined in RFC 3261 841 ; token defined in RFC 3261 842 standard-token = token 844 A given 'chat-token' value MUST NOT appear more than once in a 845 'chatroom' attribute. 847 A conference focus that includes the 'nicknames' token in the session 848 description is signaling that the MSRP switch supports and the chat 849 room allows to use the procedures specified in Section 7. A 850 conference focus that includes the 'private-messages' in the SDP 851 description is signaling that the MSRP switch supports and the chat 852 room allows to use the procedures specified in Section 6.2. 854 Example of the 'chatroom' attribute for an MSRP media stream that 855 indicates the acceptance of nicknames and private messages: 857 a=chatroom:nickname private-messages 859 An example of a 'chatroom' attribute for an MSRP media stream where 860 the endpoint, e.g., an MSRP switch, does not allow either nicknames 861 nor private messages. 863 a=chatroom 865 The 'chatroom' attribute allows extensibility with the addition of 866 new tokens. No IANA registry is provided at this time, since no 867 extensions are expected at the time of this writing. Extensions to 868 the 'chatroom' attribute can be defined in IETF documents or as 869 private vendor extensions. 871 Extensions defined in IETF document MUST follow the 'standard-token' 872 ABNF previously defined. In this type of extensions, are must be 873 taken in the selection of the token to avoid a clash with any of the 874 tokens previously defined. 876 Private extensions MUST follow the 'private-token' ABNF previously 877 defined. The 'private-token' MUST include the DNS name of the vendor 878 in reverse order in the token, in order to avoid clashes of tokens. 879 The following is an example of a "chat.foo" extension by vendor 880 "example.com" 882 a=chatroom:nickname private-messages com.example.chat.foo 884 9. Examples 886 9.1. Joining a chat room 888 Figure 3 presents a flow diagram where Alice joins a chat room by 889 sending an INVITE request. This INVITE request contains a session 890 description that includes the chatroom extensions defined in this 891 document. 893 Alice Conference focus 894 | | 895 |F1: (SIP) INVITE | 896 |----------------------->| 897 |F2: (SIP) 200 OK | 898 |<-----------------------| 899 |F3: (SIP) ACK | 900 |----------------------->| 901 | | 903 Figure 3: Flow diagram of a user joining a chat room 905 F1: Alice constructs an SDP description that includes an MSRP media 906 stream. She also indicates her support for the chatroom extensions 907 defined in this document. She sends the INVITE request to the chat 908 room server. 910 INVITE sip:chatroom22@chat.example.com SIP/2.0 911 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 912 Max-Forwards: 70 913 From: Alice ;tag=9fxced76sl 914 To: Chatroom 22 915 Call-ID: 3848276298220188511@atlanta.example.com 916 CSeq: 1 INVITE 917 Contact: 918 Content-Type: application/sdp 919 Content-Length: 290 921 v=0 922 o=alice 2890844526 2890844526 IN IP4 client.atlanta.example.com 923 s=- 924 c=IN IP4 client.atlanta.example.com 925 m=message 7654 TCP/MSRP * 926 a=accept-types:message/cpim text/plain text/html 927 a=path:msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 928 a=chatroom:nickname private-messages 930 F2: The chat room server accepts the session establishment. It 931 includes the 'isfocus' and other relevant feature tags in the Contact 932 header field of the response. The chat room server also builds an 933 SDP answer that forces the reception of messages wrapped in Message/ 934 CPIM wrappers. It also includes the 'chatroom' attribute with the 935 allowed extensions. 937 SIP/2.0 200 OK 938 Via: SIP/2.0/TCP client.atlanta.example.com:5060;branch=z9hG4bK74bf9 939 ;received=192.0.2.101 940 From: Alice ;tag=9fxced76sl 941 To: Chatroom 22 ;tag=8321234356 942 Call-ID: 3848276298220188511@atlanta.example.com 943 CSeq: 1 INVITE 944 Contact: \ 945 ;methods="INVITE,BYE,OPTIONS,ACK,CANCEL,SUBSCRIBE,NOTIFY" \ 946 ;automata;isfocus;message;event="conference" 947 Content-Type: application/sdp 948 Content-Length: 290 950 v=0 951 o=chat 2890844527 2890844527 IN IP4 chat.example.com 952 s=- 953 c=IN IP4 chat.example.com 954 m=message 12763 TCP/MSRP * 955 a=accept-types:message/cpim 956 a=accept-wrapped-types:text/plain text/html * 957 a=path:msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 958 a=chatroom:nickname private-messages 960 F3: The session established is acknowledged (details not shown). 962 9.2. Setting up a nickname 964 Figure 4 shows an example of Alice setting up a nickname using the 965 conference as provider. Her first proposal is not accepted because 966 that proposed nickname is already in use. Then, she makes a second 967 proposal with a new nickname. This second proposal is accepted. 969 Alice MSRP switch 970 | | 971 |F1: (MSRP) NICKNAME | 972 |----------------------->| 973 |F2: (MSRP) 423 | 974 |<-----------------------| 975 |F3: (MSRP) NICKNAME | 976 |----------------------->| 977 |F4: (MSRP) 200 | 978 |<-----------------------| 979 | | 981 Figure 4: Flow diagram of a user setting up her nickname 983 F1: Alice sends an MSRP NICKNAME request that contains her proposed 984 nicknames in the Use-Nickname header field. 986 MSRP d93kswow NICKNAME 987 To-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 988 From-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 989 Use-Nickname: "Alice the great" 990 -------d93kswow$ 992 F2: The MSRP switch analyzes the existing allocation of nicknames and 993 detects that the nickname "Alice the great" is already provided to 994 another participant in the chat room. The MSRP switch answers with a 995 423 response. 997 MSRP d93kswow 423 Nickname usage failed 998 To-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 999 From-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1000 -------d93kswow$ 1002 F3: Alice receives the response. She proposes a new nickname in a 1003 second NICKNAME request. 1005 MSRP 09swk2d NICKNAME 1006 To-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1007 From-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1008 Use-Nickname: "Alice in Wonderland" 1009 -------09swk2d$ 1011 F4: The MSRP switch accepts the nickname proposal and answers with a 1012 200 response. 1014 MSRP 09swk2d 200 OK 1015 To-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1016 From-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1017 -------09swk2d$ 1019 9.3. Sending a regular message to the chat room 1021 Figure 5 depicts a flow diagram where Alice is sending a regular 1022 message addressed to the chat room. The MSRP switch distributes the 1023 message to the rest of the participants. 1025 Alice MSRP switch Bob Charlie 1026 | | | | 1027 | F1: (MSRP) SEND | | | 1028 |--------------------->| F3: (MSRP) SEND | | 1029 | F2: (MSRP) 200 |----------------------->| | 1030 |<---------------------| F4: (MSRP) SEND | | 1031 | |------------------------------->| 1032 | | F5: (MSRP) 200 OK | | 1033 | |<-----------------------| | 1034 | | F6: (MSRP) 200 OK | | 1035 | |<------------------------------ | 1036 | | | | 1037 | | | | 1039 Figure 5: Sending a regular message to the chat room 1041 F1: Alice builds a text message and wraps it in a Message/CPIM 1042 wrapper. She addresses the message to the chat room. She encloses 1043 the resulting Message/CPIM wrapper in an MSRP SEND request and sends 1044 it to the MSRP switch via the existing TCP connection. 1046 MSRP 3490visdm SEND 1047 To-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1048 From-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1049 Message-ID: 99s9s2 1050 Byte-Range: 1-*/* 1051 Content-Type: message/cpim 1053 To: 1054 From: 1055 DateTime: 2009-03-02T15:02:31-03:00 1056 Content-Type: text/plain 1058 Hello guys, how are you today? 1059 -------3490visdm$ 1061 F2: The MSRP switch acknowledges the reception of the SEND request 1062 with a 200 (OK) response. 1064 MSRP 3490visdm 200 OK 1065 To-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1066 From-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1067 Message-ID: 99s9s2 1068 -------3490visdm$ 1070 F3: The MSRP switch creates a new MSRP SEND request that contains the 1071 received Message/CPIM wrapper and sends it to Bob. 1073 MSRP 490ej23 SEND 1074 To-Path: msrp://client.biloxi.example.com:4923/49dufdje2;tcp 1075 From-Path: msrp://chat.example.com:5678/jofofo3;tcp 1076 Message-ID: 304sse2 1077 Byte-Range: 1-*/* 1078 Content-Type: message/cpim 1080 To: 1081 From: 1082 DateTime: 2009-03-02T15:02:31-03:00 1083 Content-Type: text/plain 1085 Hello guys, how are you today? 1086 -------490ej23$ 1088 Since the received message is addressed to the chat room URI in the 1089 From header of the Message/CPIM header, Bob knows that this is a 1090 regular message distributed all participants in the chat room, rather 1091 that a private message addressed to him. 1093 The rest of the message flows are analogous to the previous. They 1094 are not shown here. 1096 9.4. Sending a private message to a participant 1098 Figure 6 depicts a flow diagram where Alice is sending a private 1099 message addressed to Bob's SIP AOR. The MSRP switch distributes the 1100 message only to Bob. 1102 Alice MSRP switch Bob 1103 | | | 1104 | F1: (MSRP) SEND | | 1105 |--------------------->| F3: (MSRP) SEND | 1106 | F2: (MSRP) 200 |----------------------->| 1107 |<---------------------| F4: (MSRP) 200 | 1108 | |<-----------------------| 1109 | | | 1111 Figure 6: Sending a private message to Bob 1113 F1: Alice builds a text message and wraps it in a Message/CPIM 1114 wrapper. She addresses the message to Bob's URI, which she learned 1115 from a notification in the conference event package. She encloses 1116 the resulting Message/CPIM wrapper in an MSRP SEND request and sends 1117 it to the MSRP switch via the existing TCP connection. 1119 MSRP 6959ssdf SEND 1120 To-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1121 From-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1122 Message-ID: okj3kw 1123 Byte-Range: 1-*/* 1124 Content-Type: message/cpim 1126 To: 1127 From: 1128 DateTime: 2009-03-02T15:02:31-03:00 1129 Content-Type: text/plain 1131 Hello Bob. 1132 -------6959ssdf$ 1134 F2: The MSRP switch acknowledges the reception of the SEND request 1135 with a 200 (OK) response. 1137 MSRP 6959ssdfm 200 OK 1138 To-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1139 From-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1140 Message-ID: okj3kw 1141 -------6959ssdfm$ 1142 F3: The MSRP switch creates a new MSRP SEND request that contains the 1143 received Message/CPIM wrapper and sends it only to Bob. Bob can 1144 distinguish the sender in the From header of the Message/CPIM 1145 wrapper. He also identifies this as a private message due to the 1146 presence of his own SIP AOR in the To header field of the Message/ 1147 CPIM wrapper. 1149 MSRP 9v9s2 SEND 1150 To-Path: msrp://client.biloxi.example.com:4923/49dufdje2;tcp 1151 From-Path: msrp://chat.example.com:5678/jofofo3;tcp 1152 Message-ID: d9fghe982 1153 Byte-Range: 1-*/* 1154 Content-Type: message/cpim 1156 To: 1157 From: 1158 DateTime: 2009-03-02T15:02:31-03:00 1159 Content-Type: text/plain 1161 Hello Bob. 1162 -------9v9s2$ 1164 F4: Bob acknowledges the reception of the SEND request with a 200 1165 (OK) response. 1167 MSRP 9v9s2 200 OK 1168 To-Path: msrp://chat.example.com:5678/jofofo3;tcp 1169 From-Path: msrp://client.biloxi.example.com:4923/49dufdje2;tcp 1170 Message-ID: d9fghe982 1171 -------9v9s2$ 1173 9.5. Chunked private message 1175 The MSRP message below depicts the example of the same private 1176 message described in Section 9.4, but now the message is split in two 1177 chunks. The MSRP switch must wait for the complete set of Message/ 1178 CPIM headers before distributing the messages. 1180 MSRP 7443ruls SEND 1181 To-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1182 From-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1183 Message-ID: aft4to 1184 Byte-Range: 1-*/174 1185 Content-Type: message/cpim 1187 To: 1188 From: 1189 -------7443ruls$ 1191 MSRP 7443ruls SEND 1192 To-Path: msrp://chat.example.com:12763/kjhd37s2s20w2a;tcp 1193 From-Path: msrp://client.atlanta.example.com:7654/jshA7weztas;tcp 1194 Message-ID: aft4to 1195 Byte-Range: 68-174/174 1196 Content-Type: message/cpim 1198 DateTime: 2009-03-02T15:02:31-03:00 1199 Content-Type: text/plain 1201 Hello Bob 1202 -------7443ruls$ 1204 9.6. Nickname in a conference information document 1206 Figure 7 depicts two user elements in a conference information 1207 document both having the nickname element with a nickname string. 1209 1210 1214 1217 1218 MSRP nickname example 1219 1220 1223 1224 2 1225 1226 1229 1230 1231 Dopey Donkey 1232 1233 1236 1237 Alice the great 1238 1239 1240 1242 Figure 7: Nickname in a conference information document 1244 10. IANA Considerations 1246 10.1. New MSRP Method 1248 This specification defines a new MSRP method to be added to the 1249 Methods sub-registry of the Message Session Relay Protocol (MSRP) 1250 Parameters registry: 1252 NICKNAME 1254 See section Section 7 for details. 1256 10.2. New MSRP Header 1258 This specification defines a new MSRP header to be added to the 1259 Header Field sub-registry of the Message Session Relay Protocol 1260 (MSRP) Parameters registry: 1262 Use-Nickname 1264 See Section 7 for details. 1266 10.3. New MSRP Status Codes 1268 This specification defines three new MSRP status codes to be added to 1269 the Status-Code sub-registry of the Message Session Relay Protocol 1270 (MSRP) parameters registry. 1272 The 404 status code indicates the failure to resolve the recipient 1273 URI in the To header field of the Message/CPIM wrapper in the SEND 1274 request, e.g, due to an unknown recipient. See Section 6.2 for 1275 details. 1277 The 423 response indicates a failure in allocating the requested 1278 NICKNAME. This can be caused by a malformed NICKNAME request (e.g., 1279 no Use-Nickname header field), an already allocated nickname, or a 1280 policy that prevents the sender to use nicknames. See Section 7 for 1281 details. 1283 The 428 status code indicates that the recipient of a SEND request 1284 does not support private messages. See Section 6.2 for details. 1286 Table 1 summarizes the IANA registration data with respect to new 1287 MSRP status codes: 1289 +-------+---------------------------------------+-----------+ 1290 | Value | Description | Reference | 1291 +-------+---------------------------------------+-----------+ 1292 | 404 | Failure to resolve recipient's URI | RFC XXXX | 1293 | 423 | Unable to allocate requested nickname | RFC XXXX | 1294 | 428 | Private messages not supported | RFC XXXX | 1295 +-------+---------------------------------------+-----------+ 1297 Table 1: New status codes 1299 10.4. New SDP Attribute 1301 This specification defines a new media-level attribute in the Session 1302 Description Protocol (SDP) Parameters registry. The registration 1303 data is as follows: 1305 Contact: Miguel Garcia 1307 Phone: +34 91 339 1000 1309 Attribute name: chatroom 1311 Long-form attribute name: Chat Room 1313 Type of attribute: media level only 1315 This attribute is not subject to the charset attribute 1317 Description: This attribute identifies support and local policy 1318 allowance for a number of chat room related functions 1320 Specification: RFC XXXX 1322 See section Section 8 for details. 1324 11. Security Considerations 1326 This document proposes extensions to the Message Session Relay 1327 Protocol [RFC4975]. Therefore, the security considerations of that 1328 document apply to this document as well. 1330 If the participant's SIP user agent doesn't understand the "isfocus" 1331 feature tag [RFC3840], it will not know that it is connected to a 1332 conference instance. The participant might not be notified that the 1333 participant's MSRP client will try to send messages to the MSRP 1334 switch having potentially multiple recipients. If the participant's 1335 MSRP client doesn't support the extensions of this specification, it 1336 is unlikely that it will try to send a message using 'Message/CPIM' 1337 wrapper content type [RFC3862], and the MSRP switch will reject the 1338 request with a 415 response [RFC4975]. Still if a participant's MSRP 1339 client does create a message with a valid 'Message/CPIM' wrapper 1340 content type [RFC3862] having the To header set to the URI of the 1341 chat room and the From header set to the URI of which the participant 1342 is known to the conference, the participant might be unaware that the 1343 message can be forwarded to multiple recipients. Equally if the To 1344 header is set to a valid URI of a recipient known to the conference, 1345 the message can be forwarded as a private message without the 1346 participant knowing. 1348 If a participant wants to avoid eavesdropping, the participant's MSRP 1349 client can send the messages over a TLS [RFC5246] transport 1350 connection, as allowed by MSRP. It's up to the policy of the MSRP 1351 switch if the messages are forwarded to the other participant's in 1352 the chat room using TLS [RFC5246] transport. 1354 Nicknames will be used to show the appearances of the participants of 1355 the conference. A successful take over of a nickname from a 1356 participant might lead to private messages to be sent to the wrong 1357 destination. The recipient's URI will be different from the URI 1358 associated to the original owner of the nickname, but the sender 1359 might not notice this. To avoid takeovers the MSRP switch MUST make 1360 sure that a nickname is unique inside a chat room. Also the security 1361 consideration for any authenticated identity mechanisms used to 1362 validate the SIP AOR will apply to this document as well. If a 1363 nickname can be reserved if it previously has been used by another 1364 participant in the chat room, is up to the policy of the chat room. 1366 12. Contributors 1368 This work would have never been possible without the fruitful 1369 discussions in the SIMPLE WG mailing list, specially with Brian Rosen 1370 (Neustar) and Paul Kyzivat (Cisco), who provided extensive review and 1371 improvements throughout the document. 1373 13. Acknowledgments 1375 The authors want to thank Eva Leppanen, Adamu Haruna, Adam Roach, 1376 Matt Lepinski, Mary Barnes, Ben Campbell, Paul Kyzivat, Adrian 1377 Georgescu, Nancy Greene, and Flemming Andreasen for providing 1378 comments. 1380 14. References 1382 14.1. Normative References 1384 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1385 Requirement Levels", BCP 14, RFC 2119, March 1997. 1387 [RFC3261] Rosenberg, J., Schulzrinne, H., Camarillo, G., Johnston, 1388 A., Peterson, J., Sparks, R., Handley, M., and E. 1389 Schooler, "SIP: Session Initiation Protocol", RFC 3261, 1390 June 2002. 1392 [RFC3840] Rosenberg, J., Schulzrinne, H., and P. Kyzivat, 1393 "Indicating User Agent Capabilities in the Session 1394 Initiation Protocol (SIP)", RFC 3840, August 2004. 1396 [RFC3860] Peterson, J., "Common Profile for Instant Messaging 1397 (CPIM)", RFC 3860, August 2004. 1399 [RFC3862] Klyne, G. and D. Atkins, "Common Presence and Instant 1400 Messaging (CPIM): Message Format", RFC 3862, August 2004. 1402 [RFC4353] Rosenberg, J., "A Framework for Conferencing with the 1403 Session Initiation Protocol (SIP)", RFC 4353, 1404 February 2006. 1406 [RFC4566] Handley, M., Jacobson, V., and C. Perkins, "SDP: Session 1407 Description Protocol", RFC 4566, July 2006. 1409 [RFC4575] Rosenberg, J., Schulzrinne, H., and O. Levin, "A Session 1410 Initiation Protocol (SIP) Event Package for Conference 1411 State", RFC 4575, August 2006. 1413 [RFC4975] Campbell, B., Mahy, R., and C. Jennings, "The Message 1414 Session Relay Protocol (MSRP)", RFC 4975, September 2007. 1416 [RFC4976] Jennings, C., Mahy, R., and A. Roach, "Relay Extensions 1417 for the Message Sessions Relay Protocol (MSRP)", RFC 4976, 1418 September 2007. 1420 [RFC5234] Crocker, D. and P. Overell, "Augmented BNF for Syntax 1421 Specifications: ABNF", STD 68, RFC 5234, January 2008. 1423 [RFC5239] Barnes, M., Boulton, C., and O. Levin, "A Framework for 1424 Centralized Conferencing", RFC 5239, June 2008. 1426 [RFC5246] Dierks, T. and E. Rescorla, "The Transport Layer Security 1427 (TLS) Protocol Version 1.2", RFC 5246, August 2008. 1429 [I-D.ietf-xcon-common-data-model] 1430 Novo, O., Camarillo, G., Morgan, D., and J. Urpalainen, 1431 "Conference Information Data Model for Centralized 1432 Conferencing (XCON)", draft-ietf-xcon-common-data-model-32 1433 (work in progress), September 2011. 1435 [I-D.ietf-xcon-event-package] 1436 Camarillo, G., Srinivasan, S., Even, R., and J. 1437 Urpalainen, "Conference Event Package Data Format 1438 Extension for Centralized Conferencing (XCON)", 1439 draft-ietf-xcon-event-package-01 (work in progress), 1440 September 2008. 1442 14.2. Informative References 1444 [RFC2810] Kalt, C., "Internet Relay Chat: Architecture", RFC 2810, 1445 April 2000. 1447 [RFC3325] Jennings, C., Peterson, J., and M. Watson, "Private 1448 Extensions to the Session Initiation Protocol (SIP) for 1449 Asserted Identity within Trusted Networks", RFC 3325, 1450 November 2002. 1452 [RFC3966] Schulzrinne, H., "The tel URI for Telephone Numbers", 1453 RFC 3966, December 2004. 1455 [RFC4474] Peterson, J. and C. Jennings, "Enhancements for 1456 Authenticated Identity Management in the Session 1457 Initiation Protocol (SIP)", RFC 4474, August 2006. 1459 [RFC6120] Saint-Andre, P., "Extensible Messaging and Presence 1460 Protocol (XMPP): Core", RFC 6120, March 2011. 1462 Authors' Addresses 1464 Aki Niemi 1465 Nokia 1466 P.O. Box 407 1467 NOKIA GROUP, FIN 00045 1468 Finland 1470 Phone: +358 50 389 1644 1471 Email: aki.niemi@nokia.com 1473 Miguel A. Garcia-Martin 1474 Ericsson 1475 Calle Via de los Poblados 13 1476 Madrid, ES 28033 1477 Spain 1479 Email: miguel.a.garcia@ericsson.com 1480 Geir A. Sandbakken (editor) 1481 Cisco Systems 1482 Philip Pedersens vei 20 1483 N-1366 Lysaker 1484 Norway 1486 Phone: +47 67 125 125 1487 Email: geirsand@cisco.com 1488 URI: http://www.cisco.com