<?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>16738</bug_id>
          
          <creation_ts>2012-04-13 22:12:43 +0000</creation_ts>
          <short_desc>Provide more guidance on heartbeat implementation</short_desc>
          <delta_ts>2013-05-07 00:30:01 +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>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P4</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>16616</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="David Dorwin">ddorwin</reporter>
          <assigned_to name="David Dorwin">ddorwin</assigned_to>
          <cc>eric.sun</cc>
    
    <cc>mike</cc>
    
    <cc>philipj</cc>
    
    <cc>public-html-media</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>watsonm</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>66714</commentid>
    <comment_count>0</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2012-04-13 22:12:43 +0000</bug_when>
    <thetext>v0.1 mentions two methods of implementing a heartbeat:
 1) Use keymessage to continue the current session
 2) Start a new message exchange procedes in exactly the same way as the initial message exchange, with the exception that the Key System and Session ID are known when the needkey event is sent.

The second option may impact the MediaKeyNeededEvent definition (see issue 16616).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68167</commentid>
    <comment_count>1</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2012-05-25 22:52:35 +0000</bug_when>
    <thetext>In option 1, keymessage would be used to provide the heartbeat, which must be ACK&apos;d by the server. The thought is that this ACK would be provided via addKey().

While this option seems more sensible for the server and CDM, it is not consistent with normal uses of addKey() (and the pairing with generateKeyRequest()). Is there a better name for addKey() that addresses both use cases? (Assuming we make the change in bug 16548) addKey() is always a response to a keymessage event, though one could imagine multiple addKey() calls for a given message.)


Option 2 is very consistent with the initial key request, but seems overly complex for a periodic heartbeat related to the same license.


The current text says an &quot;an expiration time or valid duration&quot; should be provided in the license. This language seems specific to option 2 and should be changed if we choose option 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68326</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Watson">watsonm</who>
    <bug_when>2012-05-30 22:17:43 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; In option 1, keymessage would be used to provide the heartbeat, which must be
&gt; ACK&apos;d by the server. The thought is that this ACK would be provided via
&gt; addKey().
&gt; 
&gt; While this option seems more sensible for the server and CDM, it is not
&gt; consistent with normal uses of addKey() (and the pairing with
&gt; generateKeyRequest()). Is there a better name for addKey() that addresses both
&gt; use cases? (Assuming we make the change in bug 16548) addKey() is always a
&gt; response to a keymessage event, though one could imagine multiple addKey()
&gt; calls for a given message.)
&gt; 
&gt; 
&gt; Option 2 is very consistent with the initial key request, but seems overly
&gt; complex for a periodic heartbeat related to the same license.
&gt; 
&gt; 
&gt; The current text says an &quot;an expiration time or valid duration&quot; should be
&gt; provided in the license. This language seems specific to option 2 and should be
&gt; changed if we choose option 1.

I prefer Option 1 as it does not require much special knowledge in the script about heartbeat. When it gets a keymessage from the CDM the script just does what it usually does (send that to the server, get the response and give the response to the CDM with addKey).

addKey is not such a bad name: heartbeat can just be thought of as a sequence of expiring keys.

A more generic name would be ok, but making it as generic as &quot;provideMessage&quot; would be too much - we should retain the semantics that what this method does is provide data that is needed to (continue) decrypting the content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68983</commentid>
    <comment_count>3</comment_count>
    <who name="Yang Sun">eric.sun</who>
    <bug_when>2012-06-12 14:07:55 +0000</bug_when>
    <thetext>
I prefer Option1,since it is a light-weight keep-alive mechanism.
And the generateKeyRequest is used when load the page, but when keep-alive happens, it does not need reload the page, so we can still use addKey() for keep-alive.

My question is:

CDM-&gt;UA---(keymessage)------&gt;Server
CDM-&gt;UA,--ACK----------------Server

In your second comment, it is said that 
ACK would be provided via addKey.
What does this mean? ACK from server is provided by addKey() API of UA?
I am a little confused.


(In reply to comment #1)
&gt; In option 1, keymessage would be used to provide the heartbeat, which must be
&gt; ACK&apos;d by the server. The thought is that this ACK would be provided via
&gt; addKey().
&gt; 
&gt; While this option seems more sensible for the server and CDM, it is not
&gt; consistent with normal uses of addKey() (and the pairing with
&gt; generateKeyRequest()). Is there a better name for addKey() that addresses both
&gt; use cases? (Assuming we make the change in bug 16548) addKey() is always a
&gt; response to a keymessage event, though one could imagine multiple addKey()
&gt; calls for a given message.)
&gt; 
&gt; 
&gt; Option 2 is very consistent with the initial key request, but seems overly
&gt; complex for a periodic heartbeat related to the same license.
&gt; 
&gt; 
&gt; The current text says an &quot;an expiration time or valid duration&quot; should be
&gt; provided in the license. This language seems specific to option 2 and should be
&gt; changed if we choose option 1.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>69352</commentid>
    <comment_count>4</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2012-06-22 23:20:20 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; I prefer Option1,since it is a light-weight keep-alive mechanism.
&gt; And the generateKeyRequest is used when load the page, but when keep-alive
&gt; happens, it does not need reload the page, so we can still use addKey() for
&gt; keep-alive.
Neither option requires reloading the page.

&gt; My question is:
&gt; 
&gt; CDM-&gt;UA---(keymessage)------&gt;Server
&gt; CDM-&gt;UA,--ACK----------------Server
&gt; 
&gt; In your second comment, it is said that 
&gt; ACK would be provided via addKey.
&gt; What does this mean? ACK from server is provided by addKey() API of UA?
&gt; I am a little confused.
The ACKs the message and provides an ACK message back to the application, which then provides it to the UA/CDM using addKey().

Note also that the application should appear to the left of &quot;Server&quot; in both flows above.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>72339</commentid>
    <comment_count>5</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2012-08-17 06:30:38 +0000</bug_when>
    <thetext>I&apos;ll add my proposal (http://lists.w3.org/Archives/Public/public-html-media/2012Jun/0121.html) to the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>87300</commentid>
    <comment_count>6</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2013-05-07 00:30:01 +0000</bug_when>
    <thetext>The heartbeat text was in the FAQ, which has been removed.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>