Re: [Hls-interest] Accepting Playlist Variables via Query Parameter

"Cava, Zachary" <zachary.cava@disneystreaming.com> Thu, 16 February 2023 23:00 UTC

Return-Path: <zachary.cava@disneystreaming.com>
X-Original-To: hls-interest@ietfa.amsl.com
Delivered-To: hls-interest@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 6E6E6C15C528 for <hls-interest@ietfa.amsl.com>; Thu, 16 Feb 2023 15:00:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.993
X-Spam-Level:
X-Spam-Status: No, score=-1.993 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, HTTPS_HTTP_MISMATCH=0.1, RCVD_IN_DNSWL_BLOCKED=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_NONE=0.001, URIBL_BLOCKED=0.001, URIBL_DBL_BLOCKED_OPENDNS=0.001, URIBL_ZEN_BLOCKED_OPENDNS=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=disneystreaming.com
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id N6U2pXksno0b for <hls-interest@ietfa.amsl.com>; Thu, 16 Feb 2023 15:00:35 -0800 (PST)
Received: from NAM02-DM3-obe.outbound.protection.outlook.com (mail-dm3nam02on20717.outbound.protection.outlook.com [IPv6:2a01:111:f400:7e83::717]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 81EF6C14E513 for <hls-interest@ietf.org>; Thu, 16 Feb 2023 15:00:35 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Rr4/0rljT/2N7FSiE+E3kSZh98I1OZ+eUkh5ZSFAoo7ZGbpLv7epGunRmpdq0lArZNEWgqr27y2uNI+XDd5rZ9+9rNBjIMgauOVbEc1cVMGMGCBQ+2aRlwROiiwrYG8QfykMx8DBbBGTmpaNFxc3QjT8NFo1FnfN71nrpSgLDobAF8DXAaGMlwHq3RkvncQKFus9bp1rrQZ/xxfSMnw3sZThnX9T4i/93vFkVDcp6hVN7/VcX+LmIWgi58eR5cpw3H/Jo61LLhtCR+feX6uJX4cUmDOct46qad3zCZ6rXcuIhRDJVNmeyzq1swp0FLc/jKe/cyIqT+x8cPn5QJ1VHw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=ZgvOhCUG6NbIA1dy7DTMXlF/KOOp2iq1ld2+5e+0UR0=; b=g+eGQaQfLzqraQ4jbe7vJXWf0Ede84ZZg9jyvnBWRjyObm8O2boSUss/0rFKgty3dbxTf5e/9ICT2A9cgy5ALOrTR4bG1KtzMDOoiWvCb5UYc1PZIoV94eeD9fEWQXb8KwkallIhsvzp0R0T11zJaZNiDmS/K40L374AizQxDDUKXOk/Sp9u4rlVu0NtOK6TyeqLA3FsczWadOiwHC4NoRuyG+jvUlrTyjrGRE9uQo6Fk+CB9VFnGUN/0EXDxwt8Jsu9YE5mExho8xUc/bdsGsqSffFTThGqTSPYpQY0ipEJhthelOTRrw29HoEBMnGloPkY2Z14t0y/QEs5NpSYxA==
ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=disneystreaming.com; dmarc=pass action=none header.from=disneystreaming.com; dkim=pass header.d=disneystreaming.com; arc=none
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=disneystreaming.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=ZgvOhCUG6NbIA1dy7DTMXlF/KOOp2iq1ld2+5e+0UR0=; b=XSy1Jwc0pe/U3WCU/oivh0kVB9K/4g5uvXtVANv5ESZgKeUU6IHnxcp5rpJw8RRfepThwSoT1Fgn0DFFy0eG8gjMsz7776XXeoXsXD5w2+OfDfXJS2X3T3LlhbavnCpUHDSwfZGtb+yhBjGQkEh2nIdV7b0M972gaemDc3F7mq4=
Received: from MW4PR11MB5910.namprd11.prod.outlook.com (2603:10b6:303:189::5) by SA1PR11MB6783.namprd11.prod.outlook.com (2603:10b6:806:25f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.26; Thu, 16 Feb 2023 23:00:30 +0000
Received: from MW4PR11MB5910.namprd11.prod.outlook.com ([fe80::5c46:c037:25f:8fa0]) by MW4PR11MB5910.namprd11.prod.outlook.com ([fe80::5c46:c037:25f:8fa0%6]) with mapi id 15.20.6086.026; Thu, 16 Feb 2023 23:00:30 +0000
From: "Cava, Zachary" <zachary.cava@disneystreaming.com>
To: Roger Pantos <rpantos=40apple.com@dmarc.ietf.org>
CC: "hls-interest@ietf.org" <hls-interest@ietf.org>
Thread-Topic: [Hls-interest] Accepting Playlist Variables via Query Parameter
Thread-Index: AQHYnUtVaSGJEjrtF0CvVYB2ULK9Za2RN8+AgCp13oCAABeKAIAAEhgAgAFjNAqABGIDgIAAHP/hgRG+ywCAAAHX3A==
Date: Thu, 16 Feb 2023 23:00:30 +0000
Message-ID: <MW4PR11MB5910590CFEC519A4F2BCD94584A09@MW4PR11MB5910.namprd11.prod.outlook.com>
References: <E975179B-F25A-4E16-9B0F-9E6C680DB32D@apple.com> <AADFF6CA-8B57-468C-8D4A-F5F690E4B085@pyrmontbrewery.com.au> <6859E4AD-50DA-4D7D-80D7-EF65A3773EDD@apple.com> <SJ0PR11MB59193514FB78E58E73F5443684709@SJ0PR11MB5919.namprd11.prod.outlook.com> <8D5ADC0D-9217-47E1-B538-5E5B8E81F1FF@apple.com> <MW4PR11MB5910147B74B95286D98117B884759@MW4PR11MB5910.namprd11.prod.outlook.com> <63F471C9-DB86-49AB-9913-B86E226DED40@apple.com>
In-Reply-To: <63F471C9-DB86-49AB-9913-B86E226DED40@apple.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
msip_labels:
authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=disneystreaming.com;
x-ms-publictraffictype: Email
x-ms-traffictypediagnostic: MW4PR11MB5910:EE_|SA1PR11MB6783:EE_
x-ms-office365-filtering-correlation-id: 4a0c6f59-a482-4232-d389-08db10719a42
x-ms-exchange-senderadcheck: 1
x-ms-exchange-antispam-relay: 0
x-microsoft-antispam: BCL:0;
x-microsoft-antispam-message-info: KwOl+8NLNru2uAdN2PJkn7AkPeG0eOf7gBuOMWITo16mJOil6lpvuCQQShruak/OilVaRvuA2wAII+lVejZzrKZf6omcJNkvHiFMOPplABQ78kQZvF+DRKU93lyoobZJHpddiIh7K7BRrEs2wGwpFl0/9B5CUS0Z6ekoiKFGQ1AIFZFpRZES5w3WIjhOGoaKZp8qRfExGJrZBtoGJBsD0w66eVoBSp5KOLXvdh1pNBPfl3QUPThdBeNTPWAoWxGKqRVp/kPNw9BRoar7QhFt/oKhITcXNn7HGjmhKryPvSHUq9MMSjrNCBgsrzq+urfOAqSJdPiwIjut5itY/4vmTp0ojIda2gC1k5l455CLcJIfuHIOxdK1YMrCX1N/gB/KdG86yS8Pd1BcGHTI/uxjwh3mUQXYyu6uVObXb+tyoAtizzAOnw4PFZVZsJ6Xti8BIsKJsEo6G+8b6NWTmze/mqTlsLSenvCSU+Q34FghEIfZSkxEDxkkkI58rTRvdgqlX2SDZDnTPZEcwtzUAL3PgE4VhKkSaB3Jgva58kdok6v3Dw3rmQa0iK6FxG8Xhnw/nC0wxcKoQ/eq/IhqyW/LchMEpHLEY8ugkmstF/BAbiNjE1jYFZrpNWAHCbDVuMMLp6dHWGeLclSBgQiuk/WbK0ucdtNhSdBaVnJlspEETVfOjJaeTaapoVyjJ2AN9FF/UWAgoAWhKA4hQaDhTbioiO7XJimWgClE/6A93NPfStg=
x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5910.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(4636009)(366004)(39860400002)(396003)(346002)(136003)(376002)(451199018)(19627405001)(122000001)(66899018)(38100700002)(478600001)(8936002)(5660300002)(52536014)(966005)(30864003)(33656002)(41300700001)(82960400001)(53546011)(55016003)(2906002)(38070700005)(26005)(9686003)(6506007)(186003)(66476007)(316002)(66946007)(64756008)(66446008)(86362001)(7696005)(4326008)(71200400001)(8676002)(76116006)(66556008)(83380400001)(91956017)(166002)(559001)(579004); DIR:OUT; SFP:1102;
x-ms-exchange-antispam-messagedata-chunkcount: 1
x-ms-exchange-antispam-messagedata-0: DefmH8teOx3vvZP9xmFAzWmrFtdqisPBL78qeShpKAiZs6InwqhH7ifdFV5nA8g78nKhRceXMjoXt9uz5jAITqI5RJMGuFy+cfFphGcuEUTd/9cY2Znapur58vb6T6JRn2HJWMbJWj16EeVxK5zq8pBKUFJcjEttHNhenWwkOtsf8NqHdmOdls92BbV6/KieBEY+3g4t6+kRM6XrlBJCKmFoFY4ESWpeHyuO77JuYSLPMj5r8vZ4ILF4c6qm61FRIBRw0vl/FuY5Lp8JBKyBxlOspm+102DVyRl7uC6EXD2+MY8Ae79blD5/pvrvElXf5KXiMy43B5kxsz2R2s+ik/iUfvyCbjkePWOSNzJ230xrbI3IfAzLmaWwod+AvaQoVzyTKw2Hjwncfw7UCpD/KjbnPokiEaVF+uj/4D/gB0xwbaCvsPNNK58OnpCNn0kJAvKosHcipWFHkQr0LTDRRKia1Fj1+vKIs/hxrwZAGs5Ex2QFjXvHquI76WCKTwrRWmjA0OgaRimYriv9wH1OwAUQ//vcRFSD6OFKCSGOPntDI7+b8kAA4nra9fUngj0UfZs0ndp5NfLS795BrOtxTzAIx/5wu4VHZQn23ZwNLNzE3iV53fger1NYMpUctedmrL3104i0CvfYbOzyyP65cMWQ8KB8eCqTuV4bRDVoJLMmr9Lwq10qtRMz4MT+z/bnwLd6ee43y7EXmASEFKMsU4F93v2ODPwRePVZ3Llr7AR2m5/fH0aKifoObzeb2xVm4RcDR9iBrpQDob2G9gvc8bMiXjOS51BIvJGTbTQOdjQaInGZVrFT+c7fE+pzZdEuXeMV6TyemUcUCmNs9PzWitlt/m8sWGFDQehIuU6UNOEycgHMVl716X6ymsnPFFBWhxpFR7lmaoJ822tSHHofsRqcoan46LSCWue+tCP/WHWqxcFqG1Mq2OjtYs1s6kWzlRwyWlMWU37fXpoG/lKD/bkKtzFny/eCRv4xia1rJyxg+ox7Grd304lf2P7b5sMsS7AHB+EQ1p8a8Xc3ifAk8erXSWH8Io/CqF2WnCq+eA8RiAkEOQWP7G+YczbpFluLkyN9zrySe8lDiEVLKIfOPW+gh+78092HGqZB6bhidPQ6BETNw0AVcy34q6jXM4ilIoHXnuR8cCPhd0wVMtJbAxqztMCkiLuJNaOvUEjmhNiouF402iFDUA8cTeyJX4RSEkoubBg1QTm49Icyp1sj3QrTN3XI1g0TWyUeyNCNTBo6qjCylbBrNAPj9fPWQNFkH3eNpVmkRvonFR5GF0UEWkwuXLrTv81kD1uop7DFm2MsDqn7BqNxRijTrCrDnolOGxiCog6O8Rn7LU1SkhgU0e6SmSwviBZM3NWT3A1fl6oEQdPMjJJMHARaqm0kofm/QZ0Zr9Q1ixGjtSPfQ74dq1/FfLmmF7FtCRt05hrw5eufB+y725vYHv2nWWxa6GaWwJ5//c2QVCSFUB22sAIe/y1d+pfnd/4CdmIOl5eFfTCSs7gppiuVjLw0/6i9w8W7ezBzd5NASXR38ze08PrSS7QQEo0jexHjby/DHbOHYCGQ4pLwFaDxXyWFU2DmOV9ZKCKnEYp7w3y5wSiWVvG2NZBH31lNSjYXDCQDiGdnQ+c=
Content-Type: multipart/alternative; boundary="_000_MW4PR11MB5910590CFEC519A4F2BCD94584A09MW4PR11MB5910namp_"
MIME-Version: 1.0
X-OriginatorOrg: disneystreaming.com
X-MS-Exchange-CrossTenant-AuthAs: Internal
X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5910.namprd11.prod.outlook.com
X-MS-Exchange-CrossTenant-Network-Message-Id: 4a0c6f59-a482-4232-d389-08db10719a42
X-MS-Exchange-CrossTenant-originalarrivaltime: 16 Feb 2023 23:00:30.7851 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 65f03ca8-6d0a-493e-9e4a-c85ac9526a03
X-MS-Exchange-CrossTenant-mailboxtype: HOSTED
X-MS-Exchange-CrossTenant-userprincipalname: ScX0JrW4AUtDMSrTuGcJBc+2wMtuMiAyvE1sC+Lxk5pCYi/vFhtXY+9+4pWOEpxxZgEvYGGug4NMPcJ73cs50XiHkxp8HEh77nauDDAQu/oSg+IwKm70ynqROR1edsrZ
X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6783
Archived-At: <https://mailarchive.ietf.org/arch/msg/hls-interest/YDdfCuzgXjS5V92b-TQZLhjC8KI>
Subject: Re: [Hls-interest] Accepting Playlist Variables via Query Parameter
X-BeenThere: hls-interest@ietf.org
X-Mailman-Version: 2.1.39
Precedence: list
List-Id: "Discussions about HTTP Live Streaming \(HLS\)." <hls-interest.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/hls-interest/>
List-Post: <mailto:hls-interest@ietf.org>
List-Help: <mailto:hls-interest-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hls-interest>, <mailto:hls-interest-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 16 Feb 2023 23:00:39 -0000

Thanks for the update Roger!
________________________________
From: Hls-interest <hls-interest-bounces@ietf.org> on behalf of Roger Pantos <rpantos=40apple.com@dmarc.ietf.org>
Sent: Thursday, February 16, 2023 14:53
To: Cava, Zachary <zachary.cava=40disneystreaming.com@dmarc.ietf.org>
Cc: hls-interest@ietf.org <hls-interest@ietf.org>
Subject: Re: [Hls-interest] Accepting Playlist Variables via Query Parameter

Updating this thread with some news: we have incorporated support for this feature into iOS 16.4 (and parallel releases for tvOS and macOS). A formal update to https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis is in the works.

Here’s an example of the syntax:

Given a URL: https://example.com/playlist.m3u8?token=abc123&service=“Dingbats"

And a playlist:

#EXTM3U
#EXT-X-VERSION:8
#EXT-X-TARGETDURATION:6
#EXT-X-DEFINE:QUERYPARAM=“token”
#EXT-X-DEFINE:QUERYPARAM=“service”
#EXTINF 6,
Segment0.mp4?cdn-token={$token}&origin={$service}

The resolved segment URL will be https://example.com/Segment0.mp4?cdn-token=abc123&origin=“Dingbats"

You can try it out today with the iOS 16.4 seed that we made available earlier this week.


Roger.

On Aug 26, 2022, at 11:35 AM, Cava, Zachary <zachary.cava=40disneystreaming.com@dmarc.ietf.org> wrote:

After I wrote that I heard from some other folks who pointed out that quoted strings aren't really significant in URL query parameters and feel somewhat artificial. Given that, I'm willing to reverse the rule and say instead that payload of the query parameter must not have quotes. (I do think that it should be a hard rule, one way or the other.)
Agree with making it a hard rule, but I'd strongly advocate for query parameters not having quotes.

Agreed. So let's say both that the client will not search for a query parameter missing from the Media Playlist URL in the MVP URL, and also that QUERYPARAM variables in the MVP are eligible for IMPORT in the Media Playlist.
Sounds great.

Regarding this part:

| 2) A playlist containing an EXT-X-DEFINE with a QUERYPARAM coming from a URL without such a query parameter will fail to pars

I got a question about whether we should make some provision for a default value for a variable that fails to import. I haven't heard of a compelling case for that, and generally I prefer to make subtle errors visible. But I wanted to put the question out there in case anyone wanted to argue for it.
I omitted my initial response, but I agree with keeping this an error to prevent subtle integration misses similar to the reasoning I had on 2b.

Zack
________________________________
From: Roger Pantos <rpantos=40apple.com@dmarc.ietf.org>
Sent: Friday, August 26, 2022 09:47
To: Cava, Zachary <zachary.cava@disneystreaming.com>
Cc: hls-interest@ietf.org <hls-interest@ietf.org>
Subject: Re: [Hls-interest] Accepting Playlist Variables via Query Parameter



On Aug 23, 2022, at 3:05 PM, Cava, Zachary <zachary.cava=40disneystreaming.com@dmarc.ietf.org<mailto:zachary.cava=40disneystreaming.com@dmarc.ietf.org>> wrote:

Hi Roger,

Great to hear the update from you, sorry it looks like my previous response got stuck in my drafts.

Net net, our previous investigations around security found there was no greater maliciousness permitted by allowing parameters via the query parameters than the body of the response. This was primarily due to our use of HTTPs only traffic though where any point or attack that gained the ability to manipulate the query parameters also gained the ability to modify the body. Similarly I concur with your comment on redirects.

For the constraints a few questions:

1b) The payload of the query parameter in the URL must be a quoted string
By this do you mean the query parameter must look something like this: http://example.com/stream/mv.m3u8?myparam="value<https://nam12.safelinks.protection.outlook.com/?url=http%3A%2F%2Fexample.com%2Fstream%2Fmv.m3u8%3Fmyparam%3D%2522value&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=f5rNiQhbItn2NLZY4j4XHc%2BekojazDzPbr6ZSKwq9Jw%3D&reserved=0>"
Want to make sure I'm reading that right

