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?