idnits 2.17.1 draft-ietf-wish-whip-00.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- ** There are 22 instances of too long lines in the document, the longest one being 30 characters in excess of 72. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust and authors Copyright Line does not match the current year == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHALL not' in this paragraph: A WHIP client receiving a 405 response for an HTTP PATCH request SHALL not send further request for ICE trickle or restart. If the WHIP client gathers additional candidates (via STUN/TURN) after the SDP offer is sent, it MUST send STUN request to the ICE candidates received from the media server as per [RFC8838] regardless if the HTTP PATCH is supported by either the WHIP client or the WHIP resource. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'MUST not' in this paragraph: Protocol extensions are optionasl for bot WHIP clients and servers. WHIP clients MUST ignore any Link attribute with an unknown "rel" attribute value and WHIP servers MUST not require the usage of any of the extensions. -- The document date (22 August 2021) is 977 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) ** Obsolete normative reference: RFC 8843 (Obsoleted by RFC 9143) Summary: 2 errors (**), 0 flaws (~~), 3 warnings (==), 1 comment (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 wish S. Murillo 3 Internet-Draft A. Gouaillard 4 Intended status: Standards Track CoSMo Software 5 Expires: 23 February 2022 22 August 2021 7 WebRTC-HTTP ingestion protocol (WHIP) 8 draft-ietf-wish-whip-00 10 Abstract 12 While WebRTC has been very successful in a wide range of scenarios, 13 its adoption in the broadcasting/streaming industry is lagging 14 behind. Currently there is no standard protocol (like SIP or RTSP) 15 designed for ingesting media in a streaming service, and content 16 providers still rely heavily on protocols like RTMP for it. 18 These protocols are much older than webrtc and lack by default some 19 important security and resilience features provided by webrtc with 20 minimal delay. 22 The media codecs used in older protocols do not always match those 23 being used in WebRTC, mandating transcoding on the ingest node, 24 introducing delay and degrading media quality. This transcoding step 25 is always present in traditional streaming to support e.g. ABR, and 26 comes at no cost. However webrtc implements client-side ABR, also 27 called Network-Aware Encoding by e.g. Huavision, by means of 28 simulcast and SVC codecs, which otherwise alleviate the need for 29 server-side transcoding. Content protection and Privacy Enhancement 30 can be achieved with End-to-End Encryption, which preclude any 31 server-side media processing. 33 This document proposes a simple HTTP based protocol that will allow 34 WebRTC endpoints to ingest content into streaming services and/or 35 CDNs to fill this gap and facilitate deployment. 37 Status of This Memo 39 This Internet-Draft is submitted in full conformance with the 40 provisions of BCP 78 and BCP 79. 42 Internet-Drafts are working documents of the Internet Engineering 43 Task Force (IETF). Note that other groups may also distribute 44 working documents as Internet-Drafts. The list of current Internet- 45 Drafts is at https://datatracker.ietf.org/drafts/current/. 47 Internet-Drafts are draft documents valid for a maximum of six months 48 and may be updated, replaced, or obsoleted by other documents at any 49 time. It is inappropriate to use Internet-Drafts as reference 50 material or to cite them other than as "work in progress." 52 This Internet-Draft will expire on 23 February 2022. 54 Copyright Notice 56 Copyright (c) 2021 IETF Trust and the persons identified as the 57 document authors. All rights reserved. 59 This document is subject to BCP 78 and the IETF Trust's Legal 60 Provisions Relating to IETF Documents (https://trustee.ietf.org/ 61 license-info) in effect on the date of publication of this document. 62 Please review these documents carefully, as they describe your rights 63 and restrictions with respect to this document. Code Components 64 extracted from this document must include Simplified BSD License text 65 as described in Section 4.e of the Trust Legal Provisions and are 66 provided without warranty as described in the Simplified BSD License. 68 Table of Contents 70 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 71 2. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . 3 72 3. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . 4 73 4. Protocol Operation . . . . . . . . . . . . . . . . . . . . . 5 74 4.1. ICE and NAT support . . . . . . . . . . . . . . . . . . . 6 75 4.2. Webrtc constraints . . . . . . . . . . . . . . . . . . . 6 76 4.3. Load balancing and redirections . . . . . . . . . . . . . 7 77 4.4. STUN/TURN server configuration . . . . . . . . . . . . . 7 78 4.5. Authentication and authorization . . . . . . . . . . . . 7 79 4.6. Simulcast and scalable video coding . . . . . . . . . . . 8 80 4.7. Protocol extensions . . . . . . . . . . . . . . . . . . . 8 81 5. Security Considerations . . . . . . . . . . . . . . . . . . . 9 82 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 9 83 7. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . 9 84 8. Normative References . . . . . . . . . . . . . . . . . . . . 9 85 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . 10 87 1. Introduction 89 WebRTC intentionally does not specify a signaling transport protocol 90 at application level, while RTCWEB standardized the signalling 91 protocol itself (JSEP, SDP O/A) and everything that was going over 92 the wire (media, codec, encryption, ...). This flexibility has 93 allowed for implementing a wide range of services. However, those 94 services are typically standalone silos which don't require 95 interoperability with other services or leverage the existence of 96 tools that can communicate with them. 98 In the broadcasting/streaming world, the usage of hardware encoders 99 that would make it very simple to plug in (SDI) cables carrying raw 100 media, encoding it in place, and pushing it to any streaming service 101 or CDN ingest is ubiquitous. Having to implement a custom signalling 102 transport protocol for each different webrtc services has hindered 103 adoption. 105 While some standard signalling protocols are available that can be 106 integrated with WebRTC, like SIP or XMPP, they are not designed to be 107 used in broadcasting/streaming services, and there also is no sign of 108 adoption in that industry. RTSP, which is based on RTP and maybe the 109 closest in terms of features to webrtc, is not compatible with WebRTC 110 SDP offer/answer model. 112 In the specific case of ingest into a platform, some assumption can 113 be made about the server-side which simplifies the webrtc compliance 114 burden, as detailed in webrtc-gateway document 115 [I-D.draft-alvestrand-rtcweb-gateways]. 117 This document proposes a simple protocol for supporting WebRTC as 118 ingest method which is: 120 * Easy to implement, 122 * As easy to use as current RTMP URIs. 124 * Fully compliant with Webrtc and RTCWEB specs. 126 * Allow for both ingest in traditional media platforms for extension 127 and ingest in webrtc end-to-end platform for lowest possible 128 latency. 130 * Lowers the requirements on both hardware encoders and broadcasting 131 services to support webrtc. 133 * Usable both in web browsers and in native encoders. 135 2. Terminology 137 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 138 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 139 document are to be interpreted as described in [RFC2119]. 141 * WHIP client: WebRTC Media encoder or producer that acts as client 142 on the WHIP protocol and encodes and delivers the media to a 143 remote media server. 145 * WHIP endpoint: Ingest server receiving the initial WHIP request. 147 * WHIP endpoint URL: URL of the WHIP endpoint that will create the 148 WHIP resource 150 * Media Server: WebRTC media server that establishes the media 151 session with the WHIP client and receives the media produced by 152 it. 154 * WHIP resource: Allocated resource by the WHIP endpoint for an 155 ongoing ingest session that the WHIP client can send request for 156 altering the session (ICE operations or termination, for example). 158 * WHIP resource URL: URL allocated to a specific media session by 159 the WHIP endpoint which can be used to perform operations such 160 terminating the session or ICE restarts. 162 3. Overview 164 The WebRTC-HTTP ingest protocol (WHIP) uses an HTTP POST request to 165 perform a single shot SDP offer/answer so an ICE/DTLS session can be 166 established between the encoder/media producer and the broadcasting 167 ingestion endpoint. 169 Once the ICE/DTLS session is set up, the media will flow 170 unidirectionally from the encoder/media producer to the broadcasting 171 ingestion endpoint. In order to reduce complexity, no SDP 172 renegotiation is supported, so no tracks or streams can be added or 173 removed once the initial SDP O/A over HTTP is completed. 175 +-----------------+ +---------------+ +--------------+ +----------------+ 176 | WebRTC Producer | | WHIP endpoint | | Media Server | | WHIP Resource | 177 +---------+-------+ +-------+- -----+ +------+-------+ +--------|-------+ 178 | | | | 179 | | | | 180 |HTTP POST (SDP Offer) | | | 181 +------------------------>+ | | 182 |201 Created (SDP answer) | | | 183 +<------------------------+ | | 184 | ICE REQUEST | | 185 +----------------------------------------->+ | 186 | ICE RESPONSE | | 187 <------------------------------------------+ | 188 | DTLS SETUP | | 189 <==========================================> | 190 | RTP/RTCP FLOW | | 191 +------------------------------------------> | 192 | HTTP DELETE | 193 +------------------------------------------------------------>+ 194 | 200 OK | 195 <-------------------------------------------------------------x 197 Figure 1: WHIP session setup and teardown 199 4. Protocol Operation 201 In order to setup an ingestion session, the WHIP client will generate 202 an SDP offer according to the JSEP rules and do an HTTP POST request 203 to the WHIP endpoint configured URL. 205 The HTTP POST request will have a content type of application/sdp and 206 contain the SDP offer as body. The WHIP endpoint will generate an 207 SDP answer and return it on a 201 Accepted response with content type 208 of application/sdp and the SDP answer as body and a Location header 209 pointing to the newly created resource. 211 SDP offer SHOULD use the sendonly attribute and the SDP answer MUST 212 use the recvonly attribute. 214 Once a session is setup ICE consent freshness [RFC7675] will be used 215 to detect abrupt disconnection and DTLS teardown for session 216 termination by either side. 218 To explicitly terminate the session, the WHIP client MUST perform an 219 HTTP DELETE request to the resource url returned on the Location 220 header of the initial HTTP POST. Upon receiving the HTTP DELETE 221 request, the WHIP resource will be removed and the resources freed on 222 the media server, terminating the ICE and DTLS sessions. 224 A media server terminating a session MUST follow the procedures in 225 [RFC7675] section 5.2 for immediate revocation of consent. 227 The WHIP endpoints MUST return an HTTP 405 response for any HTTP GET, 228 HEAD or PUT requests on the resource URL in order to reserve its 229 usage for future versions of this protocol specification. 231 The WHIP resources MUST return an HTTP 405 response for any HTTP GET, 232 HEAD, POST or PUT requests on the resource URL in order to reserve 233 its usage for future versions of this protocol specification. 235 4.1. ICE and NAT support 237 In order to simplify the protocol, there is no support for exchanging 238 gathered trickle candidates from media server ICE candidates once the 239 SDP answer is sent. So in order to support the WHIP client behind 240 NAT, the WHIP media server SHOULD be publicly accessible. 242 The initial offer by the WHIP client MAY be sent after the full ICE 243 gathering is complete containing the full list of ICE candidates, or 244 only contain local candidates or even an empty list of candidates. 246 The WHIP endpoint SDP answer SHALL contain the full list of ICE 247 candidates publicly accessible of the media server. The media server 248 MAY use ICE lite, while the WHIP client MUST implement full ICE. 250 The WHIP client MAY perform trickle ICE or an ICE restarts [RFC8863] 251 by sending a HTTP PATCH request to the WHIP resource URL with a body 252 containing a SDP fragment with mime type "application/trickle-ice- 253 sdpfrag" as specified in [RFC8840] with the new ice candidate or ice 254 ufrag/pwd for ice restarts. A WHIP resource MAY not support either 255 trickle ICE (i.e. ICE lite media servers) or ICE restart, and it 256 MUST return a 405 Method Not Allowed for any HTTP PATCH request. 258 A WHIP client receiving a 405 response for an HTTP PATCH request 259 SHALL not send further request for ICE trickle or restart. If the 260 WHIP client gathers additional candidates (via STUN/TURN) after the 261 SDP offer is sent, it MUST send STUN request to the ICE candidates 262 received from the media server as per [RFC8838] regardless if the 263 HTTP PATCH is supported by either the WHIP client or the WHIP 264 resource. 266 4.2. Webrtc constraints 268 In order to reduce the complexity of implementing WHIP in both 269 clients and media servers, some restrictions regarding WebRTC usage 270 are made. 272 SDP bundle SHALL be used by both the WHIP client and the media 273 server. The SDP offer created by the WHIP client MUST include the 274 bundle-only attribute in all m-lines as per [RFC8843]. Also, RTCP 275 muxing SHALL be supported by both the WHIP client and the media 276 server. 278 Unlike [RFC5763] a WHIP client MAY use a setup attribute value of 279 setup:active in the SDP offer, in which case the WHIP endpoint MUST 280 use a setup attribute value of setup:passive in the SDP answer. 282 4.3. Load balancing and redirections 284 WHIP endpoints and media servers MAY not be colocated on the same 285 server so it is possible to load balance incoming requests to 286 different media servers. WHIP clients SHALL support HTTP redirection 287 via 307 Temporary Redirect response code. 289 In case of high load, the WHIP endpoints may return a 503 (Service 290 Unavailable) status code indicating that the server is currently 291 unable to handle the request due to a temporary overload or scheduled 292 maintenance, which will likely be alleviated after some delay. 294 The WHIP endpoint MAY send a Retry-After header field indicating the 295 minimum time that the user agent is asked to wait before issuing the 296 redirected request. 298 4.4. STUN/TURN server configuration 300 Configuration of the TURN or STUN servers used by the WHIP client is 301 out of the scope of this document. 303 It is RECOMMENDED that broadcasting server provides an HTTP interface 304 for provisioning the TUNR/STUN servers url and short term credentiasl 305 as in [I-D.draft-uberti-behave-turn-rest-00]. Note that the 306 authentication information or the url of this API are not related to 307 the WHIP enpoint URLs or authentication. 309 It could also be possilble to configure the STUN/TURN server URLS and 310 long term credentials provided by the either broadcasting service or 311 an external TURN provider. 313 4.5. Authentication and authorization 315 Authentication and authorization is supported by the Authorization 316 HTTP header with a bearer token as per [RFC6750]. 318 4.6. Simulcast and scalable video coding 320 Both simulcast and scalable video coding (including K-SVC modes) MAY 321 be supported by both media servers and WHIP clients and negotiated in 322 the SDP O/A. 324 If the client supports simulcast and wants to enable it for 325 publishing, it MUST negotiate the support in the SDP offer according 326 to the procedures in [RFC8853] section 5.3. A server accepting a 327 simulcast offer MUST create an answer accoding to the procedures 328 [RFC8853] section 5.3.2. 330 4.7. Protocol extensions 332 In order to support future extensions to be defined for the WHIP 333 protocol, a common procedure for registering and announcing the new 334 extensions is defined. 336 Protocol extensions supported by the WHIP server MUST be advertised 337 to the WHIP client on the 201 created response to initial HTTP POST 338 request to the WHIP enpoint by inserting one Link header for each 339 extension with the extension "rel" type attribute and the uri for the 340 HTTP resource that will be available for receiving request related to 341 that extension. 343 Protocol extensions are optionasl for bot WHIP clients and servers. 344 WHIP clients MUST ignore any Link attribute with an unknown "rel" 345 attribute value and WHIP servers MUST not require the usage of any of 346 the extensions. 348 Each protocol extension MUST register an unique "rel" attribute 349 values at IANA starting with the prefix: "urn:ietf:params:whip:". 351 For example, taking a potential extension of server to client 352 communication using server sent events as specified in 353 https://html.spec.whatwg.org/multipage/server-sent- 354 events.html#server-sent-events, the url for connecting to the server 355 side event resource for the published stream will be returned in the 356 initial HTTP "201 Created" response with a "Link" header an a "rel" 357 attribute of "urn:ietf:params:whip:server-sent-events". 359 The HTTP 201 response to the HTTP POST request would look like: 361 HTTP/1.1 201 Created 362 Content-Type: application/sdp 363 Location: https://whip.ietf.org/publications/213786HF 364 Link: ;rel="urn:ietf:params:whip:server-side-events " 365 5. Security Considerations 367 HTTPS SHALL be used in order to preserve the WebRTC security model. 369 6. IANA Considerations 371 7. Acknowledgements 373 8. Normative References 375 [I-D.draft-alvestrand-rtcweb-gateways] 376 Alvestrand, H. and U. Rauschenbach, "WebRTC Gateways", 377 Work in Progress, Internet-Draft, draft-alvestrand-rtcweb- 378 gateways-02, 9 March 2015, 379 . 382 [I-D.draft-uberti-behave-turn-rest-00] 383 Uberti, J., "A REST API For Access To TURN Services", Work 384 in Progress, Internet-Draft, draft-uberti-behave-turn- 385 rest-00, 15 July 2013, . 388 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 389 Requirement Levels", BCP 14, RFC 2119, 390 DOI 10.17487/RFC2119, March 1997, 391 . 393 [RFC5763] Fischl, J., Tschofenig, H., and E. Rescorla, "Framework 394 for Establishing a Secure Real-time Transport Protocol 395 (SRTP) Security Context Using Datagram Transport Layer 396 Security (DTLS)", RFC 5763, DOI 10.17487/RFC5763, May 397 2010, . 399 [RFC6750] Jones, M. and D. Hardt, "The OAuth 2.0 Authorization 400 Framework: Bearer Token Usage", RFC 6750, 401 DOI 10.17487/RFC6750, October 2012, 402 . 404 [RFC7675] Perumal, M., Wing, D., Ravindranath, R., Reddy, T., and M. 405 Thomson, "Session Traversal Utilities for NAT (STUN) Usage 406 for Consent Freshness", RFC 7675, DOI 10.17487/RFC7675, 407 October 2015, . 409 [RFC8838] Ivov, E., Uberti, J., and P. Saint-Andre, "Trickle ICE: 410 Incremental Provisioning of Candidates for the Interactive 411 Connectivity Establishment (ICE) Protocol", RFC 8838, 412 DOI 10.17487/RFC8838, January 2021, 413 . 415 [RFC8840] Ivov, E., Stach, T., Marocco, E., and C. Holmberg, "A 416 Session Initiation Protocol (SIP) Usage for Incremental 417 Provisioning of Candidates for the Interactive 418 Connectivity Establishment (Trickle ICE)", RFC 8840, 419 DOI 10.17487/RFC8840, January 2021, 420 . 422 [RFC8843] Holmberg, C., Alvestrand, H., and C. Jennings, 423 "Negotiating Media Multiplexing Using the Session 424 Description Protocol (SDP)", RFC 8843, 425 DOI 10.17487/RFC8843, January 2021, 426 . 428 [RFC8853] Burman, B., Westerlund, M., Nandakumar, S., and M. Zanaty, 429 "Using Simulcast in Session Description Protocol (SDP) and 430 RTP Sessions", RFC 8853, DOI 10.17487/RFC8853, January 431 2021, . 433 [RFC8863] Holmberg, C. and J. Uberti, "Interactive Connectivity 434 Establishment Patiently Awaiting Connectivity (ICE PAC)", 435 RFC 8863, DOI 10.17487/RFC8863, January 2021, 436 . 438 Authors' Addresses 440 Sergio Garcia Murillo 441 CoSMo Software 443 Email: sergio.garcia.murillo@cosmosoftware.io 445 Alexandre Gouaillard 446 CoSMo Software 448 Email: alex.gouaillard@cosmosoftware.io