Re: [Hls-interest] File extension and MIME-Type for an HLS encryption key

Jamie Stackhouse <jamie.stackhouse@redspace.com> Fri, 02 July 2021 14:55 UTC

Return-Path: <jamie.stackhouse@redspace.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 079743A214A for <hls-interest@ietfa.amsl.com>; Fri, 2 Jul 2021 07:55:08 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.097
X-Spam-Level:
X-Spam-Status: No, score=-2.097 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, RCVD_IN_DNSWL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=unavailable autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=redspace.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4AY99JcTieER for <hls-interest@ietfa.amsl.com>; Fri, 2 Jul 2021 07:55:03 -0700 (PDT)
Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 842E53A214B for <hls-interest@ietf.org>; Fri, 2 Jul 2021 07:55:03 -0700 (PDT)
Received: by mail-wr1-x42b.google.com with SMTP id p8so12822694wrr.1 for <hls-interest@ietf.org>; Fri, 02 Jul 2021 07:55:03 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redspace.com; s=redspacecom; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=ba+E0KWdNFaUhhYv1hAM4g56hNnD8+RXyA9eTOIYvM4=; b=QM+esPdt8RVtB4SJlbIQHE8R1+G3763wFBuLKQynbGNnkBuRrryh1ZOEHZGp6RLGHu 0UNIz7HwLnLA/BiGLwz8/LIoHQODXkPWQwBQnH3jmd2Dy2qiVtFA9E5Bqn8SKBgRwu4S fiC1NbRWzq9NYCtQ+PeBMpgO02HlAbCLhMZJQ=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=ba+E0KWdNFaUhhYv1hAM4g56hNnD8+RXyA9eTOIYvM4=; b=RLzrGZltIIRspJZtGY3nsv+LzPv+j9YSTMZfOKmakS6pOo7gfqKUvDk5FUOBX4k7Z5 VBKb5bvp/nr8od7o0m7lj/oR8Cxv41XGOirGU+UO53/j5jWszjIzHqPsBjZBFEJA7RTv FU2mwfrM+JPyzyiu2bf2WnZN6j+S7TFHaH7/5mIiZbKstvJ7zPScsobwYePY/jfVhG4P bGrGDrbWJ3fTRQHa1U6n9yvyMhEsXjgh3wC6lqvhFvRRoRtGjaYqC822lhQJJTicaTkc fimUsRj7d81EWNJH9QBYVb7N/AheihPmUigOPdi8RpRER8UrHAr3vYJWoW48btT2QvUr Bgrw==
X-Gm-Message-State: AOAM531bl9tqr0PbvqXpMIYz7K26pxUGTfBZQ9WfivTZ76u8fJU5AvRh a05oPcI4UuFCnqVLA7FOsc79UJe6TkQxTsjPDBrDrGki6Ac18yPX
X-Google-Smtp-Source: ABdhPJyt+RBh3u18BHEW+hMchNu/xBVXJR+8pIDBhZ8Gg0x5b5FEj0TjL0q2oKT82CNNe7mnXHwmQtQCNqbDWg2gLyw=
X-Received: by 2002:a5d:648e:: with SMTP id o14mr20524wri.5.1625237696652; Fri, 02 Jul 2021 07:54:56 -0700 (PDT)
MIME-Version: 1.0
References: <5AA86F40-F359-4F0E-878E-E61AF916DF28@akamai.com> <870719E2-8E0B-4B76-AB24-B4BCED545250@apple.com>
In-Reply-To: <870719E2-8E0B-4B76-AB24-B4BCED545250@apple.com>
From: Jamie Stackhouse <jamie.stackhouse@redspace.com>
Date: Fri, 02 Jul 2021 11:54:45 -0300
Message-ID: <CAG_fscJMoHkT5803SBNq+3W3c5QpM0cyP1eCA8h-DgDQdmCLwQ@mail.gmail.com>
To: "Law, Will" <wilaw=40akamai.com@dmarc.ietf.org>
Cc: "hls-interest@ietf.org" <hls-interest@ietf.org>
Content-Type: multipart/alternative; boundary="00000000000095bab005c62523c8"
Archived-At: <https://mailarchive.ietf.org/arch/msg/hls-interest/kFoiLMFryg5aXnCouUzjtjCOTy4>
Subject: Re: [Hls-interest] File extension and MIME-Type for an HLS encryption key
X-BeenThere: hls-interest@ietf.org
X-Mailman-Version: 2.1.29
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: Fri, 02 Jul 2021 14:55:08 -0000

My head says that ".key" is what I've seen the most, however, for a
standards document, I think picking something that will "do the right
thing" by default is better.

Therefore I propose ".bin" as the extension.

Reasoning below.

---

Both Apache and Nginx register ".bin" as associated with
application/octet-stream, that so far there has been a consensus should be
the MIME type.

http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types
https://github.com/nginx/nginx/blob/master/conf/mime.types

---

Go uses the same definition files for mimes if they exist on Unix.

https://golang.org/src/mime/type_unix.go

On Windows, it falls back to the registry.

Caddy (popular HTTP server written in Go) utilizes the standard library
"mime" package, and currently doesn't set a Content-Type if one doesn't
match, but has a comment to potentially default to application/octet-stream.
https://github.com/caddyserver/caddy/blob/191dc86f9e40c12517a133cf2181631c9adec791/modules/caddyhttp/fileserver/staticfiles.go#L321-L331

---

Node is a little more difficult to pin down, but the Connect middleware
used by Express, probably the most popular HTTP server for Node, defers to
"mime-db" package, which is based on the Apache and Nginx mime type pages
above.

On Thu, Jul 1, 2021 at 1:21 PM Roger Pantos <rpantos=
40apple.com@dmarc.ietf.org> wrote:

>
>
> On Jun 29, 2021, at 9:02 AM, Law, Will <wilaw=40akamai.com@dmarc.ietf.org>
> wrote:
>
> Is there any consensus on what the file extension and MIME-Type should be
> for an encryption key delivered to a HLS  player? The spec defines no
> constraints on this question.
>
> The DASH IF is standardizing an Ingest Specification which covers the
> ingest of CMAF-based content in both HLS and DASH formats. We’ll likely
> choose ‘.key’ as the file extension and are considering
> ‘application/octet-stream’ as the Mime-Type in the absence of objections.
> Asking here in case there is a de-facto industry standard already in use,
> or opinion on whether we should go to the length of registering a new
> ‘encryption key’ MIME-type with IANA.
>
>
> For what it's worth, I haven't seen reports of the decryption key filename
> extension or MIME type causing interop issues, so I don't have a strong
> feeling about this one way or the other.
>
> I'm not aware of a common industry practice in this area. As Valentijn
> noted, .key is used by Apple's Keynote app so that's a consideration. Maybe
> .lic for license?
>
> I think that application/octet-stream is fine.
>
>
> Roger.
>
> --
> Hls-interest mailing list
> Hls-interest@ietf.org
> https://www.ietf.org/mailman/listinfo/hls-interest
>


-- 
Jamie Stackhouse
DEVELOPER, REDSPACE
902 444.3490 x3170 <+19024443490>
redspace.com <https://www.redspace.com/> / Linkedin
<https://www.linkedin.com/company/333844?trk=vsrp_companies_cluster_name&trkInfo=VSRPsearchId%3A143433421433805150136%2CVSRPtargetId%3A333844%2CVSRPcmpt%3Acompanies_cluster>
 / Facebook <https://www.facebook.com/theREDspaceca> / Twitter
<https://twitter.com/theredspace>