You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rampart-dev@ws.apache.org by ka...@apache.org on 2007/09/27 10:06:19 UTC
svn commit: r579936 - in /webservices/rampart/trunk/c: INSTALL
rampart-bindist.sh samples/authn_provider/authn_provider.c
samples/secpolicy/scenario2/services.xml src/core/Makefile.am
xdocs/docs/installationguide.html
Author: kaushalye
Date: Thu Sep 27 01:06:18 2007
New Revision: 579936
URL: http://svn.apache.org/viewvc?rev=579936&view=rev
Log:
1.Changes to the authn_provider sample
2.Improved bindist script
3.Changes to the installation instructions
4.Linked axis2_engine to the core
Modified:
webservices/rampart/trunk/c/INSTALL
webservices/rampart/trunk/c/rampart-bindist.sh
webservices/rampart/trunk/c/samples/authn_provider/authn_provider.c
webservices/rampart/trunk/c/samples/secpolicy/scenario2/services.xml
webservices/rampart/trunk/c/src/core/Makefile.am
webservices/rampart/trunk/c/xdocs/docs/installationguide.html
Modified: webservices/rampart/trunk/c/INSTALL
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/INSTALL?rev=579936&r1=579935&r2=579936&view=diff
==============================================================================
--- webservices/rampart/trunk/c/INSTALL (original)
+++ webservices/rampart/trunk/c/INSTALL Thu Sep 27 01:06:18 2007
@@ -27,12 +27,13 @@
Getting Rampart/C binary distribution working on Linux
======================================================
1. Copy modules/rampart to $AXIS2C_HOME/modules
-2. Copy samples/server/sec_echo to $AXIS2C_HOME/services/
-3. Engage rampart as described in section "Engaging Rampart/C with axis2/C"
-4. Copy samples/* to $AXIS2C_HOME/bin/samples/rampart. This will copy callback modules etc.
-5. Go to samples/client/sec_echo/ and deploy the client repo
+2. Copy lib/* to $AXIS2C_HOME/lib
+3. Copy samples/server/sec_echo to $AXIS2C_HOME/services/
+4. Engage rampart as described in section "Engaging Rampart/C with axis2/C"
+5. Copy samples/* to $AXIS2C_HOME/bin/samples/rampart. This will copy callback modules etc.
+6. Go to samples/client/sec_echo/ and deploy the client repo
%sh deploy_client_repo.sh
-6. Go to samples/secpolicy/ and try a scenario
+7. Go to samples/secpolicy/ and try a scenario
%sh test_scen.sh scenarioX server-port
Getting Rampart/C source working on Win32
Modified: webservices/rampart/trunk/c/rampart-bindist.sh
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/rampart-bindist.sh?rev=579936&r1=579935&r2=579936&view=diff
==============================================================================
--- webservices/rampart/trunk/c/rampart-bindist.sh (original)
+++ webservices/rampart/trunk/c/rampart-bindist.sh Thu Sep 27 01:06:18 2007
@@ -14,10 +14,13 @@
echo "Build samples"
cd samples
./build.sh
+ #to get sample sources
+ make dist
cd ..
fi
+
echo "Deleting $BIN_DIR, $TAR_GZ, $MD5 if any"
rm -rf $BIN_DIR
rm $TAR_GZ
@@ -35,6 +38,8 @@
mkdir $BIN_DIR/samples/server
mkdir $BIN_DIR/include
mkdir $BIN_DIR/include/$INCL_V_DIR
+mkdir $BIN_DIR/samples/samples_src
+mkdir $BIN_DIR/lib
echo "Copy related files to $BIN_DIR"
#Copy other related files
@@ -50,6 +55,10 @@
#Copy rampart module
cp -r $AXIS2C_HOME/modules/rampart $BIN_DIR/modules/
+echo "Copy libraries"
+cp $AXIS2C_HOME/lib/liboxstokens.* $BIN_DIR/lib
+cp $AXIS2C_HOME/lib/libomxmlsec.* $BIN_DIR/lib
+
echo "Copy samples"
#copy samples
cp -r samples/secpolicy/* $BIN_DIR/samples/secpolicy/
@@ -66,6 +75,12 @@
echo "Copy API"
cp -rf xdocs/api $BIN_DIR/docs
+
+echo "Copy sample sources"
+tar -xzf samples/rampart-samples-src*.tar.gz
+rm samples/rampart-samples-src*.tar.gz
+cp -r rampart-samples-src*/* $BIN_DIR/samples_src
+rm -rf rampart-samples-src*
echo "Removing garbage in $BIN_DIR"
cd $BIN_DIR
Modified: webservices/rampart/trunk/c/samples/authn_provider/authn_provider.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/authn_provider/authn_provider.c?rev=579936&r1=579935&r2=579936&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/authn_provider/authn_provider.c (original)
+++ webservices/rampart/trunk/c/samples/authn_provider/authn_provider.c Thu Sep 27 01:06:18 2007
@@ -27,7 +27,7 @@
#include <axutil_string.h>
axis2_char_t* AXIS2_CALL
-ramaprt_get_sample_password(const axutil_env_t *env,
+ramaprt_authn_get_sample_password(const axutil_env_t *env,
const axis2_char_t *username)
{
/*First set pf password are for sample usernames*/
@@ -78,46 +78,6 @@
};
-axis2_char_t* AXIS2_CALL
-ramaprt_get_sample_password_from_file(const axutil_env_t *env,
- const axis2_char_t *username)
-{
- axis2_char_t * password = NULL;
- FILE *file = NULL;
- axis2_char_t *filename = "samples/rampart/data/passwords.txt";
-
- file = fopen ( filename, "r" );
- if ( file != NULL )
- {
- axis2_char_t line [ 128 ];
- axis2_char_t ch = 0;
- axis2_char_t *res = NULL;
- axis2_char_t *un = NULL;
- axis2_char_t *pw = NULL;
-
- while ( fgets ( line, sizeof line, file ) != NULL )
- {
- res = axutil_strstr(line, ":");
- ch = res[0];
- res[0] = '\0';
- un = (axis2_char_t *) axutil_strdup(env, line);
- res[0] = ch;
- if(0 == axutil_strcmp(un, username)){
- pw = (axis2_char_t *) axutil_strdup(env, &(res[1]));
- password = axutil_strndup(env, pw, axutil_strlen(pw)-1); /*We need to remove the end of line character*/
-
- break;
- }
- }
- AXIS2_FREE(env->allocator, un);
- AXIS2_FREE(env->allocator, pw);
- fclose ( file );
- }else{
- AXIS2_LOG_INFO(env->log, "[rampart][authn_provider_sample] Cannot load the password file %s ", filename);
- perror ( filename );
- }
- return password;
-}
/*Two sample implementations*/
rampart_authn_provider_status_t AXIS2_CALL
@@ -128,13 +88,8 @@
const axis2_char_t *password)
{
axis2_char_t *local_pw = NULL;
-#ifdef PW_FROM_FILE
- local_pw = ramaprt_get_sample_password_from_file(env, username);
- AXIS2_LOG_INFO(env->log, "[rampart][authn_provider_sample] Load the password - file impl");
-#else
- local_pw = ramaprt_get_sample_password(env, username);
+ local_pw = ramaprt_authn_get_sample_password(env, username);
AXIS2_LOG_INFO(env->log, "[rampart][authn_provider_sample] Load the password - default impl");
-#endif
if(local_pw){
/*Compare passwords*/
if(0 == axutil_strcmp(password, local_pw)){
@@ -162,7 +117,7 @@
axis2_char_t *local_pw = NULL;
- local_pw = ramaprt_get_sample_password_from_file(env, username);
+ local_pw = ramaprt_authn_get_sample_password_from_file(env, username);
if(local_pw){
axis2_char_t *local_digest = NULL;
/*Generate the digest*/
Modified: webservices/rampart/trunk/c/samples/secpolicy/scenario2/services.xml
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/secpolicy/scenario2/services.xml?rev=579936&r1=579935&r2=579936&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/secpolicy/scenario2/services.xml (original)
+++ webservices/rampart/trunk/c/samples/secpolicy/scenario2/services.xml Thu Sep 27 01:06:18 2007
@@ -48,8 +48,8 @@
<rampc:RampartConfig xmlns:rampc="http://ws.apache.org/rampart/c/policy">
<rampc:User>Bob</rampc:User>
<rampc:PasswordType>Digest</rampc:PasswordType>
- <rampc:AuthnModuleName>AXIS2C_HOME/bin/samples/rampart/authn_provider/libauthn.so</rampc:AuthnModuleName>
- <!--rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass-->
+ <!--rampc:AuthnModuleName>AXIS2C_HOME/bin/samples/rampart/authn_provider/libauthn.so</rampc:AuthnModuleName-->
+ <rampc:PasswordCallbackClass>AXIS2C_HOME/bin/samples/rampart/callback/libpwcb.so</rampc:PasswordCallbackClass>
</rampc:RampartConfig>
</wsp:All>
</wsp:ExactlyOne>
Modified: webservices/rampart/trunk/c/src/core/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/core/Makefile.am?rev=579936&r1=579935&r2=579936&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/core/Makefile.am (original)
+++ webservices/rampart/trunk/c/src/core/Makefile.am Thu Sep 27 01:06:18 2007
@@ -9,7 +9,8 @@
../util/librampart_util.la \
../omxmlsec/libomxmlsec.la \
@OPENSSLLIB@ \
- -lcrypto
+ -lcrypto \
+ -laxis2_engine
INCLUDES = -I$(top_builddir)/include \
Modified: webservices/rampart/trunk/c/xdocs/docs/installationguide.html
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/xdocs/docs/installationguide.html?rev=579936&r1=579935&r2=579936&view=diff
==============================================================================
--- webservices/rampart/trunk/c/xdocs/docs/installationguide.html (original)
+++ webservices/rampart/trunk/c/xdocs/docs/installationguide.html Thu Sep 27 01:06:18 2007
@@ -62,6 +62,7 @@
</ul>
</li>
<li>Copy modules/rampart to $AXIS2C_HOME/modules
+ <li>Copy lib/* to $AXIS2C_HOME/lib
<li>Copy samples/server/sec_echo to $AXIS2C_HOME/services/
<li>Copy samples/* to $AXIS2C_HOME/bin/samples/rampart. 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>