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 2008/04/08 11:48:47 UTC
svn commit: r645812 - in /webservices/rampart/trunk/c:
include/rampart_handler_util.h src/handlers/rampart_in_handler.c
src/util/rampart_handler_util.c
Author: kaushalye
Date: Tue Apr 8 02:48:45 2008
New Revision: 645812
URL: http://svn.apache.org/viewvc?rev=645812&view=rev
Log:
Rampart must fail if there is no security header
Modified:
webservices/rampart/trunk/c/include/rampart_handler_util.h
webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c
webservices/rampart/trunk/c/src/util/rampart_handler_util.c
Modified: webservices/rampart/trunk/c/include/rampart_handler_util.h
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/include/rampart_handler_util.h?rev=645812&r1=645811&r2=645812&view=diff
==============================================================================
--- webservices/rampart/trunk/c/include/rampart_handler_util.h (original)
+++ webservices/rampart/trunk/c/include/rampart_handler_util.h Tue Apr 8 02:48:45 2008
@@ -87,7 +87,7 @@
* @return soap_header security element node
*/
AXIS2_EXTERN axiom_node_t *AXIS2_CALL
- rampart_get_security_token(const axutil_env_t *env,
+ rampart_get_security_header(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_soap_header_t *soap_header);
@@ -114,7 +114,7 @@
* @param sec_node the reference to the security node
*/
AXIS2_EXTERN axis2_status_t AXIS2_CALL
- rampart_validate_security_token(const axutil_env_t *env,
+ rampart_validate_security_header(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_node_t *sec_node);
/**
Modified: webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c?rev=645812&r1=645811&r2=645812&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c (original)
+++ webservices/rampart/trunk/c/src/handlers/rampart_in_handler.c Tue Apr 8 02:48:45 2008
@@ -100,9 +100,9 @@
soap_header = axiom_soap_envelope_get_header(soap_envelope, env);
if (!soap_header)
{
- /*No SOAP header, so no point of proceeding*/
+ /*No SOAP header, so no point of proceeding. FAIL*/
AXIS2_LOG_INFO(env->log, "[rampart][rampart_in_handler] No SOAP header found.");
- return AXIS2_SUCCESS;
+ return AXIS2_FAILURE;
}
AXIS2_LOG_TRACE(env->log, AXIS2_LOG_SI, "[rampart][rampart_in_handler] SOAP header found");
@@ -114,8 +114,9 @@
return AXIS2_FAILURE;
}
- sec_node = rampart_get_security_token(env, msg_ctx, soap_header);
+ sec_node = rampart_get_security_header(env, msg_ctx, soap_header);
+ /*We do not check for the security header in Transport binding */
if((rampart_context_get_binding_type(rampart_context, env)) != RP_PROPERTY_TRANSPORT_BINDING)
{
if(!sec_node)
@@ -134,8 +135,6 @@
"[rampart][rampart_in_handler] Unable to set the security processed results");
}
- /*status = rampart_shp_process_message(env, msg_ctx, rampart_context,
- soap_envelope, sec_node);*/
status = rampart_shp_process_sec_header(env, msg_ctx, rampart_context,
soap_envelope, sec_node);
Modified: webservices/rampart/trunk/c/src/util/rampart_handler_util.c
URL: http://svn.apache.org/viewvc/webservices/rampart/trunk/c/src/util/rampart_handler_util.c?rev=645812&r1=645811&r2=645812&view=diff
==============================================================================
--- webservices/rampart/trunk/c/src/util/rampart_handler_util.c (original)
+++ webservices/rampart/trunk/c/src/util/rampart_handler_util.c Tue Apr 8 02:48:45 2008
@@ -42,7 +42,7 @@
axis2_char_t *parameter);
AXIS2_EXTERN axiom_node_t *AXIS2_CALL
-rampart_get_security_token(const axutil_env_t *env,
+rampart_get_security_header(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_soap_header_t *soap_header);
@@ -54,7 +54,7 @@
axis2_msg_ctx_t *msg_ctx);
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-rampart_validate_security_token(const axutil_env_t *env,
+rampart_validate_security_header(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_node_t *sec_node);
@@ -101,7 +101,7 @@
axiom_node_t *AXIS2_CALL
-rampart_get_security_token(const axutil_env_t *env,
+rampart_get_security_header(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_soap_header_t *soap_header
)
@@ -208,7 +208,7 @@
}
AXIS2_EXTERN axis2_status_t AXIS2_CALL
-rampart_validate_security_token(const axutil_env_t *env,
+rampart_validate_security_header(const axutil_env_t *env,
axis2_msg_ctx_t *msg_ctx,
axiom_node_t *sec_node)
{