MCM 2 Authentication Plugin
Description
This plugin monitors the action to play streams, and prevents the stream from playing if user is not authorized in MCM 2.Prerequisites
Tested on Wowza 4.0.3
Requires MCM 2 (or the mockup for testing).
This module is incompatible with the MCM Authentication Plugin.
Configuration
Configuring Wowza
Configuration is done in the file 'conf/chaos/Application.xml' relative to the VHost path of the plugin (see Installation).
The file is based on 'examples/SimpleVideoStreaming/conf/vod/Application.xml' from the Wowza system directory. It must be updated with the following three steps:
1. Edit Connections/AutoAccept and set it to false
[...] <Connections> <AutoAccept>false</AutoAccept> <AllowDomains></AllowDomains> </Connections> [...]
2. Edit Authentication/PlayMethod and set it to digest
[...] <Authentication> <PublishMethod>digest</PublishMethod> <PlayMethod>digest</PlayMethod> </Authentication> [...]
3. Add the Authentication module
[...] <Modules> [...] <Module> <Name>Chaos-Authentication</Name> <Description>Statsbiblioteket Chaos authentication module MCM 2</Description> <Class>dk.statsbiblioteket.medieplatform.wowza.plugin.authentication.WowzaSessionAuthenticationMCM2ModuleBase</Class> </Module> </Modules> [...]
Configuring plugin
Configuration is read from the file 'conf/chaos/chaos-streaming-server-plugin.properties' relative to the VHost path of the plugin (see Installation)
The following keys are used:
GeneralMCM2ServerURL=http://api.test.chaos-systems.com/ ValidationMCM2ValidationMethod=Object/Get
Configuring logging
Logging is done at VHost level. Edit the file 'conf/log4j.properties' relative to the VHost path of the plugin (see Installation) to set the desired log levels.
Installation
Assuming a Wowza server installed in $WOWZADIR configured with a toplevel directory for a VHost called $VHOSTDIR, the following is needed:
Add the distributed JAR files to $VHOSTDIR/applications/lib
Create the directory $VHOSTDIR/conf/chaos
Place the configuration file in $VHOSTDIR/conf/chaos/chaos-streaming-server-plugin.properties
Place the application file in $VHOSTDIR/conf/chaos/Application.xml
Create the directory $VHOSTDIR/applications/chaos
(To use an external VHost dir, follow the instructions from http://www.wowza.com/resources/WowzaStreamingEngine_UsersGuide.pdf section "Virtual Hosting")
Testing
In a browser, open the URL
file:///usr/local/WowzaStreamingEngine/examples/VideoOnDemandStreaming/FlashRTMPPlayer/player.html
(replace /usr/local/WowzaStreamingEngine with $WOWZADIR)
At server, type
rtmp://localhost/chaos?ObjectID=XXX&SessionID=YYY
For XXX use an object GUID from MCM.
For YYY use a valid session GUID from MCM.
At stream, type the filename of the object with ObjectID XXX
Assuming that file is available in the content directory of the VHost, the file should now start playing.
As an alternative to a real MCM 2, use the mcm-20-service-mock.
Run java dk.statsbiblioteket.larm.mcm.validator.mock.Main
In plugin configuration at 'conf/chaos/chaos-streaming-server-plugin.properties', configure GeneralMCM2ServerURL=http://localhost:9998/
In player.html, at server type rtmp://localhost/chaos?ObjectID=9b8d95d1-dccc-458d-bfbd-eed7ecc84422&SessionID=filename.mp3
As stream use filename.mp3