There was a problem loading the comments.

How does URL signing work (as of VIMP 6.5.3)?

Support Portal  »  Knowledgebase (FAQ)  »  Viewing Article

  Print
Editiones: VIMP Enterprise, VIMP Campus
Versions: 6.5.3+


The playback of VIMP videos as video embeds on external websites can be restricted to defined domains. 

 

To do this, activate streaming under Configuration -> Streaming -> Streaming settings and select "Native HLS" or "HLS via streaming server" as the protocol (if you have connected a streaming server such as Wowza).

 

In VIMP, URL signing can then be activated in the configuration under "URL signing". 

 

You can also specify the list of domains on which an embedded video may be played here.

 

URL signing also offers the option of restricting signing to individual videos. To activate this function, first create a user-defined media field of the type checkbox:

 

d7e43c8bb1f898ea1a8fbcf12c9c68474e74a28b6762144941892868c1504012ac1f27bb1499c7d3?t=0e259fb433900acaef1a7ec93b040e40

You can choose any field name you like, as well as the displayed name.

 

In the media field settings, set the visibility to hidden so that it is not displayed in the frontend, but only when uploading and editing the medium.

 

08b8942f9de4c2040d8e339d51b9a6ae14c4d19bd3b9271930b418c39276c8b59da06bb49631a504?t=5f9497f17c24c7d5c8a6c719a065a77d

 

55ef989f0dde7712a6d51ff9ebbc586fafcf1ca2f96223862acade0c2a875f1b4f30d8c6cb1cdbe9?t=2ffbfdeab77db7896adf5a41e44ec28a

 

Back in the URL signing configuration, select the field you have just created as the field responsible for signing.

 

From now on, only media for which the checkbox is ticked will be signed. All other media can continue to be integrated on any website without being checked.


Wowza configuration for URL signing 

If you want to use URL signing together with the Wowza Streaming Engine, please also carry out the following steps.

 

We assume that the Wowza Streaming Engine is already installed and configured. If not, please proceed as described in this FAQ article.

 

Install Wrench

Install the Wrench module as described in this article: https://streamtoolbox.com/wrench-setup

 

You also need the MySQL connector, which you can download via the download link in the Wrench FAQ: https://streamtoolbox.com/faq

 

