5. Protect video using Axinom Encoding
This article is a part of a DRM Quick Start Guide.
In this section, we will extend the video encoding process as described before with a DRM protection step.
DRM protection involves video encryption using a symmetric algorithm. For this, we need a secure encryption key.
Axinom Key Service fulfills this purpose - it generates encryption keys upon request.
|The Key Service provides the encryption keys (Content Keys) to a packager to encrypt the media assets during the preparation stage.|
Axinom Key Service supports a number of different protocols for key acquisition (see Key Acquisition API). However, with Axinom Encoding you don’t need to talk directly to the Key Service. Thanks to a so called "DRM Managed Mode" it is enough to provide your Key Service credentials to the Encoding Service (DRM Settings). Then the Encoding Service will connect to the Key Service and acquire the necessary key.
To apply DRM protection to a video follow these steps:
Create a DRM Key Service configuration
Configure DRM Settings of the Mosaic Video Service
Set DRM protection for a processing profile
Run an encoding job
Store the generated keyId
If you haven’t done this yet, in Axinom Portal go to My Mosaic / DRM and click "Acquire Credentials".
This creates your DRM configuration - for the License Service and for the Key Service.
|Store the generated Management Keys security. Don’t lose them - they are not recoverable (although, they can be reset by turning to Axinom Support).|
The values you need for the next step:
Key Service Management API URL
Key Service Tenant Id
Key Service Management Key
Key Service Key Seed ID.
The last two values you have to encrypt with a certificate of Axinom Encoding, so that only Axinom Encoding can access your Key Service configuration. To encrypt credentials, use Credentials Protection Tool.
In Mosaic Management System, go to Settings / Video Encoding / DRM Settings and specify the values from the previous step. The Management Key and the Key Seed ID have to be provided encrypted as described above.
For more details refer to Set up Encoding Profiles, chapter DRM Settings.
In Mosaic Management System, go to Settings / Video Encoding / Processing.
Create a new profile.
You can leave all properties with their default values, but set the "DRM Protection" to "Single Key".
(You can also use "Multiple Keys", but this is an advanced topic. Check documentation for its usage.)
Now encode a video, same way as described in Encode a video using Axinom Encoding, but select your new processing profile with activated DRM.
Once encoding is complete, you will see among other video properties a so called
This is not the encryption key itself (the key is not stored anywhere for security reasons). But it is a reference to the encryption key.
keyId, Axinom DRM License Service can reconstruct the original encryption key.
This is possible due to the usage of a so called KeySeed-model.
(KeySeed-model is explained in the respective chapter of What is DRM? article.)
Now you can return to the step Play an existing DRM-protected video but use your own protected video instead:
Instead of the test vectors, paste an URL to your DASH manifest (from the encoded video properties).
In the Content Keys field paste your
keyId(just the value of the keyId, it is enough).
Provide your Communication Key and Communication Key Id (from your License Service configuration under My Mosaic / DRM).
If you generate an entitlement message yourself, use for it the
keyId from the previous step (see Create an entitlement message).