This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 24419 - Clear Key: Define license request format
Summary: Clear Key: Define license request format
Status: RESOLVED FIXED
Alias: None
Product: HTML WG
Classification: Unclassified
Component: Encrypted Media Extensions (show other bugs)
Version: unspecified
Hardware: All All
: P3 normal
Target Milestone: ---
Assignee: David Dorwin
QA Contact: HTML WG Bugzilla archive list
URL:
Whiteboard:
Keywords:
Depends on: 17682
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-28 04:15 UTC by David Dorwin
Modified: 2014-05-29 21:21 UTC (History)
3 users (show)

See Also:


Attachments

Description David Dorwin 2014-01-28 04:15:38 UTC
Similar to how a license format [1] has been documented for bug 17682, we should document the license request format.

For Clear Key, the message attribute of the needkey event is currently defined as "a container-specific value extracted from the initData parameter of createSession()."

Instead of defining a format for each container and requiring applications/servers to support different formats for each container, we should define a license request format. Defining a JSON-based format would be consistent with the license format [1].

This also has the advantage of not passing a binary blob to the application as would happen in the CENC case (bug 24027).

[1] https://dvcs.w3.org/hg/html-media/raw-file/default/encrypted-media/encrypted-media.html#simple-decryption-clear-key
Comment 1 Adrian Bateman [MSFT] 2014-02-22 00:27:27 UTC
Since the MediaKeyMessageEvent defines the message as a Uint8Array, which I think is needed for some CDMs, how would you overload this to pass a JSON license request?
Comment 2 David Dorwin 2014-02-25 00:04:53 UTC
(In reply to Adrian Bateman [MSFT] from comment #1)
> Since the MediaKeyMessageEvent defines the message as a Uint8Array, which I
> think is needed for some CDMs, how would you overload this to pass a JSON
> license request?

The JSON would need to be base64url encoded like the license format.
Comment 3 David Dorwin 2014-05-07 23:28:49 UTC
For the format, I propose non-JWK[S] JSON with the key IDs encoded in base64url

This has the advantages of being:
 * mostly consistent with the license format (JSON and base64url key IDs, though not JWK[S])
 * parsable by JavaScript
 * extensible (vs. a simple array of key IDs)

Here's an example:
{
  "kids": 
    [ "67ef0gd8pvfd0=",
      "77ef0gd8pvfd0="
    ]
}


(In reply to David Dorwin from comment #2)
> (In reply to Adrian Bateman [MSFT] from comment #1)
> > Since the MediaKeyMessageEvent defines the message as a Uint8Array, which I
> > think is needed for some CDMs, how would you overload this to pass a JSON
> > license request?
> 
> The JSON would need to be base64url encoded like the license format.

Ignore the above reply. We should use the Encoding API: http://www.w3.org/TR/encoding/
Comment 4 David Dorwin 2014-05-07 23:32:23 UTC
As with JWK, padding is omitted. Here's a fixed example:
{
  "kids": 
    [ "67ef0gd8pvfd0",
      "77ef0gd8pvfd0"
    ]
}
Comment 5 David Dorwin 2014-05-29 21:21:55 UTC
Implemented in https://dvcs.w3.org/hg/html-media/rev/9e6c5040c5f4