RFC 8852

RTP Stream Identifier Source Description (SDES)

πŸ“… published January 2021, from ietf

RFC 8852: RTP Stream Identifier Source Description (SDES) πŸŽ€

Part 1 of 2 πŸ’–

RFC: 8852 Title: RTP Stream Identifier Source Description (SDES) ✨ Authors: A.B. Roach (Mozilla) πŸ¦‹, S. Nandakumar (Cisco Systems) 🌸, and P. Thatcher (Google) 🧚 Category: Standards Track πŸ‘‘ Date: January 2021 πŸ“ ISSN: 2070-1721 Obsoletes / Updates: the title block doesn't list any, so this is a fresh one πŸ’…

Abstract ✨

okay so this doc defines and registers two brand-new RTCP Stream Identifier Source Description (SDES) items πŸ’–. The first is RtpStreamId, which gives each RTP stream its own unique name πŸ¦‹. The second is RepairedRtpStreamId, which can point at the stream that a redundancy RTP stream is fixing 🫢.

Status of This Memo 🌈

this is an Internet Standards Track document πŸ’….

it's a product of the Internet Engineering Task Force (IETF) πŸ‘‘. It represents the consensus of the IETF community, got public review, and was approved for publication by the Internet Engineering Steering Group (IESG) πŸ’œ. For more on Internet Standards, check Section 2 of RFC 7841 ✨.

you can find the current status, any errata, and where to send feedback at https://www.rfc-editor.org/info/rfc8852 πŸŽ€.

Copyright (c) 2021 IETF Trust and the persons identified as the document authors πŸ’–. All rights reserved.

this document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) as they stand on the date of publication πŸ“œ. Please read them carefully, because they explain your rights and restrictions for this document πŸ™ˆ. Code Components pulled out of this document must include Simplified BSD License text, as described in Section 4.e of the Trust Legal Provisions, and they come without warranty as described in the Simplified BSD License ⭐.

Table of Contents 🧚

1.  Introduction
2.  Terminology
3.  Usage of RtpStreamId and RepairedRtpStreamId in RTP and RTCP
  3.1.  RTCP "RtpStreamId" SDES Extension
  3.2.  RTCP "RepairedRtpStreamId" SDES Extension
  3.3.  RTP "RtpStreamId" and "RepairedRtpStreamId" Header
        Extensions
4.  IANA Considerations
  4.1.  New RtpStreamId SDES Item
  4.2.  New RepairRtpStreamId SDES Item
  4.3.  New RtpStreamId Header Extension URI
  4.4.  New RepairRtpStreamId Header Extension URI
5.  Security Considerations
6.  References
  6.1.  Normative References
  6.2.  Informative References
Acknowledgements
Authors' Addresses

1. Introduction πŸŽ€

okay bestie, so RTP sessions usually have a bunch of streams 🌈. Each one is identified at any moment by its synchronization source (SSRC) πŸ’œ. The catch is that the SSRC for a stream isn't guaranteed to stay the same for its whole life 😭. Inside a session, streams can also get tagged with a few other identifiers, like CNAMEs and MediaStream Identification (MSID) [RFC8830] πŸ¦‹. Here's the tea though: none of them have the right ordinality to point at one specific stream, because every one of them can show up on more than one stream at a time πŸ’€.

people have tried using unique payload types (PTs) per stream in some apps πŸ™ˆ, but that's basically overloading a field that's way too small for the job ✨. In fairly complex systems that use PT to uniquely identify every possible mix of codec configuration and unique stream, you can literally just run out of values 😭.

so to fix this, we define a new RTCP Stream Identifier Source Description (SDES) identifier called RtpStreamId πŸ’–. It uniquely identifies one RTP stream πŸ‘‘. The big reason we need it is to tell apart different encodings of the same source stream that get sent at the same time (aka simulcast) πŸ”₯. The need for unique IDs also covers dependent streams, like when the layers of a layered codec are sent on separate streams 🧚.

and when redundancy RTP streams are in use, we also need a way to link them to the RTP stream they're protecting 🫢. For that we define another SDES identifier, RepairedRtpStreamId 🌸. This identifier can only show up in packets that belong to a redundancy RTP stream πŸ™ˆ. Its value is the same as the RtpStreamId of the RTP stream that the redundant stream is correcting ✨.

2. Terminology πŸ’…

in this doc, the terms "source stream", "RTP stream", "source RTP stream", "dependent stream", "received RTP stream", and "redundancy RTP stream" mean what they mean in [RFC7656] πŸ¦‹.

these acronyms show up too 🌈:

  • CNAME: Canonical Endpoint Identifier, defined in [RFC3550] πŸŽ€
  • MID: Media Identification, defined in [RFC8843] πŸ’œ
  • MSID: MediaStream Identification, defined in [RFC8830] 🌸
  • RTCP: Real-time Transport Control Protocol, defined in [RFC3550] ✨
  • RTP: Real-time Transport Protocol, defined in [RFC3550] 🧚
  • SDES: Source Description, defined in [RFC3550] 🫢
  • SSRC: Synchronization Source, defined in [RFC3550] πŸ‘‘