After I wrote that I heard from some other folks who pointed out that quoted strings aren't really significant in URL query parameters and feel somewhat artificial. Given that, I'm willing to reverse the rule and say instead that payload of the query parameter must not have quotes. (I do think that it should be a hard rule, one way or the other.)


2b) (up for discussion)  if the query param is not present in a Media Playlist URL, we could look for it in its parent MVP URL.
I can go back and for on this one, while it might seem like a nice convenience, I can see implicit passing being more harmful than helpful. I think I would lean on the path of making things explicit to ensure all parties involved in the stream playout are participating and expecting the passing.

4) A Media Playlist can IMPORT a variable that was defined by a QUERYPARAM in the Multivariant Playlist.
Agree this would be a great case and hopefully help some backwards compatibility aspects for anyone with existing media playlists. I'd almost go as far as saying this should be the explicit import signal in place of 2b.

Agreed. So let's say both that the client will not search for a query parameter missing from the Media Playlist URL in the MVP URL, and also that QUERYPARAM variables in the MVP are eligible for IMPORT in the Media Playlist.

Regarding this part:

2) A playlist containing an EXT-X-DEFINE with a QUERYPARAM coming from a URL without such a query parameter will fail to pars

I got a question about whether we should make some provision for a default value for a variable that fails to import. I haven't heard of a compelling case for that, and generally I prefer to make subtle errors visible. But I wanted to put the question out there in case anyone wanted to argue for it.


