Wowza Community

Playback security

We are trying to enable Playback security on our installation of Wowza. We are unable to get it working. Any help would be appreciated.

We are live streaming and using adaptive bit rate to send out streams. We are using the HLS stream. We are sending it via HTTPS to CloudFront. The CloudFront URL is invoked in Flow player on our site. We are hashing in Java

The live stream works without the security.

The parameters we are using for hashing are as follows:

Content URL: https:///vikashTest/ngrp:myStream_all/playlist.m3u8

Content path: vikashTest/ngrp:myStream_all

Custom SecureToken prefix: wowzatoken

Token start time: wowzatokenstarttime=0

Token end time: wowzatokenendtime=0

Shared secret: mySharedSecret (we are using the default for our prototyping)

----Hashing Code----------

hash algorithm private static String getSHA_256_SecurePassword(String passwordToHash) { String generatedHash = null; try { MessageDigest md = MessageDigest.getInstance(“SHA-256”); byte[] bytes = md.digest(passwordToHash.getBytes()); generatedHash= Base64.getUrlEncoder().encodeToString(bytes); } catch (NoSuchAlgorithmException e) { e.printStackTrace(); } return generatedHash; }

//for hash input string

String inputurl=“myApp/”+ streamingName.getStreamName() + “_all”+"?"+mySharedSecret+"&wowzatokenendtime=0&wowzatokenstarttime=0"; String wowzatokenhash=getSHA_256_SecurePassword(hashfinal);

//main url- String applicationName = streamingName.getWowzaApplicationName() + “/ngrp:” + streamingName.getStreamName() + “_all/playlist.m3u8?wowzatokenendtime=0&wowzatokenstarttime=0&wowzatokenhash=”+wowzatokenhash;

----Hashing Code----------

Are the hashing parameters expected in a certain order? What are we missing?

Hello @Keerthivasan Subramaniam, we would need to run some tests on your files. Can you kindly submit a support ticket?

@Rose, Thanks for the response. We have been able to implement Playback security for the un-grouped stream. However, we have not been able to get it to work for the grouped stream, i.e. ngrp:myStream_all. What do we need to do to hash the grouped stream?

Here is the walkthrough for this process @Keerthivasan Subramaniam:

I using that vs hash url, but still download by other tools, can help me?

I see in m3u8 show all path or videos ( 1.ts, 2.ts…) and no codec attributes.

Thank you.

2 diffent hash WHY ?


ModuleCoreSecurity:string hashed: vod18/vod/mp4:10810/1003/HOMA-068-C/HOMA-068-C.mp4?

ModuleCoreSecurity:string hashed: vod18/vod/mp4:10810/1003/HOMA-068-C/HOMA-068-C.mp4?63e9367298459771&

Tech support is wondering if you could have two different users here @Rex Wowza?

Same device, just enable VPN to change different IP