Casey Gibson
Casey Gibson

Reputation: 2863

How to sign AWS MediaPackage URL

I'm trying to work out how to stop someone from simply copying the asset URL from the resulting AWS MediaPackage Asset and using it outside of my website.

As in, I'm trying to lock down a HLS .m3u8 file so it can only be used by authenticated users. I'm not asking about DRM since it's not meant for authentication.

Typically with AWS S3, you can sign the URL so that the URL will expire after a certain time period which is perfect. MediaPackage doesn't seem to support this however or allow you to adjust the URL access to private users.

One solution would be to place CloudFront in front of the MediaPackage asset and sign that URL. The issue with that is the content within the .m3u8 is still not protect and the streaming clips can still be reconstructed without the main URL. As in, the .m3u8 file is made up of other .m3u8 files. So once the main .m3u8 file is downloaded, then the inner .m3u8 files are unprotected.

I have seen this https://docs.aws.amazon.com/mediapackage/latest/ug/cdn-auth.html however I'm using Video On Demand, which it doesn't support.

Does anyone have any ideas?

Upvotes: 1

Views: 323

Answers (1)

Jared Stewart
Jared Stewart

Reputation: 616

MediaPackage VOD does support CDN Authorization, see the CreatePackagingGroup API:

{
  "authorization": {
    "cdnIdentifierSecret": "string",
    "secretsRoleArn": "string"
  }
}

Upvotes: 0

Related Questions