Mike Thorpe

How to create Secure Streaming tokens with Java

Blog Post created by Mike Thorpe Employee on Dec 19, 2014

This question was posed on one of our internal mailing list forums.  A customer wanted to know how to setup the Java Token Generator for Secure Streaming.  Secure Streaming as you might know is used with our 3rd part (legacy) streaming services: Flash, Windows Media, Quicktime.  To make this work follow these steps.

 

1. Install the JRE.  You can download from Oracle and use prescribed install method for your platform.

 

http://www.oracle.com/technetwork/java/javase/downloads/java-se-jre-7-download-432155.html

 

2. Download the Secure Streaming token generator code for Java.  This is available in the Luna Control Center.  Just go to the Support link in the upper right hand corner, then select User & Developer Guides under the Akamai Knowledge section.  Then choose Live or On Demand Streaming.  From there go to the Secure Streaming Tools section and download the Java Token Generators, Version 3.0.2 (ZIP).

 

3. Install the contents from the zip file in a directory in your system. 

 

Once installed you can read the README file for a sample code, but just to show you here are a couple of examples.

 

a.) See the help menu:

 

 

\java.exe -cp SecureStreaming

-Java16.jar -Dgentoken com.akamai.authentication.gentoken

Not enough command line arguments supplied

Akamai Secure Streaming, Java token generator version 3.0.3

usage: com.akamai.authentication.gentoken [options]

   -f path path being requested

   -i ip ip address of requester

   -r profile authentication profile

   -p passwd password

   -k key key filename and path (for e type tokens 32 bytes binary

file)

   -t time time of token creation

   -w window            time window in seconds

   -d render_duration   rendering duration (valid for c,d and e tokens only

   -s salt pre-generated salt

   -x payload           eXtra payload

   -y token_type        'a', 'c', 'd' or 'e'

   -v version           Display program version


b.) Generate a token:


\java.exe -cp SecureStreaming-Java16.jar -Dgentoken com.akamai.authentication.gentoken -f /path -r profilename -p password -w 900  -y c



Outcomes