Now add the following block directly at the end, before the closing </Application> tag, in your application's application.xml file. You can usually find this file in usr/local/WowzaEngine/conf/<application>.

 

		<Properties>
			<Property>
				<Name>wrench.ui.enabled</Name>
				<Value>true</Value>
				<Type>Boolean</Type>
			</Property>
			<Property>
				<Name>wrench.ui.port</Name>
				<Value>4567</Value>
				<Type>Integer</Type>
			</Property>
			<Property>
				<Name>wrench.db.driver</Name>
				<Value>com.mysql.jdbc.Driver</Value>
			</Property>
			<Property>
				<Name>wrench.db.url</Name>
				<Value>jdbc:mysql://localhost:3306/vimp</Value>
			</Property>
			<Property>
				<Name>wrench.db.user</Name>
				<Value>vimp</Value>
			</Property>
			<Property>
				<Name>wrench.db.pass</Name>
				<Value>1234567890</Value>
			</Property>
			<Property>
				<Name>wrench.bypass.publish.allowed</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.bypass.play.allowed</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.token.expiry.sec</Name>
				<Value>0</Value>
			</Property>
			<Property>
				<Name>wrench.duplicate.check</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.duplicate.drop.other</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.duplicate.limit</Name>
				<Value>1</Value>
			</Property>
			<Property>
				<Name>wrench.switchable.public</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.switchable.public.mode.filtering</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.logging.verbose</Name>
				<Value>true</Value>
			</Property>
			<Property>
				<Name>wrench.rtp.check.enable</Name>
				<Value>true</Value>
			</Property>
			<Property>
				<Name>wrench.http.streamer.request.check.enable</Name>
				<Value>true</Value> <!-- false -->
			</Property>
			<Property>
				<Name>wrench.http.streamer.request.ignore.token</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.disconnect.publish</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.connect.authorization.url.default.result</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.http.autoaccept.ticket.count</Name>
				<Value>3</Value>
			</Property>
			<Property>
				<Name>wrench.http.autoaccept.ticket.timeout</Name>
				<Value>15</Value>
			</Property>
			<Property>
				<Name>wrench.ppv.grace.period</Name>
				<Value>5</Value>
			</Property>
			<Property>
				<Name>wrench.monitor.period</Name>
				<Value>600</Value>
			</Property>
			<Property>
				<Name>wrench.ppm.update.publish</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.publish.encoder.flag.check</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.force.secure.transport</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.duplicate.check.mode</Name>
				<Value>username</Value>
			</Property>
			<Property>
				<Name>wrench.switchable.public.check.period</Name>
				<Value>10</Value>
			</Property>
			<Property>
				<Name>wrench.http.request.limit</Name>
				<Value>0</Value>
			</Property>
			<Property>
				<Name>wrench.http.request.limit.drop.session</Name>
				<Value>false</Value>
			</Property>
			<Property>
				<Name>wrench.http.request.limit.time.window</Name>
				<Value>30</Value>
			</Property>
			<Property>
				<Name>wrench.encoder.token</Name>
				<Value>encodersecret</Value>
			</Property>
			<Property>
               <Name>wrench.token.url.parameter</Name>
               <Value>wrench</Value>
            </Property>
            <Property>
               <Name>wrench.token.hashing</Name>
               <Value>md5</Value>
            </Property>
			<Property>
               <Name>wrench.token.resolver.sql</Name>
               <Value>SELECT wtid AS username, ip_address AS ip FROM wrench_token WHERE token_hash = :hashedtoken AND expires_at > UNIX_TIMESTAMP()</Value>
            </Property>
            <Property>
               <Name>wrench.connect.authorization.sql</Name>
               <Value>SELECT 1 FROM wrench_token WHERE wtid = :username AND expires_at > UNIX_TIMESTAMP() AND (SUBSTRING_INDEX(SUBSTRING_INDEX(:stream, ':', -1), '/', -1) = stream_key OR LEFT(SUBSTRING_INDEX(SUBSTRING_INDEX(:stream, ':', -1), '/', -1), CHAR_LENGTH(stream_key) + 1) IN (CONCAT(stream_key, '_'), CONCAT(stream_key, '.')))</Value>
            </Property>
			<Property>
               <Name>wrench.token.ip.check</Name>
               <Value>true</Value>
            </Property>
		</Properties>

 

Replace the values for: wrench.db.url, wrench.db.user, wrench.db.pass, wrench.encoder.token

 

And adjust the value for wrench.token.ip.check according to your VIMP configuration. It must be set to “false” if the IP binding option is disabled in VIMP, and to “true” if the option is enabled in VIMP.

 

Register a Wowza application in VIMP

Finally, enter the path to your Wrench-Wowza application in the VIMP admin area under Configuration -> Streaming -> Streaming Server URL for HLS with URL Signing.

 

You can retrieve the URL in Wowza by clicking the “Test Playback...” button in the application. It consists of the values for Server, Application, and Media File Name:

 

51707ba626c7ab696a2686f33ea350425c438874746f29da359236d37daea3e4f4b592fdc91a89f1?t=f6503a0baf73d87e7f9d76f0448bbfbf

 

However, do not enter the entire URL that you see as a “Secure URL” into VIMP.

 

In the example above, the URL to enter into VIMP would be: https://myserver.tld:8443/vod_wrench/playlist.m3u8

 

Important: When using URL signing with Wowza+Wrench, media encryption must not be enabled. Encrypted media cannot be played in this case.

 


Share via

Related Articles

© VIMP GmbH