You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ma...@apache.org on 2007/05/03 12:18:21 UTC
svn commit: r534778 - in /webservices/axis2/scratch/c/neethi:
axis2c/src/core/engine/ rampart/ rampart/samples/client/sec_echo/
rampart/src/ rampart/src/core/ rampart/src/handlers/ rampart/src/util/
Author: manjula
Date: Thu May 3 03:18:19 2007
New Revision: 534778
URL: http://svn.apache.org/viewvc?view=rev&rev=534778
Log:
Committing the changes in rampart.
Modified:
webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c
webservices/axis2/scratch/c/neethi/rampart/configure.ac
webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c
webservices/axis2/scratch/c/neethi/rampart/src/Makefile.am
webservices/axis2/scratch/c/neethi/rampart/src/core/Makefile.am
webservices/axis2/scratch/c/neethi/rampart/src/handlers/Makefile.am
webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_in_handler.c
webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_out_handler.c
webservices/axis2/scratch/c/neethi/rampart/src/util/Makefile.am
webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_builder.c
webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c
Modified: webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c (original)
+++ webservices/axis2/scratch/c/neethi/axis2c/src/core/engine/conf.c Thu May 3 03:18:19 2007
@@ -183,7 +183,6 @@
axis2_phase_add_handler_at(phase, env, 1, handler);
axutil_array_list_add(conf->handlers, env, axis2_handler_get_handler_desc(handler, env));
}
-
status = axutil_array_list_add(conf->
in_phases_upto_and_including_post_dispatch, env, phase);
if (AXIS2_FAILURE == status)
Modified: webservices/axis2/scratch/c/neethi/rampart/configure.ac
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/configure.ac?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/configure.ac (original)
+++ webservices/axis2/scratch/c/neethi/rampart/configure.ac Thu May 3 03:18:19 2007
@@ -102,9 +102,6 @@
src/omxmlsec/tokens/Makefile \
src/omxmlsec/openssl/Makefile \
src/omxmlsec/c14n/Makefile \
- src/secpolicy/Makefile
- src/secpolicy/model/Makefile
- src/secpolicy/builder/Makefile
src/data/Makefile \
src/handlers/Makefile \
src/core/Makefile \
Modified: webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c (original)
+++ webservices/axis2/scratch/c/neethi/rampart/samples/client/sec_echo/echo.c Thu May 3 03:18:19 2007
@@ -65,7 +65,7 @@
options = axis2_options_create(env);
axis2_options_set_to(options, env, endpoint_ref);
axis2_options_set_action(options, env,
- "http://ws.apache.org/axis2/c/samples/echoString");
+ "http://ws.apache.org/axis2/c/samples/sec_echo");
Modified: webservices/axis2/scratch/c/neethi/rampart/src/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/Makefile.am?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/Makefile.am Thu May 3 03:18:19 2007
@@ -1 +1 @@
-SUBDIRS = omxmlsec secpolicy handlers util core data
+SUBDIRS = omxmlsec handlers util core data
Modified: webservices/axis2/scratch/c/neethi/rampart/src/core/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/core/Makefile.am?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/core/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/core/Makefile.am Thu May 3 03:18:19 2007
@@ -8,10 +8,9 @@
libmod_rampart_la_LIBADD = ../handlers/librampart_handlers.la \
../util/librampart_util.la \
../omxmlsec/libomxmlsec.la \
- ../secpolicy/model/librp_model.la \
- ../secpolicy/builder/librp_builder.la \
${AXIS2C_HOME}/lib
INCLUDES = -I$(top_builddir)/include \
+ -I$(AXIS2C_HOME)/include/neethi-0.1 \
-I ../../include \
@AXIS2INC@
Modified: webservices/axis2/scratch/c/neethi/rampart/src/handlers/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/handlers/Makefile.am?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/handlers/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/handlers/Makefile.am Thu May 3 03:18:19 2007
@@ -5,4 +5,5 @@
rampart_in_handler.c
INCLUDES = -I$(top_builddir)/include \
-I ../../include \
+ -I /home/manjula/neethi/neethi/axis2c/deploy/include/neethi-0.1 \
@AXIS2INC@
Modified: webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_in_handler.c?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_in_handler.c (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_in_handler.c Thu May 3 03:18:19 2007
@@ -33,11 +33,8 @@
#include <rampart_util.h>
#include <rampart_sec_header_processor.h>
#include <rampart_sec_processed_result.h>
-#include <rp_policy_creator.h>
-#include <rp_secpolicy_builder.h>
#include <rampart_context.h>
-#include <rampart_engine.h>
-
+#include <rampart_neethi.h>
/*************************** Function headers *********************************/
axis2_status_t AXIS2_CALL
@@ -128,11 +125,12 @@
AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,
"[rampart][rampart_in_handler] Unable to set the security processed results");
}
-
+ rampart_context = rampart_neethi_build_configuration(env, msg_ctx);
+/*
rampart_context = rampart_engine_init(env,msg_ctx,AXIS2_TRUE);
if(!rampart_context)
return AXIS2_FAILURE;
-
+*/
status = rampart_shp_process_message(env, msg_ctx, rampart_context,
soap_envelope, sec_node);
@@ -140,7 +138,7 @@
{
AXIS2_LOG_INFO(env->log,
"[rampart][rampart_in_handler] Security Header processing failed.");
- rampart_engine_shutdown(env,rampart_context);
+ /* rampart_engine_shutdown(env,rampart_context);*/
return status;
}
@@ -148,7 +146,7 @@
/*We do not need rampart context to be freed in the server side*/
if(!serverside){
/*This method will free the rampart_context*/
- status = rampart_engine_shutdown(env, rampart_context);
+/* status = rampart_engine_shutdown(env, rampart_context);*/
}
return status;
Modified: webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_out_handler.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_out_handler.c?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_out_handler.c (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/handlers/rampart_out_handler.c Thu May 3 03:18:19 2007
@@ -29,10 +29,7 @@
#include <rampart_timestamp_token.h>
#include <rampart_encryption.h>
#include <rampart_sec_header_builder.h>
-#include <rp_policy_creator.h>
-#include <rp_secpolicy_builder.h>
#include <rampart_context.h>
-#include <rampart_engine.h>
/*********************** Function headers *********************************/
@@ -123,17 +120,17 @@
AXIS2_LOG_INFO(env->log, "[rampart][rampart_out_handler] Not intended for processing in Rampart");
return AXIS2_SUCCESS;
}
-
+/*
rampart_context = rampart_engine_init(env,msg_ctx,AXIS2_FALSE);
if(!rampart_context)
return AXIS2_FAILURE;
-
+*/
/*We call the security header builder*/
status = rampart_shb_build_message(env, msg_ctx, rampart_context, soap_envelope);
if(AXIS2_FAILURE == status){
AXIS2_LOG_INFO(env->log,
"[rampart][rampart_out_handler] Security header building failed ERROR");
- rampart_engine_shutdown(env,rampart_context);
+ /* rampart_engine_shutdown(env,rampart_context);*/
return AXIS2_FAILURE;
}
/*status = rampart_engine_shutdown(env,rampart_context);*/
Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/Makefile.am
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/Makefile.am?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/util/Makefile.am (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/util/Makefile.am Thu May 3 03:18:19 2007
@@ -3,10 +3,10 @@
noinst_LTLIBRARIES = librampart_util.la
librampart_util_la_SOURCES = rampart_crypto_util.c \
- rampart_util.c rampart_handler_util.c rampart_username_token.c rampart_timestamp_token.c \
+ rampart_util.c rampart_handler_util.c rampart_username_token.c rampart_timestamp_token.c \
rampart_encryption.c rampart_sec_header_processor.c rampart_sec_processed_result.c \
- rampart_sec_header_builder.c rampart_context.c rampart_engine.c rampart_token_processor.c rampart_signature.c \
- rampart_token_builder.c rampart_rd_record.c rampart_replay_detector.c
+ rampart_sec_header_builder.c rampart_context.c rampart_token_processor.c rampart_signature.c \
+ rampart_token_builder.c rampart_rd_record.c rampart_replay_detector.c rampart_neethi.c
librampart_util_la_LIBADD = -lssl \
@@ -15,4 +15,5 @@
INCLUDES = -I$(top_builddir)/include \
-I ../../include \
+ -I /home/manjula/neethi/neethi/axis2c/deploy/include/neethi-0.1 \
@AXIS2INC@
Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_builder.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_builder.c?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_builder.c (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_builder.c Thu May 3 03:18:19 2007
@@ -213,9 +213,51 @@
}
else if((rampart_context_get_binding_type(rampart_context,env)) == RP_BINDING_TRANSPORT)
{
- /*Do Transport Binding specific things */
- AXIS2_LOG_INFO(env->log, "[rampart][shb] Transport Binding. We do not support yet");
- return AXIS2_FAILURE;
+ /*Timestamp Inclusion*/
+
+ if(rampart_context_is_include_timestamp(rampart_context,env))
+ {
+ int ttl = -1;
+ AXIS2_LOG_INFO(env->log, "[rampart][shb] building Timestamp Token");
+ AXIS2_LOG_INFO(env->log, "[rampart][shb] Using default timeToLive value %d",
+ RAMPART_TIMESTAMP_TOKEN_DEFAULT_TIME_TO_LIVE);
+ /*ttl = RAMPART_TIMESTAMP_TOKEN_DEFAULT_TIME_TO_LIVE;*/
+ ttl = rampart_context_get_ttl(rampart_context,env);
+
+ status = rampart_timestamp_token_build(env,
+ sec_node, sec_ns_obj, ttl);
+ if (status == AXIS2_FAILURE)
+ {
+ AXIS2_LOG_INFO(env->log, "[rampart][shb] Timestamp Token build failed. ERROR");
+ return AXIS2_FAILURE;
+ }
+ }
+
+ /*Check whether we need username token*/
+ /*User name tokens includes in messages sent from client to server*/
+ if(!axis2_msg_ctx_get_server_side(msg_ctx,env))
+ {
+ if(rampart_context_is_include_username_token(rampart_context,env))
+ {
+
+ /*Now we are passing rampart_context here so inside this method
+ relevant parameters are extracted. */
+
+ AXIS2_LOG_INFO(env->log, "[rampart][shb] building UsernmaeToken");
+ status =rampart_username_token_build(
+ env,
+ rampart_context,
+ sec_node,
+ sec_ns_obj);
+ if (status == AXIS2_FAILURE)
+ {
+ AXIS2_LOG_INFO(env->log, "[rampart][shb] UsernmaeToken build failed. ERROR");
+ return AXIS2_FAILURE;
+ }
+ }
+ return status;
+ }
+ return status;
}
else
return AXIS2_FAILURE;
Modified: webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c
URL: http://svn.apache.org/viewvc/webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c?view=diff&rev=534778&r1=534777&r2=534778
==============================================================================
--- webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c (original)
+++ webservices/axis2/scratch/c/neethi/rampart/src/util/rampart_sec_header_processor.c Thu May 3 03:18:19 2007
@@ -929,8 +929,40 @@
}
else if((rampart_context_get_binding_type(rampart_context,env)) == RP_BINDING_TRANSPORT)
{
- AXIS2_LOG_INFO(env->log, "[rampart][shp] We still not support Transport binding.");
- return AXIS2_FAILURE;
+ axis2_status_t status = AXIS2_FAILURE;
+
+ status = rampart_shp_process_timestamptoken(env,msg_ctx,rampart_context,sec_node);
+ if(status!=AXIS2_SUCCESS){
+ return status;
+ }
+
+ if( axis2_msg_ctx_get_server_side(msg_ctx, env))
+ {
+ status = rampart_shp_process_usernametoken(env,msg_ctx,rampart_context,sec_node);
+ if(status!=AXIS2_SUCCESS)
+ return status;
+ }
+
+ if(AXIS2_TRUE == need_replay_detection){/*TODO Chk for the policy configuration*/
+ rampart_is_replayed_fn rd_fn = NULL;
+ /*Is replayed*/
+ rd_fn = rampart_context_get_replay_detect_function(rampart_context, env);
+ if(rd_fn){
+ status = (*rd_fn)(env, msg_ctx);
+ if(status != AXIS2_SUCCESS){
+ /*Scream .. replayed*/
+ return AXIS2_FAILURE;
+ }else{
+ AXIS2_LOG_INFO(env->log, "[rampart][shp] Checked message for replays. Not a replay.");
+ }
+ }else{
+ AXIS2_LOG_INFO(env->log, "[rampart][shp] No replay detection function specified. Nothing to do. ");
+ }
+ }
+ AXIS2_LOG_INFO(env->log, "[rampart][shp] Security header element processing, DONE ");
+ /*Do the action accordingly*/
+ return AXIS2_SUCCESS;
+
}
else
{
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org