3. Usage of RtpStreamId and RepairedRtpStreamId in RTP and RTCP πŸ¦‹

the RTP fixed header already has the payload type number and the SSRC values of the RTP stream πŸ’–. RTP explains how to demultiplex streams inside an RTP session 🌸. But sometimes apps need extra identifiers so they can match each individual RTP stream to its matching payload configuration in the SDP πŸ”₯.

this spec defines two new RTCP SDES items [RFC3550] πŸ’…. The first is "RtpStreamId", which carries RTP stream identifiers inside RTCP SDES packets πŸŽ€. That lets a receiver connect received RTP packets (which identify the RTP stream) with a media description that has the format constraint spelled out 🧚. The second is "RepairedRtpStreamId", which a redundancy RTP stream can use to say which RTP stream it's repairing 🫢.

to be clear: the value in a RepairedRtpStreamId will always match the RtpStreamId value of another RTP stream in the same session πŸ”₯. For example, if a source RTP stream has RtpStreamId "A", then any redundancy RTP stream that repairs it will carry a RepairedRtpStreamId of "A" (if this mechanism is being used for that correlation) πŸ’œ. Those redundant RTP streams can also have their own unique RtpStreamId 🌈.

this spec also uses the RTP header extension for RTCP SDES items [RFC7941] so RtpStreamId and RepairedRtpStreamId values can ride along in RTP packets ✨. That helps with correlation at stream startup, or after stream changes, when RTCP might not be responsive enough 😭. Speed really matters here, because in lots of cases the stream can't be properly processed until it's been identified πŸ’€.

RtpStreamId and RepairedRtpStreamId values are scoped by source identifier (for example, CNAME) and by media session πŸ‘‘. When media is multiplexed using the BUNDLE extension [RFC8843], those values are also scoped by their associated MID values πŸ¦‹. For example, an RtpStreamId of "1" can show up in the stream with a CNAME of "1234@example.com" and also in a stream with a CNAME of "5678@example.org", and those are different streams πŸ™ˆ. Same deal with MIDs: an RtpStreamId of "1" can appear with a MID of "A" and again with a MID of "B", and those refer to two different streams 🫢.

heads up, the RepairedRtpStreamId mechanism only handles one repaired stream per redundancy stream πŸ”₯. If a system needs correlation for schemes where one redundancy stream carries information used to repair more than one stream, it'll need a more complex mechanism than the one defined here πŸ’….

like all SDES items, RtpStreamId and RepairedRtpStreamId are capped at a total of 255 octets in length πŸŽ€. They're also limited to alphanumeric characters 🧚. For the avoidance of doubt, the only allowed byte values for these IDs are decimal 48 through 57, 65 through 90, and 97 through 122 πŸ’œ.

3.1. RTCP "RtpStreamId" SDES Extension 🌸

        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |RtpStreamId=12 |     length    | RtpStreamId                 ...
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the RtpStreamId payload is ASCII encoded and it's not null terminated ✨.

3.2. RTCP "RepairedRtpStreamId" SDES Extension 🫢

        0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       |Repaired...=13 |     length    | RepairRtpStreamId           ...
       +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

the RepairedRtpStreamId payload is also ASCII encoded and not null terminated πŸ¦‹.

3.3. RTP "RtpStreamId" and "RepairedRtpStreamId" Header Extensions 🧚

recipients of RTP packets usually need to know which streams they belong to the moment they arrive πŸ”₯. So this spec also defines a way to carry RtpStreamId and RepairedRtpStreamId in RTP extension headers, using the technique from [RFC7941] πŸ’–.

as that doc describes, the header extension element can use either the one-byte or the two-byte header, and the identification-tag payload is ASCII encoded πŸ’….

because the identifier lives in an RTP header extension, there should be some thought given to the packet expansion it causes πŸ™ˆ. To avoid Maximum Transmission Unit (MTU) issues for RTP packets, the header extension's size needs to be factored in when encoding media 😭. And note that the set of header extensions in a packet needs to be padded to the next 32-bit boundary [RFC8285] ✨.

in lots of cases a one-byte identifier is enough to tell streams apart in a session, and implementations are strongly encouraged to use the shortest identifier that fits their needs 🌈. Implementors, please be warned: don't put any information in the identifier that's derived from potentially user-identifying info, like a user ID or IP address πŸš«πŸ™ˆ. To avoid anyone fingerprinting specific implementations by their tag-generation pattern, implementations are encouraged to use a simple scheme that starts with the ASCII digit "1" and goes up by one for each subsequent identifier πŸŽ€πŸ’œ

4.3. New RtpStreamId Header Extension URI πŸŽ€

