Author: shankar
Date: Fri Feb 8 01:59:24 2008
New Revision: 619817
URL: http://svn.apache.org/viewvc?rev=619817&view=rev
Log:
service for issuing security context token
Added:
webservices/rampart/trunk/c/samples/server/secconv_echo/
webservices/rampart/trunk/c/samples/server/secconv_echo/Makefile.am
webservices/rampart/trunk/c/samples/server/secconv_echo/echo.c
webservices/rampart/trunk/c/samples/server/secconv_echo/echo.h
webservices/rampart/trunk/c/samples/server/secconv_echo/echo_skeleton.c
webservices/rampart/trunk/c/samples/server/secconv_echo/server_axis2.xml
webservices/rampart/trunk/c/samples/server/secconv_echo/services.xml
Modified:
webservices/rampart/trunk/c/samples/server/Makefile.am
Modified: webservices/rampart/trunk/c/samples/server/Makefile.am
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/Makefile.am?rev=619817&r1=619816&r2=619817&view=diff
==============================================================================
--- webservices/rampart/trunk/c/samples/server/Makefile.am (original)
+++ webservices/rampart/trunk/c/samples/server/Makefile.am Fri Feb 8 01:59:24
2008
@@ -1,5 +1,5 @@
samplesdir=$(prefix)/samples/server
#SUBDIRS = sec_echo manuf
-SUBDIRS = sec_echo saml_sts
+SUBDIRS = sec_echo saml_sts secconv_echo
#EXTRA_DIST = axis2.xml axis2.log
#samples_DATA= Makefile.am Makefile.in
Added: webservices/rampart/trunk/c/samples/server/secconv_echo/Makefile.am
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/secconv_echo/Makefile.am?rev=619817&view=auto
==============================================================================
--- webservices/rampart/trunk/c/samples/server/secconv_echo/Makefile.am (added)
+++ webservices/rampart/trunk/c/samples/server/secconv_echo/Makefile.am Fri Feb
8 01:59:24 2008
@@ -0,0 +1,18 @@
+prglibdir=$(prefix)/services/secconv_echo
+samplesdir=$(prefix)/samples/server/secconv_echo
+prglib_LTLIBRARIES = libsecconv_echo.la
+samples_DATA=echo.c echo_skeleton.c echo.h services.xml Makefile.am Makefile.in
+prglib_DATA= services.xml
+EXTRA_DIST = services.xml echo.h server_axis2.xml
+noinst_HEADERS = echo.h
+SUBDIRS =
+libsecconv_echo_la_SOURCES = echo.c echo_skeleton.c
+libsecconv_echo_la_LIBADD = $(LDFLAGS) \
+ -L$(AXIS2C_HOME)/lib \
+ -L$(AXIS2C_HOME)/modules/rampart \
+ -lmod_rampart
+
+
+INCLUDES = @AXIS2INC@ \
+ -I$(AXIS2C_HOME)/include \
+ -I ../../../include
Added: webservices/rampart/trunk/c/samples/server/secconv_echo/echo.c
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/secconv_echo/echo.c?rev=619817&view=auto
==============================================================================
--- webservices/rampart/trunk/c/samples/server/secconv_echo/echo.c (added)
+++ webservices/rampart/trunk/c/samples/server/secconv_echo/echo.c Fri Feb 8
01:59:24 2008
@@ -0,0 +1,211 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include "echo.h"
+#include <axiom_xml_writer.h>
+#include <axiom_util.h>
+#include <stdio.h>
+#include <secconv_security_context_token.h>
+#include <trust_rstr.h>
+#include <trust_rst.h>
+#include <openssl_util.h>
+#include <oxs_utility.h>
+#include <axutil_hash.h>
+#include <axis2_conf_ctx.h>
+#include <axis2_ctx.h>
+#include <axutil_property.h>
+#include <rampart_constants.h>
+
+axiom_node_t *
+build_om_programatically(const axutil_env_t *env, axis2_char_t *text);
+
+axutil_hash_t *
+secconv_echo_get_sct_db(const axutil_env_t *env, axis2_msg_ctx_t* msg_ctx);
+
+axiom_node_t *
+axis2_echo_echo(const axutil_env_t *env, axiom_node_t *node, axis2_msg_ctx_t
*msg_ctx)
+{
+ axiom_node_t *ret_node = NULL;
+ axis2_char_t *name = NULL;
+ AXIS2_ENV_CHECK(env, NULL);
+
+ name = axiom_util_get_localname(node, env);
+ AXIS2_LOG_INFO(env->log, "[rampart][sec_echo_service] Recieved node %s",
name);
+/*
+ * This shows how to acces the security processed results from the message
context
+ {
+ axis2_char_t *username = NULL;
+
+ username = (axis2_char_t*)rampart_get_security_processed_result(env,
msg_ctx, "SPR_UT_username");
+ printf("Username of the Token is = %s ", username);
+ }
+*/
+ ret_node = build_om_programatically(env, name);
+ return ret_node;
+}
+
+/* Builds the response content */
+axiom_node_t *
+build_om_programatically(const axutil_env_t *env, axis2_char_t *text)
+{
+ axiom_node_t *echo_om_node = NULL;
+ axiom_element_t* echo_om_ele = NULL;
+ axiom_node_t* text_om_node = NULL;
+ axiom_element_t * text_om_ele = NULL;
+ axiom_namespace_t *ns1 = NULL;
+
+ ns1 = axiom_namespace_create(env,
"http://ws.apache.org/axis2/rampart/samples", "ns1");
+ echo_om_ele = axiom_element_create(env, NULL, "RecievedNode", ns1,
&echo_om_node);
+
+ text_om_ele = axiom_element_create(env, echo_om_node, "LocalName", NULL,
&text_om_node);
+
+ axiom_element_set_text(text_om_ele, env, text, text_om_node);
+
+ return echo_om_node;
+}
+
+axiom_node_t *
+secconv_echo_sts_request_security_token(
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx)
+{
+ trust_rst_t* rst = NULL;
+ trust_rstr_t* rstr = NULL;
+ axis2_status_t status;
+ axis2_char_t *token_type = NULL;
+ axis2_char_t *request_type = NULL;
+ axis2_char_t *global_id = NULL;
+ axis2_char_t *local_id = NULL;
+ oxs_buffer_t *shared_secret = NULL;
+ security_context_token_t *sct = NULL;
+ axiom_node_t* rstr_node = NULL;
+ int size = 32;
+ axutil_hash_t* db = NULL;
+
+ /*create and populate rst using node given*/
+ rst = trust_rst_create(env);
+ trust_rst_set_wst_ns_uri(rst, env, TRUST_WST_XMLNS_05_02);
+ status = trust_rst_populate_rst(rst, env, node);
+ if(status == AXIS2_FAILURE)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart][secconv_service]
cannot populate rst");
+ return NULL;
+ }
+
+ /*check whether rst is valid and can be processed*/
+ token_type = trust_rst_get_token_type(rst, env, node);
+ if((!token_type) || (0 != axutil_strcmp(token_type,
OXS_VALUE_TYPE_SECURITY_CONTEXT_TOKEN)))
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart][secconv_service]
token type is not valid");
+ return NULL;
+ }
+ request_type = trust_rst_get_request_type(rst, env, node);
+ if(!request_type) /*|| (0 != axutil_strcmp(request_type,
TRUST_REQ_TYPE_ISSUE)))*/
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart][secconv_service]
request type is not valid");
+ return NULL;
+ }
+
+ /*create global id, local id, and shared secret*/
+ global_id = oxs_util_generate_id(env,"urn:uuid:");
+ local_id = axutil_stracat(env, "#", oxs_util_generate_id(env, "sctId"));
+ shared_secret = oxs_buffer_create(env);
+ openssl_generate_random_data(env, shared_secret, size);
+
+ /*create security context token and populate it*/
+ sct = security_context_token_create(env);
+ security_context_token_set_secret(sct, env, shared_secret);
+ security_context_token_set_global_identifier(sct, env, global_id);
+ security_context_token_set_local_identifier(sct, env, local_id);
+
+ /*store SCT so that when server needs it, can be extracted*/
+ db = secconv_echo_get_sct_db(env, msg_ctx);
+ if(!db)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI, "[rampart][secconv_service]
Cannot get sct datastore");
+ security_context_token_free(sct, env);
+ return NULL;
+ }
+
+ axutil_hash_set(db, global_id, AXIS2_HASH_KEY_STRING, sct);
+
+ /*create rstr and populate*/
+ rstr = trust_rstr_create(env);
+ trust_rstr_set_token_type(rstr, env, token_type);
+ trust_rstr_set_request_type(rstr, env, request_type);
+ trust_rstr_set_wst_ns_uri(rstr, env, TRUST_WST_XMLNS_05_02);
+ trust_rstr_set_requested_proof_token(rstr, env,
+ security_context_token_get_requested_proof_token(sct,
env));
+ trust_rstr_set_requested_unattached_reference(rstr, env,
+ security_context_token_get_unattached_reference(sct, env));
+ trust_rstr_set_requested_attached_reference(rstr, env,
+ security_context_token_get_attached_reference(sct, env));
+ trust_rstr_set_requested_security_token(rstr, env,
+ security_context_token_get_token(sct, env));
+
+ /*build the rstr node*/
+ rstr_node = trust_rstr_build_rstr(rstr, env, NULL);
+
+ /*clear stuff*/
+ trust_rstr_free(rstr, env);
+
+ /*return the node*/
+ return rstr_node;
+}
+
+static axutil_hash_t *
+secconv_echo_get_sct_db(const axutil_env_t *env,
+ axis2_msg_ctx_t* msg_ctx)
+{
+ axis2_conf_ctx_t *conf_ctx = NULL;
+ axis2_ctx_t *ctx = NULL;
+ axutil_property_t *property = NULL;
+ axutil_hash_t *db = NULL;
+
+ /*Get the conf ctx*/
+ conf_ctx = axis2_msg_ctx_get_conf_ctx(msg_ctx, env);
+ if(!conf_ctx)
+ {
+ AXIS2_LOG_ERROR(env->log,AXIS2_LOG_SI, "[rampart][secconv_service]
Conf context is NULL ");
+ return NULL;
+ }
+ ctx = axis2_conf_ctx_get_base(conf_ctx,env);
+ if(!ctx)
+ {
+ AXIS2_LOG_ERROR(env->log, AXIS2_LOG_SI,"[rampart][secconv_service]
axis2 context is NULL ");
+ return NULL;
+ }
+
+ /*Get the DB property*/
+ property = axis2_ctx_get_property(ctx, env, RAMPART_SCT_PROVIDER_DB_PROB);
+ if(property)
+ {
+ /*Get the DB*/
+ db = (axutil_hash_t*)axutil_property_get_value(property, env);
+ }
+ else
+ {
+ axutil_property_t *db_prop = NULL;
+
+ db = axutil_hash_make(env);
+ db_prop = axutil_property_create(env);
+ axutil_property_set_value(db_prop, env, db);
+ axis2_ctx_set_property(ctx, env, RAMPART_SCT_PROVIDER_DB_PROB,
db_prop);
+ }
+
+ return db;
+}
\ No newline at end of file
Added: webservices/rampart/trunk/c/samples/server/secconv_echo/echo.h
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/secconv_echo/echo.h?rev=619817&view=auto
==============================================================================
--- webservices/rampart/trunk/c/samples/server/secconv_echo/echo.h (added)
+++ webservices/rampart/trunk/c/samples/server/secconv_echo/echo.h Fri Feb 8
01:59:24 2008
@@ -0,0 +1,41 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#ifndef SECCONV_ECHO_H
+#define SECCONV_ECHO_H
+
+
+#include <axis2_svc_skeleton.h>
+#include <axutil_log_default.h>
+#include <axutil_error_default.h>
+#include <axiom_text.h>
+#include <axiom_node.h>
+#include <axiom_element.h>
+
+axiom_node_t *
+axis2_echo_echo(
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx);
+
+axiom_node_t *
+secconv_echo_sts_request_security_token(
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx);
+
+
+#endif /* SECCONV_ECHO_H*/
Added: webservices/rampart/trunk/c/samples/server/secconv_echo/echo_skeleton.c
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/secconv_echo/echo_skeleton.c?rev=619817&view=auto
==============================================================================
--- webservices/rampart/trunk/c/samples/server/secconv_echo/echo_skeleton.c
(added)
+++ webservices/rampart/trunk/c/samples/server/secconv_echo/echo_skeleton.c Fri
Feb 8 01:59:24 2008
@@ -0,0 +1,202 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+#include <axis2_svc_skeleton.h>
+#include "echo.h"
+#include <axutil_array_list.h>
+#include <axis2_msg_ctx.h>
+#include <stdio.h>
+
+int AXIS2_CALL
+echo_free(axis2_svc_skeleton_t *svc_skeleton,
+ const axutil_env_t *env);
+
+/*
+ * This method invokes the right service method
+ */
+axiom_node_t* AXIS2_CALL
+echo_invoke(axis2_svc_skeleton_t *svc_skeleton,
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx);
+
+
+int AXIS2_CALL
+echo_init(axis2_svc_skeleton_t *svc_skeleton,
+ const axutil_env_t *env);
+
+axiom_node_t* AXIS2_CALL
+echo_on_fault(axis2_svc_skeleton_t *svc_skeli,
+ const axutil_env_t *env, axiom_node_t *node);
+
+static const axis2_svc_skeleton_ops_t echo_svc_skeleton_ops_var = {
+ echo_init,
+ echo_invoke,
+ echo_on_fault,
+ echo_free
+};
+
+
+/*Create function */
+axis2_svc_skeleton_t *
+axis2_echo_create(const axutil_env_t *env)
+{
+ axis2_svc_skeleton_t *svc_skeleton = NULL;
+ /* Allocate memory for the structs */
+ svc_skeleton = AXIS2_MALLOC(env->allocator,
+ sizeof(axis2_svc_skeleton_t));
+
+ svc_skeleton->ops = AXIS2_MALLOC(
+ env->allocator, sizeof(axis2_svc_skeleton_ops_t));
+
+ svc_skeleton->ops = &echo_svc_skeleton_ops_var;
+
+ svc_skeleton->func_array = NULL;
+ /* Assign function pointers */
+
+ return svc_skeleton;
+}
+
+/* Initialize the service */
+int AXIS2_CALL
+echo_init(axis2_svc_skeleton_t *svc_skeleton,
+ const axutil_env_t *env)
+{
+ svc_skeleton->func_array = axutil_array_list_create(env, 0);
+ /* Add the implemented operation names of the service to
+ * the array list of functions
+ */
+ axutil_array_list_add(svc_skeleton->func_array, env, "echoString");
+ /* Any initialization stuff of echo service should go here */
+ return AXIS2_SUCCESS;
+}
+
+/*
+ * This method invokes the right service method
+ */
+axiom_node_t* AXIS2_CALL
+echo_invoke(axis2_svc_skeleton_t *svc_skeleton,
+ const axutil_env_t *env,
+ axiom_node_t *node,
+ axis2_msg_ctx_t *msg_ctx)
+{
+ /* Invoke the business logic.
+ * Depending on the function name invoke the correct impl method.
+ */
+
+ if (node)
+ {
+ if (axiom_node_get_node_type(node, env) == AXIOM_ELEMENT)
+ {
+ axiom_element_t *element = NULL;
+ element =
+ (axiom_element_t *) axiom_node_get_data_element(node, env);
+ if (element)
+ {
+ axis2_char_t *op_name =
+ axiom_element_get_localname(element, env);
+ if (op_name)
+ {
+ if (axutil_strcmp(op_name, "RequestSecurityToken") == 0)
+ {
+ axiom_node_t* return_node = NULL;
+ return_node =
secconv_echo_sts_request_security_token(env, node, msg_ctx);
+ if(return_node)
+ return return_node;
+ else
+ echo_on_fault(svc_skeleton, env, node);
+ }
+ else
+ return axis2_echo_echo(env, node, msg_ctx);
+ }
+ }
+ }
+ }
+
+ printf("secure conversation service ERROR: invalid OM parameters in
request\n");
+ return echo_on_fault(svc_skeleton, env, node);
+
+}
+
+/* On fault, handle the fault */
+axiom_node_t* AXIS2_CALL
+echo_on_fault(axis2_svc_skeleton_t *svc_skeli,
+ const axutil_env_t *env, axiom_node_t *node)
+{
+ /* Here we are just setting a simple error message inside an element
+ * called 'EchoServiceError'
+ */
+ axiom_node_t *error_node = NULL;
+ axiom_node_t *text_node = NULL;
+ axiom_element_t *error_ele = NULL;
+
+ error_ele = axiom_element_create(env, NULL, "EchoServiceError", NULL,
&error_node);
+ axiom_element_set_text(error_ele, env, "Echo service failed ", text_node);
+ return error_node;
+}
+
+/* Free the resources used */
+int AXIS2_CALL
+echo_free(axis2_svc_skeleton_t *svc_skeleton,
+ const axutil_env_t *env)
+{
+ /* Free the function array */
+ if (svc_skeleton->func_array)
+ {
+ axutil_array_list_free(svc_skeleton->func_array, env);
+ svc_skeleton->func_array = NULL;
+ }
+
+
+ /* Free the service skeleton */
+ if (svc_skeleton)
+ {
+ AXIS2_FREE(env->allocator, svc_skeleton);
+ svc_skeleton = NULL;
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+
+/**
+ * Following block distinguish the exposed part of the dll.
+ */
+AXIS2_EXPORT int
+axis2_get_instance(axis2_svc_skeleton_t **inst,
+ const axutil_env_t *env)
+{
+ *inst = axis2_echo_create(env);
+ if (!(*inst))
+ {
+ return AXIS2_FAILURE;
+ }
+
+ return AXIS2_SUCCESS;
+}
+
+AXIS2_EXPORT int
+axis2_remove_instance(axis2_svc_skeleton_t *inst,
+ const axutil_env_t *env)
+{
+ axis2_status_t status = AXIS2_FAILURE;
+ if (inst)
+ {
+ status = AXIS2_SVC_SKELETON_FREE(inst, env);
+ }
+ return status;
+}
+
Added: webservices/rampart/trunk/c/samples/server/secconv_echo/server_axis2.xml
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/secconv_echo/server_axis2.xml?rev=619817&view=auto
==============================================================================
--- webservices/rampart/trunk/c/samples/server/secconv_echo/server_axis2.xml
(added)
+++ webservices/rampart/trunk/c/samples/server/secconv_echo/server_axis2.xml
Fri Feb 8 01:59:24 2008
@@ -0,0 +1,111 @@
+<axisconfig name="Axis2/C">
+ <!--THIS IS A SAMPLE AXIS2.XML (SERVER) TO TRY RAMPART-C SAMPLES-->
+ <!-- ================================================= -->
+ <!-- Parameters -->
+ <!-- ================================================= -->
+ <!-- Uncomment following to enable MTOM support -->
+ <!--parameter name="enableMTOM" locked="false">true</parameter-->
+ <parameter name="enableREST" locked="false">true</parameter>
+
+ <!-- Uncomment following to persist op_ctx, useful with RM -->
+ <!--parameter name="persistOperationContext"
locked="false">true</parameter-->
+
+ <!--if you want to extract the service archive file and work with that
please uncomment this-->
+ <!--else , it wont extract archive file or does not take into
consideration if someone drop-->
+ <!--exploded directory into /service directory-->
+ <!--<parameter name="extractServiceArchive"
locked="false">true</parameter>-->
+
+
+ <!-- ================================================= -->
+ <!-- Message Receivers -->
+ <!-- ================================================= -->
+ <!-- This is the Deafult Message Receiver for the Request Response style
Operations -->
+ <!--messageReceiver mep="INOUT" class="axis2_receivers"/-->
+
+ <!-- ================================================= -->
+ <!-- Transport Ins -->
+ <!-- ================================================= -->
+ <transportReceiver name="http" class="axis2_http_receiver">
+ <parameter name="port" locked="false">6060</parameter>
+ </transportReceiver>
+
+ <!-- ================================================= -->
+ <!-- Transport Outs -->
+ <!-- ================================================= -->
+
+ <transportSender name="http" class="axis2_http_sender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ <!--parameter name="Transfer-Encoding">chunked</parameter-->
+ <!--parameter name="PROXY" proxy_host="127.0.0.1" proxy_port="8080"
locked="true"/-->
+ </transportSender>
+ <!-- Uncomment this one with the appropriate papameters to enable the XMPP
transport Sender-->
+ <!--transportSender name="xmpp" class="axis2_xmpp_sender">
+ <parameter name="PROTOCOL" locked="false">XMPP</parameter>
+ </transportSender-->
+ <!-- Uncomment this one with the appropriate papameters to enable the TCP
transport Sender-->
+ <!--transportSender name="tcp" class="axis2_tcp_sender">
+ <parameter name="PROTOCOL" locked="false">TCP</parameter>
+ </transportSender-->
+
+ <!--
+ <transportSender name="https" class="axis2_http_sender">
+ <parameter name="PROTOCOL" locked="false">HTTP/1.1</parameter>
+ </transportSender>
+ <parameter name="SERVER_CERT">/path/to/ca/certificate</parameter>
+ <parameter
name="KEY_FILE">/path/to/client/certificate/chain/file</parameter>
+ <parameter name="SSL_PASSPHRASE">passphrase</parameter>
+ -->
+
+
+ <!-- ================================================= -->
+ <!-- Global Modules -->
+ <!-- ================================================= -->
+ <!-- Comment this to disable Addressing -->
+ <module ref="addressing"/>
+
+
+ <!--Configuring module , providing paramters for modules whether they
refer or not-->
+ <!--<moduleConfig name="addressing">-->
+ <!--<parameter name="addressingPara" locked="false">N/A</parameter>-->
+ <!--</moduleConfig>-->
+
+ <!-- ================================================= -->
+ <!-- Phases -->
+ <!-- ================================================= -->
+ <phaseOrder type="inflow">
+ <!-- System pre defined phases -->
+ <phase name="Transport"/>
+ <phase name="PreDispatch"/>
+ <phase name="Dispatch"/>
+ <phase name="PostDispatch"/>
+ <!-- End system pre defined phases -->
+ <!-- After PostDispatch phase, module or service author can add any
phase as required -->
+ <!-- User defined phases could be added here -->
+ <phase name="userphase1"/>
+ <phase name="RMPhase"/>
+ <phase name="SavanPhase"/>
+ </phaseOrder>
+ <phaseOrder type="outflow">
+ <!-- User defined phases could be added here -->
+ <phase name="RMPhase"/>
+ <phase name="SavanPhase"/>
+ <phase name="userphase1"/>
+ <!--system predefined phase-->
+ <phase name="MessageOut"/>
+ <phase name="Security"/>
+ </phaseOrder>
+ <phaseOrder type="INfaultflow">
+ <!-- User defined phases could be added here -->
+ <phase name="userphase1"/>
+ <phase name="RMPhase"/>
+ <phase name="SavanPhase"/>
+ </phaseOrder>
+ <phaseOrder type="Outfaultflow">
+ <!-- User defined phases could be added here -->
+ <phase name="RMPhase"/>
+ <phase name="SavanPhase"/>
+ <phase name="userphase1"/>
+ <phase name="MessageOut"/>
+ </phaseOrder>
+</axisconfig>
+
Added: webservices/rampart/trunk/c/samples/server/secconv_echo/services.xml
URL:
http://svn.apache.org/viewvc/webservices/rampart/trunk/c/samples/server/secconv_echo/services.xml?rev=619817&view=auto
==============================================================================
--- webservices/rampart/trunk/c/samples/server/secconv_echo/services.xml (added)
+++ webservices/rampart/trunk/c/samples/server/secconv_echo/services.xml Fri
Feb 8 01:59:24 2008
@@ -0,0 +1,58 @@
+<service name="secconv_echo">
+ <parameter name="ServiceClass" locked="xsd:false">secconv_echo</parameter>
+
+ <description>
+ This is a testing service , to test Rampart/C [Security]
functionalities.
+ </description>
+ <!--Rampart configurations START -->
+ <module ref="rampart"/>
+
+ <!--Rampart configurations END -->
+
+ <operation name="RequestSecurityToken">
+ <!--messageReceiver class="axis2_receivers" /-->
+ </operation>
+
+ <operation name="echoString">
+ <!--messageReceiver class="axis2_receivers" /-->
+ <parameter
name="wsamapping">http://example.com/ws/2004/09/policy/Test/EchoRequest</parameter>
+ </operation>
+
+ <wsp:Policy xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+ <wsp:ExactlyOne>
+ <wsp:All>
+ <sp:AsymmetricBinding
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+ <wsp:Policy>
+ <sp:InitiatorToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient">
+
<wsp:Policy>
+
<sp:WssX509V3Token10/>
+
</wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:InitiatorToken>
+ <sp:RecipientToken>
+ <wsp:Policy>
+ <sp:X509Token
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never">
+
<wsp:Policy>
+
<sp:WssX509V3Token10/>
+
</wsp:Policy>
+ </sp:X509Token>
+ </wsp:Policy>
+ </sp:RecipientToken>
+ <sp:Layout>
+ <wsp:Policy>
+ <sp:Strict/>
+ </wsp:Policy>
+ </sp:Layout>
+ <sp:IncludeTimestamp/>
+ </wsp:Policy>
+ </sp:AsymmetricBinding>
+ <rampc:RampartConfig
xmlns:rampc="http://ws.apache.org/rampart/c/policy">
+ <rampc:TimeToLive>360</rampc:TimeToLive>
+ </rampc:RampartConfig>
+ </wsp:All>
+ </wsp:ExactlyOne>
+ </wsp:Policy>
+</service>