One of my clients wants to limit the stream names that his application will accept for streaming. I’m trying to accomplish this with the StreamNameAlias module. My understanding from reading the docs is that adding the appropriate entries to conf/aliasmap.stream.txt will do what I want.
I’ve edited that file and removed the wildcard entry. I’ve tried adding a line that looks like:
stream1=${Stream.Name}
and found that I can still send any stream name with no problem. I then replaced that with a line that read:
stream1=stream1
but again found that I could send any stream name I want. I’m obviously misunderstanding how to make use of this module and how to build the aliasmap file.
Any pointers? For example, if I only want my application to accepts streams with stream names of “stream1”, “stream2”, or “stream3”, how would I go about achieving that short of writing a custom module?
One more point: in looking at the documentation for the MediaSecurity module and the StreamNameAlias module, both of them say to insert the appropriate module as the last entry in the section. Obviously only one of them can be last. Can I safely assume that it doesn’t matter too much which module is last in the list and which is last but one?
I would put the Media Security authentication module last.
Regarding your stream name alias question, besides setting up your aliasmap.stream.txt file, did you also add the corresponding configuration to your Application.xml?
-Lisa
Hi,
It does sound like you don’t want to allow a stream at all if it does not fit the name requirement, correct?
If this is the case, then StreamNameAlias isn’t really what you want, and some custom work will be necessary.
Take a look at the code example in this post, it does sound close to what you need:
https://www.wowza.com/forums/showthread.php?17097-Stop-live-streamname
and can certainly be adapted.
Daren
I would put the Media Security authentication module last.
Regarding your stream name alias question, besides setting up your aliasmap.stream.txt file, did you also add the corresponding configuration to your Application.xml?
-Lisa
Yep. I’ve currently got RTMPAuthenticate before StreamNameAlias; I’ll give it a try the other way around.
My current Application.xml contains:
ModuleRTMPAuthenticate
ModuleRTMPAuthenticate
com.wowza.wms.plugin.security.ModuleRTMPAuthenticate
ModulesStreamNameAlias
ModuleStreamNameAlias
com.wowza.wms.plugin.streamnamealias.ModuleStreamNameAlias
aliasMapFileStream
${com.wowza.wms.context.VHostConfigHome}/conf/aliasmap.stream.txt
aliasMapFilePlay
${com.wowza.wms.context.VHostConfigHome}/conf/aliasmap.play.txt
aliasMapPathDelimiter
/
aliasMapNameDelimiter
=
aliasMapDebug
true
Boolean
The aliasmap.stream.txt I tried most recently contains:
#*=${Stream.Name}
stream1=${Stream.Name}
stream2=${Stream.Name}
but doesn’t limit the allowed stream names. I’ll swap the last two Modules entries and see if that makes a difference.