# MediaSecurity AddOn Package (SecureToken, RTMP & RTSP Authentication and more)

**URL:** https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45
**Category:** Wowza Developer Dojo
**Tags:** wowza-streaming-server-java-api
**Created:** [April 28, 2008, 6:58am UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45 "2008-04-28T06:58:51Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [February 1, 2010, 8:39pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/21 "2010-02-01T20:39:41Z")

</div>

That is the player, and that’s all successful. Good so far.

Check the Wowza access log, not the error log, for what is happening on the Wowza side.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [February 1, 2010, 8:52pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/22 "2010-02-01T20:52:00Z")

</div>

You’ll have to zip up and send: /conf and /log folders to: support@wowza.com, with reference to this post.

And a link to the player if possible.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 7, 2010, 11:44am UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/23 "2010-04-07T11:44:15Z")

</div>

Do you want to use SecureToken only?

Remove this from Application.xml

```auto
<Module> 
	<Name>ModuleRTMPAuthenticate</Name> 
	<Description>ModuleRTMPAuthenticate</Description> 
	<Class>com.wowza.wms.plugin.security.ModuleRTMPAuthenticate</Class> 
</Module> 

```

Use this instead:

```auto
<Module>
	<Name>ModuleSecureToken</Name>
	<Description>ModuleSecureToken</Description>
	<Class>com.wowza.wms.plugin.security.ModuleSecureToken</Class>
</Module>

```

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 7, 2010, 10:31pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/24 "2010-04-07T22:31:55Z")

</div>

I don’t quite understand. Are you using RTMPE in the FMS url? I don’t think that will work.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 7, 2010, 11:14pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/25 "2010-04-07T23:14:38Z")

</div>

I see. Re-download the package, because it was updated just yesterday for this exact case.

One note: RTMPE just works, this package does not enable it.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 8, 2010, 4:54am UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/26 "2010-04-08T04:54:34Z")

</div>

FMLE doesn’t do SecureToken. But if you reverse what you did [here](http://community.wowza.com/t/-/45&page=4#36), put the ModuleRTMPAuthenticate module back, and take out ModuleSecureToken, but leave the SecureToken Property, then you can use Username/Password in FMLE. Add the username/password to /conf/publish.password.

Sorry to go back and forth, but that’s the way you should do it. ModuleRTMPAuthenticate includes SecureToken.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 10, 2010, 9:34pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/27 "2010-04-10T21:34:11Z")

</div>

Derrick,

Yes, that’s right.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [April 20, 2010, 10:32am UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/28 "2010-04-20T10:32:23Z")

</div>

It should be possible, but we don’t have an example. But there is an example of doing SecureToken with the Flash CS flvplayback component which might be helpful. Download the Security package:

[http://community.wowza.com/t/-/45](http://community.wowza.com/t/-/45)

And take a look at the /client/flvplaybacksecure.fla and this file:

/com/wowza/WowzaNCManagerAS3.as

You should be able to accomplish something similar with Flex VideoDisplay component.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [May 3, 2010, 10:12am UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/29 "2010-05-03T10:12:19Z")

</div>

This is the SWFLoader:

[https://www.wowza.com/forums/showthread.php?t=7064](https://www.wowza.com/forums/showthread.php?t=7064)

Also there is HotlinkDenial package:

[https://www.wowza.com/forums/showthread.php?t=5239](https://www.wowza.com/forums/showthread.php?t=5239)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [June 2, 2010, 4:37pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/30 "2010-06-02T16:37:11Z")

</div>

For JW Player 5:

[https://www.wowza.com/forums/showthread.php?t=7615](https://www.wowza.com/forums/showthread.php?t=7615)

For JW player 4:

[https://www.wowza.com/forums/showthread.php?t=7614](https://www.wowza.com/forums/showthread.php?t=7614)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 27, 2010, 1:01pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/31 "2010-07-27T13:01:16Z")

</div>

There should be a an Digital Rapid update that fixes this problem.

[http://community.wowza.com/t/-/34105&page=2](http://community.wowza.com/t/-/34105&page=2)

[http://community.wowza.com/t/-/34105&page=3](http://community.wowza.com/t/-/34105&page=3)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 27, 2010, 5:32pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/32 "2010-07-27T17:32:06Z")

</div>

I guess I don’t really understand. But with Wowza 2 you can use ModuleRTMPAuthenticate, and that includes SecureToken, which is enable by adding the secureTokenSharedSecret Property. This way the Flash client has to have the matching token to connect, and the publisher has to supply username and password to match a set of credentials in /conf/publish.password.

Or, I think you can still use SecureURLParams with Wowza 2 if the encoder does not support username and password.

But I think there were some problems address in recent version of Digital Rapids, and if you have to downgrade for other reasons, I’m not sure what to do.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [July 27, 2010, 6:10pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/33 "2010-07-27T18:10:17Z")

</div>

It works both ways if you add ModuleSecureURLParams to the Modules list and the secureTokenSharedSecret property to the Properties list.

Do not add the ModuleSecureToken to the Modules list because it is included in ModuleSecureURLParams, and is enabled by adding the property. Like this:

```auto
<Modules>
...
<Module>
<Name>ModuleSecureURLParams</Name>
<Description>ModuleSecureURLParams</Description>
<Class>com.wowza.wms.plugin.security.ModuleSecureURLParams</Class>
</Module>
</Modules>

```

Then in the Properties section:

```auto
<Properties>
<Property>
<Name>secureTokenSharedSecret</Name>
<Value>#ed%h0#w@1</Value>
</Property>
</Properties>

```

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 9, 2010, 12:45pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/34 "2010-08-09T12:45:05Z")

</div>

There is nothing built-in like that, but here are two posts on doing customized authentication that might help:

[https://www.wowza.com/forums/showpost.php?p=33210&postcount=15](https://www.wowza.com/forums/showpost.php?p=33210&postcount=15)

[https://www.wowza.com/forums/showthread.php?t=7812](https://www.wowza.com/forums/showthread.php?t=7812)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 11, 2010, 11:27am UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/35 "2010-08-11T11:27:23Z")

</div>

What version of Wowza are you using?

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 11, 2010, 1:58pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/36 "2010-08-11T13:58:58Z")

</div>

You should be using ModuleRTMPAuthenicate not ModuleSecureURLParams. Download this package and read the guide:

[https://www.wowza.com/downloads/forums/mediasecurity/MediaSecurity\_2.0.zip](https://www.wowza.com/downloads/forums/mediasecurity/MediaSecurity_2.0.zip)

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 11, 2010, 2:21pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/37 "2010-08-11T14:21:25Z")

</div>

SecureToken is used in a Flash app, not FMLE

You can use ModuleSecureURLParams if you want. In that case, download the 1.7 package and follow the guide included with it. You will be adding properties to support the doPublish value.

[https://www.wowza.com/downloads/forums/mediasecurity/MediaSecurity.zip](https://www.wowza.com/downloads/forums/mediasecurity/MediaSecurity.zip)

It should work on Wowza 2 following that guide, even with the Wowza 2 security jar.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 15, 2010, 8:26pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/38 "2010-08-15T20:26:32Z")

</div>

Read thru the guide again. You want to use SecureToken I think. That module just requires that you connect with secure connection protocol: rtmpe or rtmps.

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 16, 2010, 3:39pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/39 "2010-08-16T15:39:35Z")

</div>

It should work, if you have the MediaSecurity jar in /lib folder and SecureURLParams configured for that application.

But take out the dot, it’s just “doPublish”

rtmp://wowzaip/application/stream?doPublish=blabla

Richard

---

<div class="post-metadata">

### Author: ![Richard\_Lanham](https://avatars.discourse-cdn.com/v4/letter/r/c68b51/32.png) [@Richard\_Lanham](https://community.wowza.com/u/Richard_Lanham)
#### Post date: [August 17, 2010, 12:20pm UTC](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45/40 "2010-08-17T12:20:31Z")

</div>

Take out doConnect Property:

```auto
<Module>
<Name>ModuleSecureURLParams</Name>
<Description>ModuleSecureURLParams</Description>
<Class>com.wowza.wms.plugin.security.ModuleSecureURLParams</Class>
</Module>
...
...
<Property>
<Name>secureurlparams.publish</Name>
Value>54321.doPublish</Value>
</Property>

```

Then this will work:

```auto
ffmpeg -i /dev/video0 [non-important params] rtmp://wowzaip:1935/auth/first?doPublish=54321

```

This way, other publishers will be able to connect, but will not be able to publish without the doPublish querystring key.

However, this should work with both properties in place:

```auto
ffmpeg -i /dev/video0 [non-important params] rtmp://wowzaip:1935/auth/first?doPublish=54321&doConnect=12345

```

You do have two typos in what you posted, missing left angle brackets.

secureurlparams.connect

12345.doConnect

secureurlparams.publish

Value\>54321.doPublish

Richard

[Previous page](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45.md?page=1)

[Next page](https://community.wowza.com/t/mediasecurity-addon-package-securetoken-rtmp-rtsp-authentication-and-more/45.md?page=3)