Roger.


Thanks,
Zack

________________________________

From: Roger Pantos <rpantos=40apple.com@dmarc.ietf.org<mailto:rpantos=40apple.com@dmarc.ietf.org>>
Sent: Monday, August 22, 2022 17:40
To: Pyrmont Brewery <kev@pyrmontbrewery.com.au<mailto:kev@pyrmontbrewery.com.au>>
Cc: Cava, Zachary <zachary.cava@disneystreaming.com<mailto:zachary.cava@disneystreaming.com>>; hls-interest@ietf.org<mailto:hls-interest@ietf.org> <hls-interest@ietf.org<mailto:hls-interest@ietf.org>>; Jer Noble <jer.noble@apple.com<mailto:jer.noble@apple.com>>
Subject: Re: [Hls-interest] Accepting Playlist Variables via Query Parameter

I'm not sure if allowing query parameters from redirects opens up a much larger hole for ad blockers. If an ad blocker has the means to forge a 30x response from the content server, it seems like it could equally forge a 40x or similar for an ad asset request, which would cause that asset to be skipped.


Roger.

On Aug 22, 2022, at 4:35 PM, Pyrmont Brewery <kev@pyrmontbrewery.com.au<mailto:kev@pyrmontbrewery.com.au>> wrote:

With 5 (obtains variables from redirects) just wondering if domain needs to be restricted (CORS like?) maybe not, but where I’m thinking here is if ad blockers, they can only proxy safari connections? (if not then they could modify the QUERYPARM and so any variables held en route)

