用于下载链接的Azure Media Services v3共享访问策略 [英] Azure Media Services v3 shared access policy for download link

查看:56
本文介绍了用于下载链接的Azure Media Services v3共享访问策略的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何保护通过Azure Media Services转换作业(和定位器)创建的下载链接?

How to secure download links created via Azure Media Services transformation job (and locator)?

我知道使用 AES DRM 由Azure Media Services创建的视频的加密,但是,我没有找到有关如何保护下载链接的任何信息.

I'm aware of using AES or DRM encryption for video streams created by Azure Media Services, however, I haven't found any info on how to secure download links.

我正在获取流式定位器的下载路径,例如:

I'm getting my download paths for my streaming locator like:

var locator = new StreamingLocator { AssetName = assetName, StreamingPolicyName = PredefinedStreamingPolicy.DownloadAndClearStreaming };
ListPathsResponse paths = await client.StreamingLocators.ListPathsAsync(config.ResourceGroup, config.AccountName, locatorName);

然后创建类似以下的下载链接:

And then creating download links like:

foreach (var path in paths.DownloadPaths)
{
  UriBuilder uriBuilder = new UriBuilder();
  uriBuilder.Scheme = "https";
  uriBuilder.Host = streamingEndpoint.HostName;

  uriBuilder.Path = path;
  downloadUrls.Add(uriBuilder.ToString());
}

我假设我在创建定位器时应该通过一个特定的策略,但是,我找不到任何相关的资源来实现这种行为.

I assume I should pass a specific policy when creating a locator, nevertheless, I was not able to find any relevant resources to achieve such behavior.

我发现了许多有关 REST的访问策略,但是v3和.net运气不好.

I've found many pieces of information about legacy v2's sas URLs and access policies for REST but no luck with v3 and .net.

谢谢.

推荐答案

对于Media Services v3 API,您实际上应该使用存储API创建SAS URL.您可以使用Asset.container(请参阅 https://docs.microsoft.com/zh-cn/rest/api/media/assets/createorupdate#definitions )以获取与资产关联的存储容器名称.

For the Media Services v3 API you should actually use the Storage APIs to create SAS URLs. You can use the Asset.container (see https://docs.microsoft.com/en-us/rest/api/media/assets/createorupdate#definitions) to get the Storage container name that is associated with the asset.

这篇关于用于下载链接的Azure Media Services v3共享访问策略的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