# SecureToken 2 with MediaCache and RTMP protocol

**URL:** <https://community.wowza.com/t/securetoken-2-with-mediacache-and-rtmp-protocol/35742>\
**Category:** Wowza Streaming Engine\
**Created:** [February 6, 2015, 2:36pm UTC](https://community.wowza.com/t/securetoken-2-with-mediacache-and-rtmp-protocol/35742 "2015-02-06T14:36:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Carlos\_Prata](https://avatars.discourse-cdn.com/v4/letter/c/e79b87/32.png) [@Carlos\_Prata](https://community.wowza.com/u/Carlos_Prata)\
**Post date:** [February 6, 2015, 2:36pm UTC](https://community.wowza.com/t/securetoken-2-with-mediacache-and-rtmp-protocol/35742/1 "2015-02-06T14:36:34Z")

</div>

I found a bug in SecureToken 2 when using the RTMPS protocol. RTMP works normally.

I define string vod/mp4:sample.mp4?65a4f04573112610 and Wowza read string **[host.com](http://host.com)**/vod/mp4:sample.mp4?65a4f04573112610 calculating wrong hash.

**RTMPS** logs:

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:creating RTMP token for ClientId:500173584 uri:rtmps://host.com/vod/mp4:sample.mp4 - - - 589.526 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:client IP: 200.196.49.194 - - - 589.526 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:hashCalculated: RtTZusSa9mGgpHjvbPV6kWuebO6MSxi2z0IM-8jFKyE= - - - 589.527 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:string hashed: **[host.com](http://host.com)/vod/mp4:sample.mp4?65a4f04573112610** - - - 589.527 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:token start time stamp: 0 - - - 589.527 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:token end time stamp: 0 - - - 589.528 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment server INFO 200 - [vod/_definst_]SecureTokenDef:Hash RxAUFctm4Tldt41A1uDEIOUAnmnM4KvQGon1Z4YLx7o=, doesn’t match hash calculated, RtTZusSa9mGgpHjvbPV6kWuebO6MSxi2z0IM-8jFKyE= - - - 589.528 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:45:05 BRST comment session INFO 403 500173584 ModuleCoreSecurity.play[vod/_definst_/sample.mp4]: SecureToken failed.

**RTMP** logs:

2015-02-06 14:54:01 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:creating RTMP token for ClientId:1825866841 uri:rtmp://host.com/vod/mp4:sample.mp4 - - - 1124.894 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:54:01 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:client IP: 200.196.49.194 - - - 1124.894 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:54:01 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:hashCalculated: RxAUFctm4Tldt41A1uDEIOUAnmnM4KvQGon1Z4YLx7o= - - - 1124.895 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:54:01 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:string hashed: **vod/mp4:sample.mp4?65a4f04573112610** - - - 1124.895 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:54:01 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:token start time stamp: 0 - - - 1124.896 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:54:01 BRST comment server INFO 200 - [vod/_definst_]ModuleCoreSecurity:token end time stamp: 0 - - - 1124.896 - - - - - - - - - - - - - - - - - - - - - - - - -

2015-02-06 14:54:01 BRST comment server INFO 200 - ModuleCoreSecurity.play[vod/_definst_/sample.mp4]: All security checks passed.

Regards,

---

<div class="post-metadata">

**Author:** ![Zoran](https://sea2.discourse-cdn.com/flex002/user_avatar/community.wowza.com/zoran/32/385_2.png) [@Zoran](https://community.wowza.com/u/Zoran)\
**Post date:** [February 10, 2015, 6:27pm UTC](https://community.wowza.com/t/securetoken-2-with-mediacache-and-rtmp-protocol/35742/2 "2015-02-10T18:27:24Z")

</div>

Hi,

This is being looked at in support ticket #117440.

A fix for this issue will be included in a future patch, but there is no time frame set when this will become available.

Regards,

Zoran
