blob: b43241ddc711504203c2d7fc5db08c7f058fb043 [file] [log] [blame]
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1" />
<title>Installation Guide</title>
</head>
<body>
<h1>Apache Rampart/C Installation Guide</h1>
<p>This document guides you on how to install Rampart/C.</p>
<p>You must have <a href="http://www.openssl.org">OpenSSL</a> 0.9.8 (or above) installed in you system.</p>
<p>This release comes in two forms, source and binary. This document covers
both forms.</p>
<p>Please send your feedback to the developer mailing list: <a
href="mailto:rampart-c-dev@ws.apache.org">rampart-c-dev@ws.apache.org</a>
(Subscription details are available on the <a
href="http://ws.apache.org/rampart/c/mail-lists.html">Rampart/C site</a>).</p>
<h2>Contents</h2>
<ul>
<li><a href="#linux">Installing and Running on Linux</a>
<ul>
<li><a href="#linux_binary">Using the Binary Release</a></li>
<li><a href="#linux_source">Using the Source Release</a></li>
</ul>
</li>
<li><a href="#win">Installing and Running on Microsoft Windows (win32)</a>
<ul>
<li><a href="#win_binary">Using the Binary Release</a></li>
<li><a href="#win_source">Using the Source Release</a></li>
</ul>
</li>
<li><a href="#engage">Engage Rampart/C with Axis2/C</a></li>
</li>
</ul>
<a id="linux"></a>
<h2>1. Installing and Running on Linux</h2>
<p>This can be done using binary or source distributions. (<a
href="http://ws.apache.org/rampart/c/download.cgi">Download</a> the two
distributions)</p>
<a id="linux_binary"/>
<h3>1.1. Installing the Binary Distribution</h3>
<p>The following steps have to be followed to install and run the Rampart/C
binary distribution on Linux : </p>
<ol>
<li>Extract the binary tar package to a folder.</li>
<li>Set the AXIS2C_HOME environment variable pointing to the location where
you have extracted Axis2/C
<ul>
<li>AXIS2C_HOME='/your_path_to_axis2c'</li>
<li>export AXIS2C_HOME</li>
</ul>
</li>
<li>Copy modules/* to $AXIS2C_HOME/modules/
<li>Copy lib/* to $AXIS2C_HOME/lib
<li>Copy services/* to $AXIS2C_HOME/services/
<li>Copy samples/* to $AXIS2C_HOME/samples/. This will copy callback modules etc.
<li>Engage Rampart/C as specified in the section <a href="#engage">Engage Rampart/C with Axis2/C</a>
<li>Go to samples/src/rampartc/client/ and deploy the client repo
<pre>%sh deploy_client_repo.sh</pre>
<li>Go to samples/src/rampartc/secpolicy/ and try a scenario
<pre> %sh test_scen.sh scenarioX server-port</pre>
</ol>
<a id="linux_source"></a>
<h3>1.2. Installing the Source Distribution</h3>
<p>The following steps have to be followed to install and run Rampart/C using
the source distribution on Linux :</p>
<ol>
<li>Extract the source tar package to a folder.</li>
<li>Set the AXIS2C_HOME environment variable pointing to the location where
you want to install Axis2/C
<ul>
<li>AXIS2C_HOME='/your_desired_path_to_axis2c_installation'</li>
<li>export AXIS2C_HOME</li>
</ul>
</li>
<li>Then go to the folder where you extracted the source.
</li>
<li>Build the source
<ul>
<li>This can be done using the following command sequence, in the
directory where you have extracted the source:
<ul>
<li>./configure --prefix=${AXIS2C_HOME} --enable-static=no --with-axis2=${AXIS2C_HOME}/include/axis2-1.6.0</li>
<li>make</li>
<li>make install</li>
</ul>
</li>
<li>Please run "./configure --help" in the samples folder for more
information on the configure options.</li>
</ul>
</li>
<li>Engage Rampart/C as specified in the section <a href="#engage">Engage Rampart/C with Axis2/C</a>
<li>If you need to try samples,first you need to build them. Go to samples and run the script build.sh
<pre>
%sh build.sh
</pre>
<li>Then go to samples/secpolicy and try a scenario
<pre>
%sh test_scen.sh scenarioX server-port
</pre>
</ol>
<a id="win"></a>
<h2>2. Installing and Running on Microsoft Windows</h2>
<p>This too can be done using binary or source distributions. (<a
href="http://ws.apache.org/rampart/c/download.cgi">Download</a> the two
distributions.) </p>
<a id="win_binary"></a>
<h3>2. 1. Installing the Binary Distribution </h3>
<ol>
<li>Extract the binary distribution to a folder of your choice. (example:
C:\rampartc).</li>
<li>Set the AXIS2C_HOME envirionment variable to direct to your Axis2/C Installation. </li>
<pre>SET AXIS2C_HOME=[your-path-to-axis2c]</pre>
<li>Run the deploy_rampart.bat that could be found in the root of the rampart binary distribution.</li>
<li>Engage Rampart/C as specified in the section <a href="#engage">Engage Rampart/C with Axis2/C</a>.
<li>Go to samples/src/rampartc/secpolicy/ and try a scenario
<pre> test_scen.bat scenarioX server-port</pre>
</ol>
<a id="bin_run"></a>
<a id="win_source"></a>
<h3>2. 2. Installing Source Distribution</h3>
<h4>2.2.1. Requirements</h4>
<ul>
<li>The makefile shipped with this version needs Microsoft Visual Studio
Compiler (cl) and the nmake build tool.</li>
<p>(Note: You can download the <a
href="http://msdn.microsoft.com/vstudio/express/downloads/">Microsoft VSExpress edition and Platform SDK</a> from the Microsoft Web
site. You will need to add the path to the Platform SDK Include and Lib
folders to the makefile)</p>
</li>
</ul>
<a id="edit"></a>
<a id="src_compile"></a>
<h4>2.2.2. Compiling the Source</h4>
<p>The following steps will take you through the source compilation.</p>
<ul>
<li>Extract the source distribution to a folder of your choice. (Example:
C:\rampartc)</li>
<li>Edit the configure.in file to specify the Axis2/C repository path and the OpenSSL installation path
<ul>
<li>AXIS2_BIN_DIR = path/to/where/you/have/installed/axis2</li>
<li>OPENSSL_BIN_DIR = path/to/where/you/have/installed/openssl</li>
<li>DEBUG = 1 if enabled, 0 otherwise</li>
</ul>
</li>
<li>Open a DOS shell</li>
<li>cd C:\rampartc\build\win32</li>
<li>to access .Net tools, run
<ul>
<li>C:\rampartc\build\win32\&gt; vcvars32.bat</li>
</ul>
<p>(<strong>Note</strong>: You may have to set the PATH environment
variable to vcvars32.bat if MS Windows gives an error indicating that it
cannot find this batch file. This file is located in &lt;your MS Visual
Studio install Directory&gt;\VC\bin directory.)</p>
</li>
<li>To build the system and create the binary files in a directory named
deploy under the build directory,
<ul>
<li>C:\rampartc\build\win32&gt;nmake install</li>
</ul>
</li>
<li>Engage Rampart/C as specified in the section <a href="#engage">Engage Rampart/C with Axis2/C</a>
<li>Then go to samples/secpolicy and try a scenario
<pre>
test_scen.bat scenarioX server-port
</pre>
</ul>
<a id="src_run"></a>
<a id="engage"/>
<h2>Engage Rampart/C with axis2/C </h2>
<p>You can engage Rampart/C in global level or in service level.</p>
<p>Just add the following entry either to axis2.xml(gloabl level) or in services.xml(service level) corresponding to the service you want to secure.</p>
<pre>
&lt;module ref="rampart"/&gt;
</pre>
<p>If you want to provide Secure Token Service (STS) functionality to a service, add the following entry to services.xml. </p>
&lt;module ref="rahas"/&gt;
<p>Then add following "Security" phase to the phase order in the inflow and outflow in the axis2.xml. Also add "Rahas" phase to inflow.</p>
<pre>
&lt;phaseOrder type="inflow"&gt;
&lt;phase name="Transport"/&gt;
&lt;phase name="PreDispatch"/&gt;
&lt;phase name="Dispatch"/&gt;
&lt;phase name="PostDispatch"/&gt;
&lt;phase name="Security" /&gt;
&lt;phase name="Rahas"/&gt;
&lt;/phaseOrder&gt;
&lt;phaseOrder type="outflow"&gt;
&lt;phase name="MessageOut"/&gt;
&lt;phase name="Security"/&gt;
&lt;/phaseOrder&gt;
</pre>
<p>Apart from that you must define security policies for the client and the server.
<p/>
<p>
<br>
<strong>CLIENT SIDE:</strong>
<p>In the client side just drop a policy.xml file to the same location(client-repo) where you have the axis2.xml.
<p/>
<p>
<br>
<strong>SERVER SIDE:</strong>
<p>Add WS-Security Policy assertions to the services.xml.
<p/>
<p><strong>NOTE:</strong> Please find sample security policy files that are located under <a href="http://svn.apache.org/repos/asf/webservices/rampart/trunk/c/samples/secpolicy/">samples/secpolicy</a></p>
<p>You may go through each and every scenario and see how Rampart/C is configured using the policy assertions available in respective policy files.
<br>
For each scenario there are two files</p>
<ol>
<li>client-policy.xml : Defines what the security configurations are for the client using security policies</li>
<li>services.xml : Defines what the security configurations are for a particular service using security policies</li>
</ol>
<p><strong>NOTE:</strong> If you have changed a client's policy file, make sure that you change the corresponding policy assertions in the services.xml file as well, and vise versa. </p>
</body>
</html>