Okay so this is the registration for the RtpStreamId header extension πŸ’– We're adding a brand new extension URI to the "RTP SDES Compact Header Extensions" subregistry, which lives inside the "RTP Compact Header Extensions" subregistry. Here's the entry ✨

Extension URI:  urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
Description:  RTP Stream Identifier
Contact:  Adam Roach <adam@nostrum.com>
Reference:  RFC 8852

4.4. New RepairRtpStreamId Header Extension URI πŸ¦‹

Same energy here, but for the repaired one 🌸 It also goes into the "RTP SDES Compact Header Extensions" subregistry of the "RTP Compact Header Extensions" subregistry. The URI is a bit long so it wraps onto a second line in the original, and I've kept that exactly as it is πŸ™ˆ

Extension URI:  urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-
   id
Description:  RTP Repaired Stream Identifier
Contact:  Adam Roach <adam@nostrum.com>
Reference:  RFC 8852

5. Security Considerations πŸ”

Okay bestie, this section is serious, so let's go 🫢 The identifiers in this document are strictly alphanumeric, but SDES items can carry any string at all. That means there's a real risk they could carry privacy-sensitive information 😬 Implementations need to take care when generating identifiers so they don't contain anything that can identify the user or allow long-term tracking of the device. If you follow the generation recommendations in Section 3.3, you get non-instance-specific labels, with only minor fingerprinting possibilities in the total number of RtpStreamIds and RepairedRtpStreamIds used. Not a huge risk, but still something to know about πŸ‘€

Even if the SDES items are generated to convey as little information as possible, implementors are strongly encouraged to encrypt SDES items, both in RTCP and in RTP header extensions, so privacy is preserved against third parties πŸ”’

The SDES items are how the RTP streams get identified for different application purposes, so it really matters that the intended values are the ones received 😭 An attacker, whether a third party or a malicious RTP middlebox, that removes or changes these values can seriously mess with the application. That can mean the media content fails to decode or display at all. It can also mean media gets attributed to the wrong media source identifiers, like wrongly identifying who's speaking πŸ’€ To stop this from happening through third-party attacks, integrity and source authentication are needed.

If you want to know how encryption, integrity, and source authentication can be achieved, "Options for Securing RTP Sessions" [RFC7201] goes through the options 🧚


6. References πŸ“š

6.1. Normative References πŸ’œ

[RFC3550]  Schulzrinne, H., Casner, S., Frederick, R., and V.
           Jacobson, "RTP: A Transport Protocol for Real-Time
           Applications", STD 64, RFC 3550, DOI 10.17487/RFC3550,
           July 2003, <https://www.rfc-editor.org/info/rfc3550>.

[RFC7656]  Lennox, J., Gross, K., Nandakumar, S., Salgueiro, G., and
           B. Burman, Ed., "A Taxonomy of Semantics and Mechanisms
           for Real-Time Transport Protocol (RTP) Sources", RFC 7656,
           DOI 10.17487/RFC7656, November 2015,
           <https://www.rfc-editor.org/info/rfc7656>.

[RFC7941]  Westerlund, M., Burman, B., Even, R., and M. Zanaty, "RTP
           Header Extension for the RTP Control Protocol (RTCP)
           Source Description Items", RFC 7941, DOI 10.17487/RFC7941,
           August 2016, <https://www.rfc-editor.org/info/rfc7941>.

[RFC8285]  Singer, D., Desineni, H., and R. Even, Ed., "A General
           Mechanism for RTP Header Extensions", RFC 8285,
           DOI 10.17487/RFC8285, October 2017,
           <https://www.rfc-editor.org/info/rfc8285>.

[RFC8843]  Holmberg, C., Alvestrand, H., and C. Jennings,
           "Negotiating Media Multiplexing Using the Session
           Description Protocol (SDP)", RFC 8843,
           DOI 10.17487/RFC8843, January 2021,
           <https://www.rfc-editor.org/info/rfc8843>.

6.2. Informative References 🌈

[RFC7201]  Westerlund, M. and C. Perkins, "Options for Securing RTP
           Sessions", RFC 7201, DOI 10.17487/RFC7201, April 2014,
           <https://www.rfc-editor.org/info/rfc7201>.

[RFC8830]  Alvestrand, H., "WebRTC MediaStream Identification in the
           Session Description Protocol", RFC 8830,
           DOI 10.17487/RFC8830, January 2021,
           <https://www.rfc-editor.org/info/rfc8830>.

Acknowledgements 🫢

Huge thanks to Cullen Jennings, Magnus Westerlund, Colin Perkins, Jonathan Lennox, and Paul Kyzivat for reviewing and giving input πŸ‘‘ Magnus Westerlund wrote nearly all of the Security Considerations section, so he gets extra credit πŸ’…

Authors' Addresses ✨

Adam Roach
Mozilla

Email: adam@nostrum.com


Suhas Nandakumar
Cisco Systems

Email: snandaku@cisco.com


Peter Thatcher
Google

Email: pthatcher@google.com
πŸ“¦ where this page comes from