Might be over thinking it
Kev


On 23 Aug 2022, at 8:11 am, Roger Pantos <rpantos=40apple.com@dmarc.ietf.org<mailto:rpantos=40apple.com@dmarc.ietf.org>> wrote:

Okay, we looked this over from a security perspective and we didn’t see anything that requires trust that isn’t already inherently being granted. So that’s fine.

As I wrote earlier, we can see how this would be a useful addition, particularly where different parties are involved in producing vs. serving the playlists. There are some details that need to be nailed down, though. We would propose the following additional constraints:

1) This adds a new attribute for EXT-X-DEFINE called QUERYPARAM. The value is a quoted string just like the existing NAME attribute. The QUERYPARAM value is the Variable Name; it must match a query parameter name in the URL. No other EXT-X-DEFINE can use the same Variable Name. URLs allow characters in query parameters that are not legal in HLS variables. Such characters must not be used in Variable Names.

1b) The payload of the query parameter in the URL must be a quoted string

2) A playlist containing an EXT-X-DEFINE with a QUERYPARAM coming from a URL without such a query parameter will fail to parse (just as the IMPORT case would). Except possibly for the case of:

2b) (up for discussion)  if the query param is not present in a Media Playlist URL, we could look for it in its parent MVP URL.

3) The value of the query parameter will NOT be percent-decoded before performing variable substitution in the playlist. (I’ve gone back and forth on this one. On one hand, percent-decoding would enable variable replacement of certain special characters. On the other, the target of variable replacement is most often a URL itself, where values should be percent-encoded. And, I’d like to avoid the complexity of requiring the client to know if variable replacement is being done inside a URL or not.)

