Revoke access to a shared stream

Token authentication stops a stranger from guessing your manifest URL. It doesn't stop a paying subscriber from handing their authenticated URL to a hundred other people. Token-based access revocation closes that loop: you maintain a revocation list of token session identifiers, and edge servers deny any request carrying one of them.

This is configured in two places — the Segmented Media Protection behavior in your environment, and the Access Revocation API.

When to use this

  • You see evidence of stream sharing or credential sharing and want to cut off specific sessions or users mid-event.
  • You already run token authentication and can set a session_id in your tokens.

Before you begin

  • Get it on your contract. Work with your account representative to add AdaptiveMediaDelivery::AccessRevocation to the same contract you use for Adaptive Media Delivery.
  • Meet the API prerequisites. See the Access Revocation API requirements.
  • Check that your token auth setup is a standard one. Access revocation doesn't work with a custom token authentication scenario — one that doesn't use the settings in Segmented Media Protection, typically set up by your account representative. Ask your account team whether yours qualifies.

1 - Create a token and choose what its session ID represents

Revocation keys off the token's session identifier, and what you put in that field determines the blast radius of a revocation.

What you set as session_idWhat revoking it does
A unique value per playback sessionKills that one playback session. The sharer has to log back in, restart playback, and re-share the new URL. Not a complete deterrent, but it makes piracy inconvenient.
The user IDBlocks that user from all content served through this environment for 24 hours.
A composite of user ID and contentBlocks that user from that asset. For a live event, they lose access for the event duration or 24 hours, whichever comes first.

Create the token as described in Protect streams with token authentication and store its session_id value — you need it later.

2 - Create a revocation list

Create the list with the Access Revocation API (Add a revocation list). The response returns the list object:

{
    "id": 1,
    "name": "Baseball-ws-2019",
    "contractId": "1-ABCDE"
}

Store the id — it's your revocationListId.

📘

You can have a maximum of 10 revocation lists.

3 - Enable the list in your environment

Configure Token Authentication in the Segmented Media Protection behavior as usual, then:

  • Enable Session-Id carry-over. Set Show Advanced Options to On and make sure the Session-Id slider under Field Carry-Over is set to Yes. This is what makes edge servers compare the session_id in an incoming token against your revocation list.
  • Set the Token Based Access Revocation options:
    • Token Revocation: On
    • Revocation List Name: select the list you created with the API.

4 - Revoke tokens

Once the environment is live in production and serving content, use the Access Revocation API to revoke offending tokens (Revoke tokens). You add identifier objects containing the session_id from the offending token.

📘

List and call limits

A single revocation list holds up to 50,000 identifiers. For best performance, keep each call to 5,000 identifiers or fewer, and don't exceed 60 operations per minute.

Use bulk updates

Pack as many identifier objects as you can into each call, up to 5,000. Beyond that you'll see performance degradation, errors, and retries. If you need several calls, space them out — one every 30 seconds, for example.

Turning it off

  1. Create a new version of your environment.
  2. In Segmented Media Protection, set Token Revocation to Off.
  3. Save, test, and activate.

Then delete the list

Delete the list with the API (Delete a revocation list) — but only after token revocation is disabled and live. Deleting first can disrupt delivery and surface errors to your end users.

FAQ

QuestionAnswer
How long does revocation take?Five minutes from the time an offending token is submitted until Akamai starts counting the durationSeconds TTL.
How long does a token stay revoked?You set the TTL with the durationSeconds parameter on the Revoke tokens operation. The minimum is 30 minutes; lower values are ignored.
Are there other API operations?Yes. The workflow above is the minimum. You can also review revocation list stats and un-revoke a token. See the Access Revocation API v2 reference.
Does it work with watermarking?Yes. You can deny requests carrying a flagged watermarking token (WMT). See Watermarking with Access Revocation.

Related


Did this page help you?