<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>24419</bug_id>
          
          <creation_ts>2014-01-28 04:15:38 +0000</creation_ts>
          <short_desc>Clear Key: Define license request format</short_desc>
          <delta_ts>2014-05-29 21:21:55 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>Encrypted Media Extensions</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P3</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>17682</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="David Dorwin">ddorwin</reporter>
          <assigned_to name="David Dorwin">ddorwin</assigned_to>
          <cc>adrianba</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-media</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>99245</commentid>
    <comment_count>0</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-01-28 04:15:38 +0000</bug_when>
    <thetext>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 &quot;a container-specific value extracted from the initData parameter of createSession().&quot;

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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101182</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Bateman [MSFT]">adrianba</who>
    <bug_when>2014-02-22 00:27:27 +0000</bug_when>
    <thetext>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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>101292</commentid>
    <comment_count>2</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-02-25 00:04:53 +0000</bug_when>
    <thetext>(In reply to Adrian Bateman [MSFT] from comment #1)
&gt; Since the MediaKeyMessageEvent defines the message as a Uint8Array, which I
&gt; think is needed for some CDMs, how would you overload this to pass a JSON
&gt; license request?

The JSON would need to be base64url encoded like the license format.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105370</commentid>
    <comment_count>3</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-05-07 23:28:49 +0000</bug_when>
    <thetext>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&apos;s an example:
{
  &quot;kids&quot;: 
    [ &quot;67ef0gd8pvfd0=&quot;,
      &quot;77ef0gd8pvfd0=&quot;
    ]
}


(In reply to David Dorwin from comment #2)
&gt; (In reply to Adrian Bateman [MSFT] from comment #1)
&gt; &gt; Since the MediaKeyMessageEvent defines the message as a Uint8Array, which I
&gt; &gt; think is needed for some CDMs, how would you overload this to pass a JSON
&gt; &gt; license request?
&gt; 
&gt; 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/</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>105372</commentid>
    <comment_count>4</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-05-07 23:32:23 +0000</bug_when>
    <thetext>As with JWK, padding is omitted. Here&apos;s a fixed example:
{
  &quot;kids&quot;: 
    [ &quot;67ef0gd8pvfd0&quot;,
      &quot;77ef0gd8pvfd0&quot;
    ]
}</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>107006</commentid>
    <comment_count>5</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-05-29 21:21:55 +0000</bug_when>
    <thetext>Implemented in https://dvcs.w3.org/hg/html-media/rev/9e6c5040c5f4</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>