Deployed 8cf915fd with MkDocs version: 1.6.1

This commit is contained in:
2026-11-26 20:40:49 +00:00
parent 3efcd59710
commit 8ede94f88a
9 changed files with 22 additions and 11 deletions
+3
View File
@@ -2236,6 +2236,9 @@ have their own key: a user key or a tier key never opens them.</p>
</span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">a-long-random-string</span> </span><span id="__span-0-4"><a id="__codelineno-0-4" name="__codelineno-0-4" href="#__codelineno-0-4"></a><span class="w"> </span><span class="nt">key</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">a-long-random-string</span>
</span></code></pre></div> </span></code></pre></div>
<p>Without <code>dashboard.key</code> the server does not register the routes, and they answer <code>404</code>. <p>Without <code>dashboard.key</code> the server does not register the routes, and they answer <code>404</code>.
A config reload that removes the dashboard key closes the dashboard: the routes answer <code>404</code> and
an open <code>/api/dashboard/events</code> connection ends. To add a dashboard key to a server that started
without one, restart it.
<code>serve --no-key</code> turns off user authentication only; the dashboard key stays required. <code>serve --no-key</code> turns off user authentication only; the dashboard key stays required.
Once the dashboard key is set, every <code>/api/dashboard/</code> request must carry it in Once the dashboard key is set, every <code>/api/dashboard/</code> request must carry it in
<code>X-Secret-Key</code>. <code>X-Secret-Key</code>.
+1 -1
View File
@@ -3241,7 +3241,7 @@ suffix, which is the <code>Cacher</code> cache key the service reads it with:</p
<p>Both sides reject a cache key with a drive letter, a root, a <code>..</code> segment, an empty <p>Both sides reject a cache key with a drive letter, a root, a <code>..</code> segment, an empty
segment, or more than 8 segments before it becomes a path, so a peer cannot write segment, or more than 8 segments before it becomes a path, so a peer cannot write
outside the cache directory. Both sides also refuse a <code>cache</code> map with more than outside the cache directory. Both sides also refuse a <code>cache</code> map with more than
256 entries, and the server refuses the request body of a remote session creation or of a search when it is larger than 8 MiB. The client gives a warning when it has more than 256 cache files to send. The server skips a cache key it cannot write, such as one that names an 256 entries, and the server refuses the request body of a remote session creation or of a search when it is larger than 8 MiB. The server also refuses a <code>cache</code> map whose files inflate to more than 16 MiB in total, with <code>400 INVALID_INPUT</code>. It checks every entry before it writes a file, and it removes the cache directory of a remote session creation that fails. The client gives a warning when it has more than 256 cache files or more than 16 MiB to send. It also stops saving the cache files that a server returns at 16 MiB. The server skips a cache key it cannot write, such as one that names an
existing file as a directory, and logs a warning.</p> existing file as a directory, and logs a warning.</p>
<h3 id="remote-session-info-response">Remote session info response<a class="headerlink" href="#remote-session-info-response" title="Permanent link">&para;</a></h3> <h3 id="remote-session-info-response">Remote session info response<a class="headerlink" href="#remote-session-info-response" title="Permanent link">&para;</a></h3>
<p><code>GET /api/session/{id}</code>:</p> <p><code>GET /api/session/{id}</code>:</p>
+3
View File
@@ -3021,6 +3021,9 @@ fetches the content key directly (from the given URI or an inline <code>data:</c
decrypts each segment in-process with AES-CBC. There is no device, no CDM, and no decrypts each segment in-process with AES-CBC. There is no device, no CDM, and no
license challenge, so you do not set anything up. unshackle decrypts such tracks license challenge, so you do not set anything up. unshackle decrypts such tracks
automatically during download.</p> automatically during download.</p>
<p>The <code>EXT-X-KEY</code> URI must return a content key of exactly 16 bytes, or the download stops with an error.
If a decrypted segment has no valid PKCS7 padding, unshackle keeps the output and
logs one warning for the track, because the content key is possibly wrong.</p>
<h3 id="clearkey-over-cenc-w3c-eme-orgw3clearkey">ClearKey over CENC (W3C EME <code>org.w3.clearkey</code>)<a class="headerlink" href="#clearkey-over-cenc-w3c-eme-orgw3clearkey" title="Permanent link">&para;</a></h3> <h3 id="clearkey-over-cenc-w3c-eme-orgw3clearkey">ClearKey over CENC (W3C EME <code>org.w3.clearkey</code>)<a class="headerlink" href="#clearkey-over-cenc-w3c-eme-orgw3clearkey" title="Permanent link">&para;</a></h3>
<p>The CENC ClearKey scheme is a proper license flow, but the "license server" <p>The CENC ClearKey scheme is a proper license flow, but the "license server"
returns the keys as a JWK Set and not a DRM-wrapped blob. unshackle builds a W3C returns the keys as a JWK Set and not a DRM-wrapped blob. unshackle builds a W3C
+3 -2
View File
@@ -2440,7 +2440,7 @@
<p>Network-backed vaults (<code>HTTP</code> and <code>API</code>) accept an optional per-vault <code>timeout</code> in seconds. If you omit it, unshackle injects the global default:</p> <p>Network-backed vaults (<code>HTTP</code> and <code>API</code>) accept an optional per-vault <code>timeout</code> in seconds. If you omit it, unshackle injects the global default:</p>
<div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nt">vault_timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">10.0</span><span class="w"> </span><span class="c1"># default, in seconds</span> <div class="language-yaml highlight"><span class="filename">unshackle.yaml</span><pre><span></span><code><span id="__span-1-1"><a id="__codelineno-1-1" name="__codelineno-1-1" href="#__codelineno-1-1"></a><span class="nt">vault_timeout</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">10.0</span><span class="w"> </span><span class="c1"># default, in seconds</span>
</span></code></pre></div> </span></code></pre></div>
<p>A <code>timeout</code> set inline on an individual vault always wins over this global value. The <code>SQLite</code> and <code>MySQL</code> backends do not take a <code>timeout</code> field. <code>MySQL</code> uses <code>vault_timeout</code> as its <code>connect_timeout</code> instead, and falls back to the pymysql default of 10 seconds when <code>vault_timeout</code> is <code>0</code>. To use a different connect timeout, set <code>connect_timeout</code> on the vault.</p> <p>A <code>timeout</code> set inline on an individual vault always wins over this global value. The <code>SQLite</code> and <code>MySQL</code> backends do not take a <code>timeout</code> field. <code>MySQL</code> uses <code>vault_timeout</code> as its <code>connect_timeout</code>, <code>read_timeout</code> and <code>write_timeout</code> instead, and falls back to 10 seconds when <code>vault_timeout</code> is <code>0</code>. To use a different value, set that field on the vault.</p>
<p>unshackle pushes content keys to all vaults at the same time, so one slow or unreachable vault costs only its own timeout and does not delay the others.</p> <p>unshackle pushes content keys to all vaults at the same time, so one slow or unreachable vault costs only its own timeout and does not delay the others.</p>
<hr /> <hr />
<h2 id="sqlite-backend">SQLite backend<a class="headerlink" href="#sqlite-backend" title="Permanent link">&para;</a></h2> <h2 id="sqlite-backend">SQLite backend<a class="headerlink" href="#sqlite-backend" title="Permanent link">&para;</a></h2>
@@ -2548,7 +2548,8 @@
</tr> </tr>
</tbody> </tbody>
</table> </table>
<p>Any additional fields you provide (such as <code>password</code>, <code>port</code>, or <code>ssl</code>) are passed straight through to <code>pymysql.connect</code>, so you can use the full range of its connection options.</p> <p>Any additional fields you provide (such as <code>password</code>, <code>port</code>, or <code>ssl</code>) are passed straight through to <code>pymysql.connect</code>, so you can use the full range of its connection options. The one exception is <code>autocommit</code>, which is always on.</p>
<p>Each <code>MySQL</code> vault keeps one connection open for the whole run and shares it between threads. If the server is down, unshackle skips the vault for the rest of the run.</p>
<div class="admonition warning"> <div class="admonition warning">
<p class="admonition-title">Account security is on you, not on unshackle</p> <p class="admonition-title">Account security is on you, not on unshackle</p>
<p>unshackle enforces none of this. It is operational policy for a database that may be shared with a group. Never connect with the <code>root</code> account, not even for yourself. Give every account a password, and never let two users share a username/password. Restrict each account's access to only the <code>unshackle</code> database, and grant normal users only <code>SELECT</code> and <code>INSERT</code>. Reserve the <code>CREATE</code> grant for a single trusted user who bootstraps the service tables (see <a href="#kv-prepare-pre-create-service-tables"><code>kv prepare</code></a>); everyone else can insert new keys but should not be creating tables.</p> <p>unshackle enforces none of this. It is operational policy for a database that may be shared with a group. Never connect with the <code>root</code> account, not even for yourself. Give every account a password, and never let two users share a username/password. Restrict each account's access to only the <code>unshackle</code> database, and grant normal users only <code>SELECT</code> and <code>INSERT</code>. Reserve the <code>CREATE</code> grant for a single trusted user who bootstraps the service tables (see <a href="#kv-prepare-pre-create-service-tables"><code>kv prepare</code></a>); everyone else can insert new keys but should not be creating tables.</p>
+1
View File
@@ -3627,6 +3627,7 @@ For configuring DRM as a user, see <a href="../../../guide/drm-and-cdm/">DRM &am
<div class="doc doc-contents "> <div class="doc doc-contents ">
<p>Decrypt a Track with AES-128 ClearKey (HLS) DRM.</p> <p>Decrypt a Track with AES-128 ClearKey (HLS) DRM.</p>
<p>A segment that fails the PKCS7 unpad is kept as decrypted: some streams are block aligned with no padding.</p>
</div> </div>
+3 -2
View File
@@ -8763,12 +8763,13 @@ of <code>get_init_segment</code> to find the Key ID.</p>
<a href="#unshackle.core.tracks.Track.load_drm_from_playlist" class="headerlink" title="Permanent link">&para;</a></h3> <a href="#unshackle.core.tracks.Track.load_drm_from_playlist" class="headerlink" title="Permanent link">&para;</a></h3>
<div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">load_drm_from_playlist</span><span class="p">()</span> <div class="language-python doc-signature highlight"><pre><span></span><code><span id="__span-0-1"><a id="__codelineno-0-1" name="__codelineno-0-1" href="#__codelineno-0-1"></a><span class="nf">load_drm_from_playlist</span><span class="p">(</span><span class="n">session</span><span class="o">=</span><span class="kc">None</span><span class="p">)</span>
</span></code></pre></div> </span></code></pre></div>
<div class="doc doc-contents "> <div class="doc doc-contents ">
<p>Fallback method to load DRM by fetching this track's individual playlist.</p> <p>Load the Widevine and PlayReady DRM of the EXT-X-KEY and EXT-X-SESSION-KEY tags of this track's playlist.</p>
<p>It skips a tag that gives no DRM, and raises ValueError when the fetch fails or when every such tag fails.</p>
</div> </div>
+5 -3
View File
@@ -2278,7 +2278,7 @@ is the <a href="../../../dev/rest-api/">REST API</a> section. These are the conf
<td><code>dashboard</code></td> <td><code>dashboard</code></td>
<td>dict</td> <td>dict</td>
<td><em>(unset)</em></td> <td><em>(unset)</em></td>
<td>Developer dashboard: <code>key</code> is the API key for the read-only <code>/api/dashboard/</code> endpoints (status, remote sessions, remote session logs, jobs, keys, services, health, logs, SSE events). Unset leaves those routes unregistered. See <a href="../../../dev/rest-api/dashboard/">dashboard endpoints</a>.</td> <td>Developer dashboard: <code>key</code> is the API key for the read-only <code>/api/dashboard/</code> endpoints (status, remote sessions, remote session logs, jobs, keys, services, health, logs, SSE events). Unset leaves those routes unregistered, and a reload that removes the key makes them answer <code>404</code>. See <a href="../../../dev/rest-api/dashboard/">dashboard endpoints</a>.</td>
</tr> </tr>
<tr> <tr>
<td><code>session_ttl</code></td> <td><code>session_ttl</code></td>
@@ -2367,8 +2367,10 @@ the whole file again, globs the device directories again, and swaps in the new <
<code>tiers</code>, <code>services</code> and device lists in one step. Open CDM sessions and remote sessions <code>tiers</code>, <code>services</code> and device lists in one step. Open CDM sessions and remote sessions
continue; an API key you removed gets <code>401</code> on its next request. A file that does not parse continue; an API key you removed gets <code>401</code> on its next request. A file that does not parse
or validate keeps the running settings and logs the reason. A change to <code>remote_only</code>, or validate keeps the running settings and logs the reason. A change to <code>remote_only</code>,
<code>services_refresh_interval</code>, the first PlayReady device, or any command-line flag needs <code>services_refresh_interval</code>, the first PlayReady device, a <code>dashboard.key</code> on a server that
a restart, and the log says so. A new <code>global_speed_limit</code> applies to jobs that start after the started without one, or any command-line flag needs a restart, and the log says so. A reload
that removes <code>dashboard.key</code> closes the dashboard: its routes answer <code>404</code> and an open
<code>/api/dashboard/events</code> connection ends. A new <code>global_speed_limit</code> applies to jobs that start after the
reload; running jobs keep their share. Windows has no <code>SIGHUP</code>: restart the server there.</p> reload; running jobs keep their share. Windows has no <code>SIGHUP</code>: restart the server there.</p>
</div> </div>
<p><code>server_cdm</code> decides whether the server runs the CDM licensing for that API key. Set it to <p><code>server_cdm</code> decides whether the server runs the CDM licensing for that API key. Set it to
+2 -2
View File
@@ -2057,7 +2057,7 @@ name) and a <code>name</code>, plus backend-specific keys.</p>
<td><code>MySQL</code></td> <td><code>MySQL</code></td>
<td>Remote MySQL database</td> <td>Remote MySQL database</td>
<td><code>name</code>, <code>host</code>, <code>database</code>, <code>username</code></td> <td><code>name</code>, <code>host</code>, <code>database</code>, <code>username</code></td>
<td>Extra keys (e.g. <code>password</code>, <code>port</code>) forwarded to pymysql. <code>connect_timeout</code> defaults to <code>vault_timeout</code>.</td> <td>Extra keys (e.g. <code>password</code>, <code>port</code>) forwarded to pymysql. <code>connect_timeout</code>, <code>read_timeout</code> and <code>write_timeout</code> default to <code>vault_timeout</code>. <code>autocommit</code> is always on.</td>
</tr> </tr>
<tr> <tr>
<td><code>API</code></td> <td><code>API</code></td>
@@ -2113,7 +2113,7 @@ supplied the pair gets a report. A <code>serve</code> instance with
</ul> </ul>
<p>Timeout in seconds for vault operations. Injected automatically into any backend whose <p>Timeout in seconds for vault operations. Injected automatically into any backend whose
constructor accepts a <code>timeout</code> parameter (a per-vault <code>timeout</code> still wins). The <code>MySQL</code> backend constructor accepts a <code>timeout</code> parameter (a per-vault <code>timeout</code> still wins). The <code>MySQL</code> backend
uses it as the default <code>connect_timeout</code>.</p> uses it as the default <code>connect_timeout</code>, <code>read_timeout</code> and <code>write_timeout</code>.</p>
<p>The <code>API</code> and <code>HTTP</code> backends send a request again up to 3 times when the vault answers <p>The <code>API</code> and <code>HTTP</code> backends send a request again up to 3 times when the vault answers
<code>429 Too Many Requests</code>. They wait the <code>Retry-After</code> time, but never longer than this timeout. <code>429 Too Many Requests</code>. They wait the <code>Retry-After</code> time, but never longer than this timeout.
A connection failure or a timeout is not tried again. The run does not use a vault again after a A connection failure or a timeout is not tried again. The run does not use a vault again after a
File diff suppressed because one or more lines are too long