• SEARCH
  • DOWNLOADS
  • MY ACCOUNT
  • Buy (0)
  • CONTACT
  • Free Trial
Wowza Logo
  • PRODUCTS
  • DEVELOPER
  • SOLUTIONS
  • PRICING
  • RESOURCES
  • SUPPORT
  • My Account
  • Buy (0)
  • SEARCH
  • Ask a question
  • Forums
    • Wowza ClearCaster
    • Wowza Streaming Engine
    • Wowza Streaming Cloud
    • Wowza Player
    • Wowza GoCoder SDK
    • Wowza Developer Dojo
    • Topics
    • Questions
    • Articles
    • Users
    • Badges
  • Sign in
  • Community Home /
  • Wowza Streaming Engine /
  • General Forum /
avatar image
Question by david slt · Dec 21, 2016 at 11:24 AM ·

Wowza SecureToken version 2 configuration (?)

Hello,

I want to use the SecureToken version 2 to protect my live and vod streams

i did search the froum and found the php code in these topics

https://www.wowza.com/forums/showthread.php?50044-SecureToken-protection-in-Wowza-Streaming-Engine-HLS-example
https://www.wowza.com/forums/showthread.php?49135-SecureToken-between-client-amp-server


unfortunately it doesn't work for me and i can not play the sample.mp4 test stream

I has updated my wowza installation to latest version 4.6 and want to use the wowza internal hash protection instead of wmspanel.

is there anything missed in my configuration ?

Thank you in advance.

here is the configuration:

Wowza server: 192.168.1.1

SecureToken: Protect all protocols using hash (SecureToken version 2)

Shared Secret: abcde

Include client IP address in hash generation : Enabled

Hash Query Parameter Prefix : wowzatoken

Webserver : 192.168.1.2

client load the JW player : 192.168.1.2

Time & date : the same in Wowza , Webserver and client

<?php 
$clientIP = 192.168.1.2; // i did set null for disabled Client ip address test.
$host = "192.168.1.1"; // your ip/host 
$url= "rtmp://".$host.":1935/"; 
$stream = "vod/_definst_/mp4:sample.mp4"; // your stream 
$start = time(); 
$end = strtotime("+30 minutes"); 
$secret = "abcde"; 
$tokenName = "wowzatoken"; 
$hash = ""; 
if(is_null($clientIP)){ 
        $hash = hash('sha384', $stream."?".$secret."&{$tokenName}endtime=".$end."&{$tokenName}starttime=".$start, true); // generate the hash string 
} 
else{ 
        $hash = hash('sha384', $stream."?".$clientIP."&".$secret."&{$tokenName}endtime=".$end."&{$tokenName}starttime=".$start, true); // generate the hash string 
} 
$base64Hash = strtr(base64_encode($hash), '+/', '-_'); 
// $params = array("{$tokenName}starttime=".$start, "{$tokenName}endtime=".$end, "{$tokenName}hash=".$base64Hash); 
$params = array("{$tokenName}starttime=".$start, "{$tokenName}endtime=".$end, "{$tokenName}hash=".$base64Hash); 
if(!is_null($clientIP)){ 
        $params[] = $clientIP; 
} 
sort($params); 
$playbackURL = $url.$stream."/playlist.m3u8?"; 
if(preg_match("/(rtmp)/",$url)){ 
        $playbackURL = $url.$stream."?"; 
} 
foreach($params as $entry){ 
        $playbackURL.= $entry."&"; 
} 
$playbackURL = preg_replace("/(\&)$/","", $playbackURL); 
// echo "$playbackURL"; // DEBUG - show fully formed URL 
?>


if client ip address be enabled:

rtmp://192.168.1.1:1935/vod/_definst_/mp4:sample.mp4?192.168.1.2&wowzatokenendtime=1482324374&wowzatokenhash=3XoQIHe89wzcNY5KpFJeSbtyxGDi86s1IIJILyzFdoc=&wowzatokenstarttime=1482322574&


if the client ip address be disabled:

rtmp://192.168.1.1:1935/vod/_definst_/mp4:sample.mp4?&wowzatokenendtime=1482349546&wowzatokenhash=0k4pQZBJkUQhmqbeAoT-LKia6DOwVv9eUjspU99wYQmif2N10gbDPqffMa0legeJ&wowzatokenstarttime=1482347746
Comment

People who like this

0 Show 0
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

3 Replies

· Add your reply
  • Sort: 
avatar image

Answer by david slt · Dec 23, 2016 at 10:35 PM

3 days , 28 views and no answer !

can anyone please help me solve this problem ?
Comment

People who like this

0 Show 1 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Alex C ♦ · Dec 27, 2016 at 01:41 AM 0
Share
Hello david007,

This issue has been reported and our development team is working on a fix which should be rolled out soon.

You can subscribe to the update RSS feed to stay up on when a new update is released.

Wowza Software Updates

If you have further questions, please open a ticket with our support group here.

Regards,

Alex
avatar image

Answer by david slt · Dec 27, 2016 at 01:53 PM

hello,

thank you ,i'm waiting for new software update
Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image

Answer by Balaji Nagalgave · May 04, 2017 at 06:58 AM

what the issue resolved ? whats the url to play after token applied

Comment

People who like this

0 Show 0 · Share
10 |600 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

2 People are following this question.

avatar image avatar image

Related Questions

[ Server.Reject ] : (_defaultRoot_, _defaultVHost_) 2 Answers

i need help with streamschedule.smil 3 Answers

HLS delivery to IOS/Android native player 2 Answers

Problems with Live stream Test and VLC Players 12 Answers

Transfer applications from Wowza Server 3 to Wowza Streaming Engine 2 Answers

Hot Topics
  • AWS Hosting
  • Mobile SDK
  • Deployment Options
  • Load Balancing
  • Content Security
Product Sign-in
  • Wowza Streaming Cloud
  • Wowza Player
Under the Hood
  • Developer Tools
  • Wowza System Status
  • Test Players
  • Developer IDE
Resellers
  • Find a Reseller
  • Reseller Portal
  • Become a Reseller
Company
  • About Us
  • Blog
  • News
  • Events
  • Careers
  • Customers
  • Partners
  • Contact Us
Stay Connected
Get Monthly Newsletter
Select a Language
  • English
    • English
    • Español
    • 日本語
    • 한국어
    • हिन्दी भाषा
    • 中文
    • русский язык

© 2005–2019 Wowza Media Systems, LLC. All rights reserved.   Terms | Privacy | Trademarks | Legal


Enterprise
Social Q&A

  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Create an article
  • Forums
  • Wowza ClearCaster
  • Wowza Streaming Engine
  • Wowza Streaming Cloud
  • Wowza Player
  • Wowza GoCoder SDK
  • Wowza Developer Dojo
  • Explore
  • Topics
  • Questions
  • Articles
  • Users
  • Badges