4) A Media Playlist can IMPORT a variable that was defined by a QUERYPARAM in the Multivariant Playlist.

5) If the URL is redirected, the client will look for the query parameter in the 30x response URL

6) Pathway cloning manifests allow PARAMS. Replacement of pathway-defined query parameters would apply AFTER playlist variable substitution.


Roger.

On Jul 26, 2022, at 2:46 PM, Roger Pantos <rpantos=40apple.com@dmarc.ietf.org<mailto:rpantos=40apple.com@dmarc.ietf.org>> wrote:

Hi Zach. We've been discussing this internally since last week. I can clearly see how we could map query parameters into EXT-X-DEFINE imports. One concern I have is any new attack vectors it might open up.

Have you guys done any threat analysis on this sort of approach, or ran it past any security experts (at W3C or elsewhere)?

Is there an existing precedent for this kind of processing? (It wouldn't necessarily have to be in streaming.)


thanks,

Roger.

On Jul 21, 2022, at 3:49 PM, Cava, Zachary <zachary.cava=40disneystreaming.com@dmarc.ietf.org<mailto:zachary.cava=40disneystreaming.com@dmarc.ietf.org>> wrote:

Hi Everyone,

In continued discussions around interoperability of DASH and HLS, a question has been raised about bringing great scale interoperability to Playlist variables.

By way of background, a common industry use case is to provide token authentication to manifest / playlists and all subsequent resources. A common pattern to enable this is for the primary token to be attached to the manifest / playlist URI and to use real-time generation / manipulation to carry the token through to other URIs present in the document (and subsequent documents). This is typically done in place of headers / cookies as they are not available across all serving scenarios and environments. While this approach functionally works, a more ideal state would be the ability to semantically describe in the manifest / playlist how to copy tokens from the document source URI to a subsequent URI described in the document. Doing this would allow for highly cacheable manifest / playlist files in place of real-time manipulation providing better scalability.

This capability is enabled in DASH by the Annex I Flexible Insertion of URL Parameters functionality which introduces an element that describes how to the player how to build query strings and which subsequent requests to attach the query string to. This looks something like:

MPD URI: https://cdn.example.com/content/content.mpd?token=12345<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdn.example.com%2Fcontent%2Fcontent.mpd%3Ftoken%3D12345&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=6gqTbLANlkWupJRWIf15pprirkuU7hVkD8t%2FQtVZI0E%3D&reserved=0>
MPD Body:

<MPD ...>
    <EssentialProperty schemeIdUri="urn:mpeg:dash:urlparam:2014" xmlns:up="urn:mpeg:dash:schema:urlparam:2014">
        <up:ExtUrlQueryInfo includeInRequests="segment steering" queryTemplate="token=$query:token$" useMPDUrlQuery="true"/>
    </EssentialProperty>
    <Period>...</Period>
    ...
</MPD>

In HLS the Playlist variables introduced with the EXT-X-DEFINE tag provide the ability to pull variables from the Multi-Variant to the Variant. Our question is if this could be extended to allow playlists to pull from the playlist URIs?

Conceptually this could look something like the following:

MV URI: https://cdn.example.com/content/mv.m3u8?token=12345<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdn.example.com%2Fcontent%2Fmv.m3u8%3Ftoken%3D12345&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=rb611VQNZ6kDcrm5sNp4IvO2muRsNGBsVTaoo210Qlo%3D&reserved=0>
MV Body:

#EXTM3U
#EXT-X-DEFINE:QUERYPARAM="token"
#EXT-X-CONTENT-STEERING:SERVER-URI="/steering?token={$token}"
#EXT-X-STREAM-INF:BANDWIDTH=8000000,PATHWAY-ID="CDN-A"
high/variant.m3u8?token={$token}
#EXT-X-STREAM-INF:BANDWIDTH=4500000,PATHWAY-ID="CDN-B"
high/variant.m3u8?token={$token}
...

Variant URI: https://cdn.example.com/content/high/variant.m3u8?token=12345<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdn.example.com%2Fcontent%2Fhigh%2Fvariant.m3u8%3Ftoken%3D12345&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xjs8HbJJL%2BRZUsQTliUfWAfLdyzdQ4WSwvl6u97FmI0%3D&reserved=0>
Variant Body:

#EXTM3U
#EXT-X-TARGETDURATION:4
#EXT-X-DEFINE:IMPORT="token"
#EXT-X-MAP:URI="map.mp4?token={$token}"
#EXTINF 4,
segment1.mp4?token={$token}
#EXTINF 4,
segment2.mp4?token={$token}
...

The variant could also optionally have QUERYPARAM="token" to pull it in instead of import which lets MV-less streams also use this functionality.

Any thoughts on this functionality extension?

Thanks,
Zack
--
Hls-interest mailing list
Hls-interest@ietf.org<mailto:Hls-interest@ietf.org>
https://www.ietf.org/mailman/listinfo/hls-interest<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qIMGKDarv45UqA5cnmnvL03J8PKD1511YEA%2B5b9dFQg%3D&reserved=0>

--
Hls-interest mailing list
Hls-interest@ietf.org<mailto:Hls-interest@ietf.org>
https://www.ietf.org/mailman/listinfo/hls-interest<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qIMGKDarv45UqA5cnmnvL03J8PKD1511YEA%2B5b9dFQg%3D&reserved=0>

--
Hls-interest mailing list
Hls-interest@ietf.org<mailto:Hls-interest@ietf.org>
https://www.ietf.org/mailman/listinfo/hls-interest<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qIMGKDarv45UqA5cnmnvL03J8PKD1511YEA%2B5b9dFQg%3D&reserved=0>
--
Hls-interest mailing list
Hls-interest@ietf.org<mailto:Hls-interest@ietf.org>
https://www.ietf.org/mailman/listinfo/hls-interest<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qIMGKDarv45UqA5cnmnvL03J8PKD1511YEA%2B5b9dFQg%3D&reserved=0>

--
Hls-interest mailing list
Hls-interest@ietf.org<mailto:Hls-interest@ietf.org>
https://www.ietf.org/mailman/listinfo/hls-interest<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ietf.org%2Fmailman%2Flistinfo%2Fhls-interest&data=05%7C01%7Czachary.cava%40disneystreaming.com%7Cadfd4614d5d04a32265208db1070db46%7C65f03ca86d0a493e9e4ac85ac9526a03%7C0%7C0%7C638121849146100676%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=qIMGKDarv45UqA5cnmnvL03J8PKD1511YEA%2B5b9dFQg%3D&reserved=0>

--
Hls-interest mailing list
Hls-interest@ietf.org
https://www.ietf.org/mailman/listinfo/hls-interest