【问题标题】:Azure Media Services v3 shared access policy for download link用于下载链接的 Azure 媒体服务 v3 共享访问策略
【发布时间】:2020-02-23 16:10:39
【问题描述】:

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

我知道对 Azure 媒体服务创建的视频 使用 AESDRM 加密,但是,我没有找到任何关于如何保护 下载的信息 链接。

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

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

然后创建下载链接,例如:

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

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

我认为在创建定位器时我应该通过特定的策略,但是,我无法找到任何相关资源来实现这种行为。

我找到了很多关于 legacy v2's sas URLsaccess policies for REST 的信息,但没有找到 v3 和 .net 的运气。

谢谢。

【问题讨论】:

    标签: c# .net azure video-processing azure-media-services


    【解决方案1】:

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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-11-19
    • 2020-01-02
    • 1970-01-01
    • 2013-10-30
    • 2021-03-31
    • 2015-02-17
    • 1970-01-01
    • 2016-12-27
    相关资源
    最近更新 更多