Skip to content

Commit 15cf0fa

Browse files
authored
Merge pull request #47797 from Juliako/patch-37
Update content-protection-overview.md
2 parents f17c807 + e6f2f34 commit 15cf0fa

File tree

1 file changed

+61
-2
lines changed

1 file changed

+61
-2
lines changed

articles/media-services/latest/content-protection-overview.md

Lines changed: 61 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ ms.workload: media
1212
ms.tgt_pltfrm: na
1313
ms.devlang: na
1414
ms.topic: article
15-
ms.date: 06/25/2018
15+
ms.date: 07/30/2018
1616
ms.author: juliako
1717

1818
---
@@ -26,7 +26,7 @@ The following image illustrates the Media Services content protection workflow:
2626

2727
* *dynamic encryption supports AES-128 "clear key", CBCS, and CENC. For details see the support matrix [here](#streaming-protocols-and-encryption-types).*
2828

29-
This article explains concepts and terminology relevant to understanding content protection with Media Services. The article also provides links to articles that discuss how to protect content.
29+
This article explains concepts and terminology relevant to understanding content protection with Media Services. The article also has the [FAQ](#faq) section and provides links to articles that show how to protect content.
3030

3131
## Main components of the content protection system
3232

@@ -121,6 +121,65 @@ With a token-restricted content key policy, the content key is sent only to a cl
121121

122122
When you configure the token restricted policy, you must specify the primary verification key, issuer, and audience parameters. The primary verification key contains the key that the token was signed with. The issuer is the secure token service that issues the token. The audience, sometimes called scope, describes the intent of the token or the resource the token authorizes access to. The Media Services key delivery service validates that these values in the token match the values in the template.
123123

124+
## <a id="faq"/>Frequently asked questions
125+
126+
### Question
127+
128+
How to implement multi-DRM (PlayReady, Widevine, and FairPlay) system using Azure Media Services (AMS) v3 and also use AMS license/key delivery service?
129+
130+
### Answer
131+
132+
For end-to-end scenario, see the [following code example](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/EncryptWithDRM/Program.cs).
133+
134+
The example shows how to:
135+
136+
1. Create and configure ContentKeyPolicies.
137+
138+
The sample contains functions that configure [PlayReady](playready-license-template-overview.md), [Widevine](widevine-license-template-overview.md), and [FairPlay](fairplay-license-overview.md) licenses.
139+
140+
```
141+
ContentKeyPolicyPlayReadyConfiguration playReadyConfig = ConfigurePlayReadyLicenseTemplate();
142+
ContentKeyPolicyWidevineConfiguration widevineConfig = ConfigureWidevineLicenseTempate();
143+
ContentKeyPolicyFairPlayConfiguration fairPlayConfig = ConfigureFairPlayPolicyOptions();
144+
```
145+
146+
2. Create a StreamingLocator that is configured to stream an encrypted asset.
147+
148+
In the case of this example, we set **StreamingPolicyName** to **PredefinedStreamingPolicy.SecureStreaming** which supports envelope and cenc encryption and sets two content keys on the StreamingLocator.
149+
150+
If you also want to encrypt with FairPlay, set the **StreamingPolicyName** to **PredefinedStreamingPolicy.SecureStreamingWithFairPlay**.
151+
152+
3. Create a test token.
153+
154+
The **GetTokenAsync** method shows how to create a test token.
155+
156+
4. Build the streaming URL.
157+
158+
The **GetDASHStreamingUrlAsync** method shows how to build the streaming URL. In this case, the URL streams the **DASH** content.
159+
160+
### Question
161+
162+
How and where to get JWT token before using it to request license or key?
163+
164+
### Answer
165+
166+
1. For production, you need to have a Secure Token Services (STS) (web service) which issues JWT token upon a HTTPS request. For test, you could use the code shown in **GetTokenAsync** method defined in [Program.cs](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/EncryptWithDRM/Program.cs).
167+
2. Player will need to make a request, after a user is authenticated, to the STS for such a token and assign it as the value of the token. You can use the [Azure Media Player API](https://amp.azure.net/libs/amp/latest/docs/).
168+
169+
* For an example of running STS, with either symmetric and asymmetric key, please see [http://aka.ms/jwt](http://aka.ms/jwt).
170+
* For an example of a player based on Azure Media Player using such JWT token, see [http://aka.ms/amtest](http://aka.ms/amtest) (expand "player_settings" link to see the token input).
171+
172+
### Question
173+
174+
How do you authorize requests to stream videos with AES encryption?
175+
176+
### Answer
177+
178+
The correct approach is to leverage STS (Secure Token Service):
179+
180+
In STS, depending on user profile, add different claims (such as “Premium User”, “Basic User”, “Free Trial User”). With different claims in a JWT, the user can see different contents. Of course, for different content/asset, the ContentKeyPolicyRestriction will have the corresponding RequiredClaims.
181+
182+
Use Azure Media Services APIs for configuring license/key delivery and encrypting your assets (as shown in [this sample](https://github.com/Azure-Samples/media-services-v3-dotnet-tutorials/blob/master/AMSV3Tutorials/EncryptWithAES/Program.cs).
124183

125184
## Next steps
126185

0 commit comments

Comments
 (0)