Sdp PARser (SPAR)
=================

Background
----------
New multicast capable multimedia applications, such as RealPlayer and
Marratech Pro, can accept files containing session descriptions (in SDP
format) to join a multicast conference.  This allows SDP files to be 
served from a web page and a conference joined, using a registered SDP 
MIME type associated with the application.

Alternatively popular MBone applications, such as VIC, RAT, WB and 
NTE rely on the Session Directory Tool (SDR) to convert the SDP into 
command line parameters and thus cannot take advantage of joining 
conferences via a web page.  The solution offered here is to accept the 
SDP from the web browser, convert it to command line parameters at the 
client side and then to start up the tools with the relevant parameters.
This could be implemented in several possible ways:
- a platform dependent binary running on the client machine with a 
MIME type for the SDP
- a plug-in installed in the browser
- a Java applet with execution privileges

The Java applet was implemented because it requires no installation 
or configuration by the user and is platform independent.

Java Applet
-----------
Simplistically, the Java applet (Figure 1) parses the SDP, extracts
essential parameters and then starts the tools with the parameters on the
client machine. The SDP content is embedded within the HTML as a
parameter to the applet. The field terminator used in the SDP is
replaced with a 'browser friendly' alternative, as SDP's CR/LF field
terminator is removed by the browser. An added advantage of using
HTTP to communicate the SDP content between client and server is
that by using a secure web server, the SDP content (with possible
encryption keys) will also be secure.

For obvious security reasons standard Java applets do not have 
permissions to access local resources and thus cannot execute software 
on the client machine.  To overcome this, both Netscapes Communicator 
and Microsofts Internet Explorer 4 allow applets to be digitally signed
with a private key associated to a RSA object-signing certificate.  If 
the user accepts the certificate, therefore trusting the applet, then 
the browser allows the applet access permissions outside the Java 
security sandbox.  Communicator and Internet Explorer implement 
different methods and technologies for digitally signing and 
distributing objects:

Communicator requires Java applets to be signed using Netscapes 
Netscape Object Signing software.  The certificate and Java code are the
n packaged using the JAR file structure.  Signed Java applets need to 
explicitly request permission to access local resources, such as 
executing software using the Netscapes Capabilities API extensions.  
The request causes Communicator to prompt the user, asking them to 
either accept or deny the relevant permission (see Figure 2).  The 
dialog box also contains the certificate as verification of the source 
and authenticity of the code.

Internet Explorer requires Java applets to be signed using 
Microsoft's Authenticode software and packaged using a CAB file 
structure.  A signed Java applet also has to request permission to 
access local resources by using Microsoft's Com API extensions. However 
unlike Communicator, the specific request doesn't prompt any user 
action.  Instead the user is asked to accept the applets' certificate 
when the applet is encountered by the browser (see Figure 3) and by doing 
so grants universal access to local system resources.

Alternatively, browser's that do not support signed applets but do 
have a 'plug-in' architecture can use SUN's Java Plugin to view the 
applet.  The Plugin requires the applet to be signed and packaged using 
Netscape's Netscape Object Signing software but it doesn't implement 
Netscape's Capabilities API.  Since the API is not supported by the 
Plugin, any certificate accepted by the user, grants universal access to
local system resources.

Kristian Hasler.  24-Aug-99.  v1.0
http://www-mice.cs.ucl.ac.uk/multimedia/software/spar/


The following instructions apply only to Windows and assumes the code is
installed in c:\src\spar

Building and signing Applet for Netscape Communicator 4.x
---------------------------------------------------------

Compilation:
1. Download and install JDK from Sun: 
   http://www.java.sun.com/products/jdk/1.1/index.html
2. Install the Netscape Capabilities classes in c:\src\spar.  Download from:
   http://developer.netscape.com/docs/manuals/signedobj/capsapi.html
3. Use NSbuild to compile the source.

Signing:
1. Download Netscape signtool from: 
   http://developer.netscape.com/software/signedobj/jarpack.html
2. Use signtool to create a test certificate: signtool -G Certificate
   (documentation: 
   http://developer.netscape.com/docs/manuals/signedobj/signtool/index.htm)
3. Make a directory tmp: mkdir tmp
4. Use NSsign to copy the class files into tmp and sign them

Running:
1. Load the sample NSsdp.html into Netscape Communicator.

Building and signing Applet for Internet Explorer 4&5
-----------------------------------------------------

Compilation:
1. Install Visual J++ 6.0
2. Use IEbuild to compile the source.

Signing:
1. Install IE5 and Java SDK.  IE5 is required for the SDK to work.
2. First set the registry to trust us: setreg 1 true
3. Use makecert to create a test certificate: 
   makecert -sk spar -n "CN=UCL" spar.cer
4. Use cert2spc to convert the certificate into a spc file: 
   cert2spc spar.cer spar.spc
5. Use IEsign to archive the class files into a cab file and sign the cab file.

Running:
1. Load the sample IEsdp.html into Internet Explorer.