blob: 2a428c62d9fcc385b655d67ec2c5000ba5131ef4 [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><title>Apache Rampart/C - Installation Guide</title><style type="text/css" media="all">
@import url("../style/maven-base.css");
@import url("../style/maven-classic.css");</style><link rel="stylesheet" href="../style/print.css" type="text/css" media="print"></link><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"></meta></head><body class="composite"><div id="banner"><a href="http://www.apache.org/" id="organizationLogo"><img alt="Apache Software Foundation" src="http://www.apache.org/images/asf-logo.gif"></img></a><a href="http://ws.apache.org/rampart/c" id="projectLogo"><img alt="Apache Rampart/C" src="http://ws.apache.org/rampart/c/images/rampartc_logo.jpg"></img></a><div class="clear"><hr></hr></div></div><div id="breadcrumbs"><div class="xleft">
Last published: 13 May 2009
| Doc for 1.3.0</div><div class="xright"></div><div class="clear"><hr></hr></div></div><div id="leftColumn"><div id="navcolumn"><div id="menuApache_Rampart_C"><h5>Apache Rampart/C</h5><ul><li class="none"><a href="../index.html">Apache Rampart/C Home</a></li><li class="expanded"><a href="../download.cgi">Download Rampart/C</a><ul><li class="none"><a href="../download.cgi">Releases</a></li></ul></li><li class="expanded"><a href="../docs/index.html">Documentation</a><ul><li class="none"><a href="../docs/installationguide.html">Installation Guide</a></li><li class="none"><a href="../docs/rampartc_manual.html">Rampart/C manual</a></li><li class="none"><a href="../docs/configurations.html">Configurations guide</a></li></ul></li><li class="expanded"><a href="../lists_issues.html">Get Involved</a><ul><li class="none"><a href="../lists_issues.html">Mailing Lists &amp; Issue Tracking</a></li><li class="none"><a href="../svn.html">Checkout Source Code</a></li></ul></li><li class="expanded"><a href="../coding_conventions.html">Developer Guidelines</a><ul><li class="none"><a href="../coding_conventions.html">Coding Convention</a></li><li class="none"><a href="../versioning.html">Versionning</a></li></ul></li><li class="expanded"><a href="../team-list.html">Project Information</a><ul><li class="none"><a href="../team-list.html">Project Team</a></li><li class="none"><a href="http://svn.apache.org/viewcvs.cgi/webservices/rampart/trunk/c/" class="externalLink" title="External Link">Source Code</a></li></ul></li></ul></div><a href="http://maven.apache.org/" title="Built by Maven" id="poweredBy"><img alt="Built by Maven" src="../images/logos/maven-button-1.png"></img></a></div></div><div id="bodyColumn"><div class="contentBox"><div class="section"><a name="Apache_Rampart_C_Installation_Guide"></a><h2>Apache Rampart/C Installation Guide</h2><p>This document guides you on how to install Rampart/C.</p><p>You must have <a href="http://www.openssl.org" class="externalLink" title="External Link">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" class="externalLink" title="External Link">Rampart/C site</a>).</p><div class="subsection"><a name="Contents"></a><h3>Contents</h3><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>
</ul><p><a id="linux"></a></p></div><div class="subsection"><a name="1__Installing_and_Running_on_Linux"></a><h3>1. Installing and Running on Linux</h3><p>This can be done using binary or source distributions. (<a href="http://ws.apache.org/rampart/c/download.cgi" class="externalLink" title="External Link">Download</a> the two
distributions)</p><p><a id="linux_binary"></a></p></div><div class="subsection"><a name="1_1__Installing_the_Binary_Distribution"></a><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><li>Copy lib/* to $AXIS2C_HOME/lib
</li><li>Copy services/* to $AXIS2C_HOME/services/
</li><li>Copy samples/* to $AXIS2C_HOME/samples/. This will copy callback modules etc.
</li><li>Engage Rampart/C as specified in the section <a href="#engage">Engage Rampart/C with Axis2/C</a>
</li><li>Go to samples/src/rampartc/client/ and deploy the client repo
<pre>%sh deploy_client_repo.sh</pre>
</li><li>Go to samples/src/rampartc/secpolicy/ and try a scenario
<pre> %sh test_scen.sh scenarioX server-port</pre>
</li></ol><p><a id="linux_source"></a></p></div><div class="subsection"><a name="1_2__Installing_the_Source_Distribution"></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><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><li>Then go to samples/secpolicy and try a scenario
<pre>
%sh test_scen.sh scenarioX server-port
</pre>
</li></ol><p><a id="win"></a></p></div><div class="subsection"><a name="2__Installing_and_Running_on_Microsoft_Windows"></a><h3>2. Installing and Running on Microsoft Windows</h3><p>This too can be done using binary or source distributions. (<a href="http://ws.apache.org/rampart/c/download.cgi" class="externalLink" title="External Link">Download</a> the two
distributions.) </p><p><a id="win_binary"></a></p></div><div class="subsection"><a name="2__1__Installing_the_Binary_Distribution"></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><li>Go to samples/src/rampartc/secpolicy/ and try a scenario
<pre> test_scen.bat scenarioX server-port</pre>
</li></ol><p><a id="bin_run"></a><a id="win_source"></a></p></div><div class="subsection"><a name="2__2__Installing_Source_Distribution"></a><h3>2. 2. Installing Source Distribution</h3></div><div class="subsection"><a name="2_2_1__Requirements"></a><h3>2.2.1. Requirements</h3><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/" class="externalLink" title="External Link">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>
</ul><p><a id="edit"></a><a id="src_compile"></a></p></div><div class="subsection"><a name="2_2_2__Compiling_the_Source"></a><h3>2.2.2. Compiling the Source</h3><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><li>Then go to samples/secpolicy and try a scenario
<pre>
test_scen.bat scenarioX server-port
</pre>
</li></ul><p><a id="src_run"></a><a id="engage"></a></p></div><div class="subsection"><a name="Engage_Rampart_C_with_axis2_C"></a><h3>Engage Rampart/C with axis2/C</h3><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>
<div class="source"><pre>
&lt;module ref="rampart"/&gt;
</pre></div>
<p>If you want to provide Secure Token Service (STS) functionality to a service, add the following entry to services.xml. </p><p>&lt;module ref="rahas"/&gt;
</p><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>
<div class="source"><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></div>
<p>Apart from that you must define security policies for the client and the server.
</p><p></p><p>
<br></br>
<strong>CLIENT SIDE:</strong>
</p><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></p><p>
<br></br>
<strong>SERVER SIDE:</strong>
</p><p>Add WS-Security Policy assertions to the services.xml.
</p><p></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/" class="externalLink" title="External Link">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></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></div></div></div></div><div class="clear"><hr></hr></div><div id="footer"><div class="xright">© 2005-2009, Apache Software Foundation</div><div class="clear"><hr></hr></div></div></body></html>