---
title: Security and access
description: "How Spine decides who can play your streams, what's public, what's secret, and what your integration must not break."
---

## What's public and what's secret

| Item                                     | Secret? | Notes                                                                                                                                                          |
| ---------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Embed ID (`emb_…`)                       | No      | It's in your page source. It identifies the site, not a viewer.                                                                                                |
| Channel ID (`chan_…`)                    | No      | It's in your page source too.                                                                                                                                  |
| Channel slug (`spor-1`)                  | No      | It's in your page source too, when your embed names the channel by its slug.                                                                                   |
| The player's licence                     | No      | Every viewer's browser receives it. It names the domains the player may run on.                                                                                |
| Grant private keys                       | **Yes** | For grants your backend signs. You make them on your servers, or Spine makes one for you. Keep them on your servers: never send one to anyone, Spine included. |
| Grant public keys and key IDs (`gkey_…`) | No      | You send Spine the public key, or Spine makes the pair, and Spine sends you its key ID. See [Your grant key](/grants#your-grant-key).                       |
| Grants                                   | **Yes** | Single-use, and valid for at most 24 hours, but keep them out of URLs, analytics and logs.                                                                     |

Knowing an embed ID and a channel's slug or ID isn't enough to play anything on another website: the restrictions below apply to every request.

## Restrictions on every site

Whatever its protection level, a site plays only the channels Spine assigned to it, only on its registered origins, and only where the channel's broadcast rights allow.

**The four restrictions, and what they don't stop**

1. **Assignments.** A site plays only the channels Spine has assigned to it. Any other channel is refused, without saying whether it exists. Where Spine allows the channel selector for a site, its viewers can see the names of every channel assigned to it.
2. **Origins.** For an iframe site, browsers let only your registered origins frame the embed. For a script site, the player's configuration and the media are served only to your registered origins.
3. **Referrer blocking at Dolby.** Dolby, which delivers the streams, serves a site's media only to requests with an allowed referrer: Spine's player host for iframe and direct sites, and your origins' hosts for script sites. Another website that copies the stream addresses into its own player sends its own referrer and is refused.
4. **Geofences.** Spine can limit a channel to some countries, or keep it out of some, for broadcast rights. Dolby works out the viewer's country and refuses media outside the geofence. The channel's streams from partner CDNs aren't covered by Spine's geofence.

Spine can also **disable** a site or your whole account. Players then stop with "Playback is turned off for this site" and no new playback starts.

And Spine can **reissue a site's embed ID**, for example if it leaks somewhere it shouldn't. The old ID stops working at once, so you then update your pages with the new one.

**What that doesn't stop:** origins and referrers are browser rules, not credentials. A script running outside a browser can send any referrer it likes, so on a site without tokens anyone determined can play a stream they can reach. Protected playback closes that gap.

## Protected playback

Each site has a protection level. Spine chooses it, and changes it when you ask. Your part depends on the level:

| Level               | Who decides who may watch                                       | Media                                              | What it stops                                                                     | What you do                                                                        |
| ------------------- | --------------------------------------------------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| **Off**             | nobody: anyone who can load the embed on your origins can watch | no tokens                                          | other websites and copied stream addresses, through origins and referrer blocking | nothing                                                                            |
| **Player grants**   | nobody: the player gets its own short-lived session             | short-lived credentials, which the player renews   | also copied stream addresses, which stop working within minutes                   | nothing                                                                            |
| **Customer grants** | **your backend**, for each viewer                               | short-lived credentials, renewed with fresh grants | also anyone your backend doesn't vouch for                                        | your backend vouches for each viewer, and your page hands its grants to the player |

**Player grants** needs no backend work. It stops other websites from playing stream addresses they copied, since those stop working after a few minutes, but anyone who can load your embed can still watch. It's also the only level besides off for an app whose WebView opens the embed directly (see [Mobile apps](/apps#protected-playback)).

### Customer grants

With **customer grants**, your backend vouches for each viewer:

1. The player asks your page for a **grant**, naming the embed and the channel.
2. Your page asks your backend for one, with the viewer's own login.
3. Your backend checks the viewer may watch, then signs a grant with its own private key.
4. The player exchanges the grant once for a playback session, with media credentials that last a few minutes.
5. About every four minutes, before they expire, the player asks your page for a fresh grant and renews.

Your backend is the only judge of who may watch, and Spine never calls your servers. The [Grants](/grants) page shows how to sign them. How your page hands grants to the player depends on how it loads it: see [Hosted script](/hosted-script#protected-playback), [Iframe embed](/iframe#protected-playback) or [npm packages](/npm-packages#protected-playback).

- **No grant, no playback.** Without a grant, or when Spine keeps refusing the ones it gets, the player plays nothing and shows "Your access to this stream couldn't be confirmed" (its state's `problem` is `protected`). It asks your page again about a minute later.
- **A viewer you stop vouching for stops playing** at their next renewal, within about four minutes, when your backend gives no grant.
- **Your page's grant source has to keep working for the whole viewing,** not only at the start. A renewal without a grant stops playback.

### Partner streams on protected sites

Some channels play a stream from a partner's CDN rather than from Dolby. On a protected site, such a stream plays only where Spine can sign its links.

**How partner streams play on a protected site**

Where the partner's CDN lets Spine sign its links, Spine signs each viewer's own:

- **Each link is made for the viewer's internet address,** and works for a few minutes. The player renews it as it plays, so you don't do anything.
- **A viewer whose address changes mid-stream,** as when a phone moves from Wi-Fi to mobile data or a VPN reconnects, may see playback stop for a moment, then recover.
- **A partner stream whose links Spine can't sign** plays only on sites with protection off. On a protected site it doesn't play, so ask Spine before such a site moves up.

## Good to know

**What your integration must not break**

- **Keep sending a referrer** from pages that use the hosted script or npm packages. A `Referrer-Policy` of `no-referrer` or `same-origin` gets every viewer refused (see [Referrer policy](/hosted-script#referrer-policy)). The iframe isn't affected: it sets its own.
- **Serve your pages over `https`.** Spine registers only `https` origins, apart from `http://localhost` for local testing.
- **Tell Spine before you move domains.** A page on an origin Spine hasn't registered can't show the player. Ask Spine to add the new origin before you launch on it: frame permissions update within about a minute, but delivery restrictions can take several minutes to reach every edge of Dolby's CDN.
- **Use a separate site for each environment.** Your production website, staging website and app each get their own site, embed ID and origins. Don't register a staging or local origin on a production site.

**Sites and integrations**

Each site has one integration, which decides how the restrictions above apply:

| Integration | How pages load the player                                 | Origins      | Who may frame the embed | Referrers Dolby accepts |
| ----------- | --------------------------------------------------------- | ------------ | ----------------------- | ----------------------- |
| iframe      | `<iframe src=".../embed/…">`                              | at least one | your origins            | the player host         |
| direct      | an app's WebView opens the embed URL                      | none         | nobody                  | the player host         |
| script      | the hosted script or the npm packages, in your page's DOM | at least one | nobody                  | your origins' hosts     |

If you change how a site loads the player, from an iframe to the hosted script for example, ask Spine to change its integration first.

**Native apps and requests without a referrer**

Dolby can't tell a native app's video player from a website that hides its referrer: both send no referrer. So Spine can allow requests without a referrer for a site only by also letting any website that hides its referrer play that site's streams. Spine turns this on only for a site that needs it, and only together with protected playback where possible. A WebView needs none of this, since its page sends the referrer like a browser (see [Mobile apps](/apps)).

**Changing a site's protection level**

- **No level is a fallback for another.** A site on customer grants never drops to player grants or to off when your backend fails, and a refusal never leads to unprotected media.
- **Moving up takes effect at once:** players already playing switch within about a minute, perhaps with a brief interruption.
- **Moving down takes effect only once Dolby has stopped asking for tokens everywhere,** a few minutes later, so playback doesn't break during the change. Keep your grants working until Spine tells you the move is done.

## Reporting a security problem

If you find a vulnerability in the player or the API, or a grant private key leaks, contact Spine at once. Spine removes its public key, which stops it working at once: make a new key pair and send Spine its public key, or ask Spine to make one.
