You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by bi...@apache.org on 2020/04/15 16:08:43 UTC

[axis-axis2-java-rampart] branch 1_5_x created (now 91567ea)

This is an automated email from the ASF dual-hosted git repository.

billblough pushed a change to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git.


      at 91567ea  Switched the Rampart 1.5 branch to Axiom 1.2.13.

This branch includes the following new commits:

     new 3fb814d  [maven-release-plugin] prepare for next development iteration
     new 1142211  Partial merge of r1131278 to the 1.5 branch to avoid a minor issue when building the documentation module.
     new c3c59c8  Committing the patch provided by AmilaJ for RAMPART-336.
     new eacfeb5  RAMPART-336: Merged r1177413 to the 1.5 branch and updated the dependencies.
     new 2b0e5e8  RAMPART-278: Merged r1052172 and r1052173 to the 1.5 branch.
     new 51ed229  * RAMPART-324: Merged r1178193 to the 1.5 branch. * Also merged r1075676 (addition of a test case) to avoid a merge conflict.
     new da94a7d  Merged r1186491 to the 1.5 branch.
     new 1a599e8  Merged r1190533 and r1190600 to the 1.5 branch.
     new 87298a8  Merged r1194848 to the 1.5 branch.
     new 42e65c4  Merged r1194994 to the 1.5 branch.
     new a06889c  RAMPART-338: Merged r1221926 to the 1.5 branch.
     new 703a018  Merged r1221940 (with changes) to the 1.5 branch to get log4j working in the samples.
     new 51acc3c  Merged r1221937 to the 1.5 branch to make OpenSAML work in the samples.
     new cb786b0  Merged r1090540 and r1235059 to the 1.5 branch.
     new 9223665  Merged r1299342, r1299389 and r1299390 to the 1.5 branch.
     new 14e0182  Merged r1303198 to the 1.5 branch for debugging purposes.
     new bf35d2b  Compensate for change r1299894 in Axiom.
     new 91567ea  Switched the Rampart 1.5 branch to Axiom 1.2.13.

The 18 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[axis-axis2-java-rampart] 03/18: Committing the patch provided by AmilaJ for RAMPART-336.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit c3c59c88d62831488757e58930e8a5666c68b053
Author: Thilina Mahesh Buddhika <th...@apache.org>
AuthorDate: Thu Sep 29 11:12:10 2011 +0000

    Committing the patch provided by AmilaJ for RAMPART-336.
---
 .../src/main/java/org/apache/rampart/util/Axis2Util.java  | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index 2de1406..7874475 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -194,6 +194,10 @@ public class Axis2Util {
                         // it is a header we have added in rampart eg. EncryptedHeader and should
                         // be converted to SOAPHeaderBlock for processing
                     	} else {
+                            // First detach element from soap header
+                            element.detach();
+
+                            // add new element
                     		header = soapHeader.addHeaderBlock(element.getLocalName(), element.getNamespace());
                     		Iterator attrIter = element.getAllAttributes();
                     		while (attrIter.hasNext()) {
@@ -206,14 +210,17 @@ public class Axis2Util {
                     			header.declareNamespace(ns);
                     		}
                     		Iterator children = element.getChildElements();
-                    		while (children.hasNext()) {
+
+                            // Element is a composite element, in which it has many siblings.
+                            // All siblings will be added when we add a single node.
+                            // See ParentNode.insertBefore(Node newChild, Node refChild) for
+                            // more information.
+                    		if (children.hasNext()) {
                     			OMNode child = (OMNode)children.next();
                     			children.remove();
                     			header.addChild(child);
                     		}
-                    		
-                    		element.detach();
-                    		
+
                     		soapHeader.build();
                     		
                     		header.setProcessed();


[axis-axis2-java-rampart] 06/18: * RAMPART-324: Merged r1178193 to the 1.5 branch. * Also merged r1075676 (addition of a test case) to avoid a merge conflict.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 51ed229fbfee75971e9af6c939b3492fa918025a
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Wed Oct 19 19:13:50 2011 +0000

    * RAMPART-324: Merged r1178193 to the 1.5 branch.
    * Also merged r1075676 (addition of a test case) to avoid a merge conflict.
---
 modules/rampart-integration/pom.xml                |   8 ++
 .../test/java/org/apache/rampart/RampartTest.java  |   9 +-
 .../src/test/resources/rampart/policy/32.xml       |  90 +++++++++++++
 .../src/test/resources/rampart/policy/33.xml       | 103 +++++++++++++++
 .../src/test/resources/rampart/services-32.xml     | 128 +++++++++++++++++++
 .../src/test/resources/rampart/services-33.xml     | 140 +++++++++++++++++++++
 .../builders/EncryptedElementsBuilder.java         |   2 +-
 .../builders/RequiredElementsBuilder.java          |   2 +-
 .../builders/SignedElementsBuilder.java            |   2 +-
 .../builders/ContentEncryptedElementsBuilder.java  |   2 +-
 .../builders/EncryptedElementsBuilder.java         |   2 +-
 .../builders/RequiredElementsBuilder.java          |   2 +-
 .../builders/SignedElementsBuilder.java            |   2 +-
 13 files changed, 479 insertions(+), 13 deletions(-)

diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index 68b1e0d..dc3eeec 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -256,6 +256,14 @@
                                 <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService31.aar"
                                      basedir="target/temp-ramp"/>
 
+                                <!-- Service 32 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-32.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService32.aar" basedir="target/temp-ramp" />
+
+                                <!-- Service 33 -->
+                                <copy overwrite="yes" file="src/test/resources/rampart/services-33.xml" tofile="target/temp-ramp/META-INF/services.xml" />
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService33.aar" basedir="target/temp-ramp" />
+
                                 <!-- Service SC-1 -->
                                 <copy overwrite="yes" file="src/test/resources/rampart/issuer.properties" tofile="target/temp-ramp/issuer.properties" />
                                 <copy overwrite="yes" file="src/test/resources/rampart/services-sc-1.xml" tofile="target/temp-ramp/META-INF/services.xml" />
diff --git a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
index 34c8f2b..a06b31f 100644
--- a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
+++ b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
@@ -16,6 +16,7 @@
 
 package org.apache.rampart;
 
+import junit.framework.TestCase;
 import org.apache.axiom.om.OMAbstractFactory;
 import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
@@ -23,21 +24,17 @@ import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
 import org.apache.axiom.om.util.AXIOMUtil;
 import org.apache.axiom.soap.SOAPHeaderBlock;
-import org.apache.axis2.Constants;
 import org.apache.axis2.AxisFault;
+import org.apache.axis2.Constants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
 import org.apache.axis2.client.ServiceClient;
 import org.apache.axis2.context.ConfigurationContext;
 import org.apache.axis2.context.ConfigurationContextFactory;
 import org.apache.axis2.context.ServiceContext;
-import org.apache.axis2.context.MessageContext;
 import org.apache.axis2.integration.UtilServer;
 import org.apache.neethi.Policy;
 import org.apache.neethi.PolicyEngine;
-import org.apache.ws.security.handler.WSHandlerConstants;
-
-import junit.framework.TestCase;
 
 
 public class RampartTest extends TestCase {
@@ -79,7 +76,7 @@ public class RampartTest extends TestCase {
                         "Unlimited Strength Jurisdiction Policy !!!");
             }
             
-            for (int i = 1; i <= 31; i++) { //<-The number of tests we have
+            for (int i = 1; i <= 33; i++) { //<-The number of tests we have
                 if(!basic256Supported && (i == 3 || i == 4 || i == 5)) {
                     //Skip the Basic256 tests
                     continue;
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/32.xml b/modules/rampart-integration/src/test/resources/rampart/policy/32.xml
new file mode 100644
index 0000000..66e613a
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/32.xml
@@ -0,0 +1,90 @@
+<wsp:Policy wsu:Id="EncrSigHeader"
+            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+            xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+    <wsp:ExactlyOne>
+        <wsp:All>
+            <sp:AsymmetricBinding
+                    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+                <wsp:Policy>
+                    <sp:InitiatorToken>
+                        <wsp:Policy>
+                            <sp:X509Token
+                                    sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                <wsp:Policy>
+                                    <sp:WssX509V3Token10/>
+                                </wsp:Policy>
+                            </sp:X509Token>
+                        </wsp:Policy>
+                    </sp:InitiatorToken>
+                    <sp:RecipientToken>
+                        <wsp:Policy>
+                            <sp:X509Token
+                                    sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+                                <wsp:Policy>
+                                    <sp:WssX509V3Token10/>
+                                </wsp:Policy>
+                            </sp:X509Token>
+                        </wsp:Policy>
+                    </sp:RecipientToken>
+                    <sp:AlgorithmSuite>
+                        <wsp:Policy>
+                            <sp:Basic128/>
+                        </wsp:Policy>
+                    </sp:AlgorithmSuite>
+                    <sp:Layout>
+                        <wsp:Policy>
+                            <sp:Strict/>
+                        </wsp:Policy>
+                    </sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:EncryptBeforeSigning/>
+                    <sp:OnlySignEntireHeadersAndBody/>
+                </wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss10 xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+                <wsp:Policy>
+                    <sp:MustSupportRefKeyIdentifier/>
+                    <sp:MustSupportRefIssuerSerial/>
+                </wsp:Policy>
+            </sp:Wss10>
+            <sp:ContentEncryptedElements
+                    xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+                    xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                    xmlns:example1="http://example1.org/example1">
+                <sp:XPath>soapenv:Body/example1:echo/example1:Text</sp:XPath>
+            </sp:ContentEncryptedElements>
+            <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+                <ramp:user>alice</ramp:user>
+                <ramp:encryptionUser>bob</ramp:encryptionUser>
+                <ramp:passwordCallbackClass>org.apache.rampart.PWCallback
+                </ramp:passwordCallbackClass>
+                <ramp:signatureCrypto>
+                    <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                        <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                        </ramp:property>
+                        <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                            rampart/store.jks
+                        </ramp:property>
+                        <ramp:property
+                                name="org.apache.ws.security.crypto.merlin.keystore.password">
+                            password
+                        </ramp:property>
+                    </ramp:crypto>
+                </ramp:signatureCrypto>
+                <ramp:encryptionCypto>
+                    <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                        <ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                        </ramp:property>
+                        <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                            rampart/store.jks
+                        </ramp:property>
+                        <ramp:property
+                                name="org.apache.ws.security.crypto.merlin.keystore.password">
+                            password
+                        </ramp:property>
+                    </ramp:crypto>
+                </ramp:encryptionCypto>
+            </ramp:RampartConfig>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/33.xml b/modules/rampart-integration/src/test/resources/rampart/policy/33.xml
new file mode 100644
index 0000000..f5c7da8
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/33.xml
@@ -0,0 +1,103 @@
+<wsp:Policy wsu:Id="SignEncryptXPath"
+            xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+            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/Never">
+                                <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:AlgorithmSuite>
+                        <wsp:Policy>
+                            <sp:TripleDesRsa15/>
+                        </wsp:Policy>
+                    </sp:AlgorithmSuite>
+                    <sp:Layout>
+                        <wsp:Policy>
+
+                            <sp:Strict/>
+                        </wsp:Policy>
+                    </sp:Layout>
+                    <sp:IncludeTimestamp/>
+                    <sp:OnlySignEntireHeadersAndBody/>
+                </wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <wsp:Policy>
+
+                    <sp:MustSupportRefKeyIdentifier/>
+                    <sp:MustSupportRefIssuerSerial/>
+                </wsp:Policy>
+            </sp:Wss10>
+
+            <sp:EncryptedElements xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                  xmlns:ser="http://example1.org/example1"
+                                  xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:XPath>/soapenv:Envelope/soapenv:Body/ser:example1</sp:XPath>
+            </sp:EncryptedElements>
+            <sp:SignedElements xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                               xmlns:test="http://example1.org/example1"
+                               xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                <sp:XPath>/soapenv:Envelope/soapenv:Body/test:example1</sp:XPath>
+            </sp:SignedElements>
+
+           <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+                    <ramp:user>alice</ramp:user>
+                    <ramp:encryptionUser>bob</ramp:encryptionUser>
+                    <ramp:passwordCallbackClass>org.apache.rampart.PWCallback
+                    </ramp:passwordCallbackClass>
+
+                    <ramp:signatureCrypto>
+                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                            </ramp:property>
+                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                                rampart/store.jks
+                            </ramp:property>
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.password">
+                                password
+                            </ramp:property>
+                        </ramp:crypto>
+                    </ramp:signatureCrypto>
+                    <ramp:encryptionCypto>
+                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                            </ramp:property>
+                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                                rampart/store.jks
+                            </ramp:property>
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.password">
+                                password
+                            </ramp:property>
+                        </ramp:crypto>
+                    </ramp:encryptionCypto>
+                </ramp:RampartConfig>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-32.xml b/modules/rampart-integration/src/test/resources/rampart/services-32.xml
new file mode 100644
index 0000000..9d724ff
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-32.xml
@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed 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.
+ !-->
+<service name="SecureService32">
+
+    <module ref="addressing"/>
+    <module ref="rampart"/>
+
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+    <operation name="echo">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:echo</actionMapping>
+    </operation>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</actionMapping>
+    </operation>
+
+    <wsp:Policy wsu:Id="EncrSigHeader"
+                xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:AsymmetricBinding
+                        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+                    <wsp:Policy>
+                        <sp:InitiatorToken>
+                            <wsp:Policy>
+                                <sp:X509Token
+                                        sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <wsp:Policy>
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:InitiatorToken>
+                        <sp:RecipientToken>
+                            <wsp:Policy>
+                                <sp:X509Token
+                                        sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+                                    <wsp:Policy>
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:RecipientToken>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Strict/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:EncryptBeforeSigning/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                    </wsp:Policy>
+                </sp:AsymmetricBinding>
+                <sp:Wss10 xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+                    <wsp:Policy>
+                        <sp:MustSupportRefKeyIdentifier/>
+                        <sp:MustSupportRefIssuerSerial/>
+                    </wsp:Policy>
+                </sp:Wss10>
+                <sp:ContentEncryptedElements
+                        xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702"
+                        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                        xmlns:example1="http://example1.org/example1">
+                    <sp:XPath>soapenv:Body/example1:echo/example1:Text</sp:XPath>
+                </sp:ContentEncryptedElements>
+                <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+                    <ramp:user>alice</ramp:user>
+                    <ramp:encryptionUser>bob</ramp:encryptionUser>
+                    <ramp:passwordCallbackClass>org.apache.rampart.PWCallback
+                    </ramp:passwordCallbackClass>
+
+                    <ramp:signatureCrypto>
+                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                            </ramp:property>
+                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                                rampart/store.jks
+                            </ramp:property>
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.password">
+                                password
+                            </ramp:property>
+                        </ramp:crypto>
+                    </ramp:signatureCrypto>
+                    <ramp:encryptionCypto>
+                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                            </ramp:property>
+                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                                rampart/store.jks
+                            </ramp:property>
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.password">
+                                password
+                            </ramp:property>
+                        </ramp:crypto>
+                    </ramp:encryptionCypto>
+                </ramp:RampartConfig>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+</service>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-33.xml b/modules/rampart-integration/src/test/resources/rampart/services-33.xml
new file mode 100644
index 0000000..fecafe4
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-33.xml
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed 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.
+ !-->
+<service name="SecureService33">
+
+    <module ref="addressing"/>
+    <module ref="rampart"/>
+
+    <parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+    <operation name="echo">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:echo</actionMapping>
+    </operation>
+
+    <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</actionMapping>
+    </operation>
+
+    <wsp:Policy wsu:Id="EncryptOnly"
+                xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+                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/Never">
+                                    <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:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:TripleDesRsa15/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                        <sp:Layout>
+                            <wsp:Policy>
+
+                                <sp:Strict/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                    </wsp:Policy>
+                </sp:AsymmetricBinding>
+                <sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <wsp:Policy>
+
+                        <sp:MustSupportRefKeyIdentifier/>
+                        <sp:MustSupportRefIssuerSerial/>
+                    </wsp:Policy>
+                </sp:Wss10>
+
+                <sp:EncryptedElements xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                      xmlns:ser="http://example1.org/example1"
+                                      xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:XPath>/soapenv:Envelope/soapenv:Body/ser:example1</sp:XPath>
+                </sp:EncryptedElements>
+                <sp:SignedElements xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
+                                   xmlns:test="http://example1.org/example1"
+                                   xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+                    <sp:XPath>/soapenv:Envelope/soapenv:Body/test:example1</sp:XPath>
+                </sp:SignedElements>
+
+               <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+                    <ramp:user>alice</ramp:user>
+                    <ramp:encryptionUser>bob</ramp:encryptionUser>
+                    <ramp:passwordCallbackClass>org.apache.rampart.PWCallback
+                    </ramp:passwordCallbackClass>
+
+                    <ramp:signatureCrypto>
+                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                            </ramp:property>
+                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                                rampart/store.jks
+                            </ramp:property>
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.password">
+                                password
+                            </ramp:property>
+                        </ramp:crypto>
+                    </ramp:signatureCrypto>
+                    <ramp:encryptionCypto>
+                        <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.type">JKS
+                            </ramp:property>
+                            <ramp:property name="org.apache.ws.security.crypto.merlin.file">
+                                rampart/store.jks
+                            </ramp:property>
+                            <ramp:property
+                                    name="org.apache.ws.security.crypto.merlin.keystore.password">
+                                password
+                            </ramp:property>
+                        </ramp:crypto>
+                    </ramp:encryptionCypto>
+                </ramp:RampartConfig>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+
+
+</service>
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/EncryptedElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/EncryptedElementsBuilder.java
index 1301a79..c40ac8e 100644
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/EncryptedElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/EncryptedElementsBuilder.java
@@ -64,7 +64,7 @@ public class EncryptedElementsBuilder implements AssertionBuilder {
     private void processElement(OMElement element, SignedEncryptedElements parent) {
         if (SP11Constants.XPATH.equals(element.getQName())) {
             parent.addXPathExpression(element.getText());   
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/RequiredElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/RequiredElementsBuilder.java
index 8ff78f9..b6d783a 100644
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/RequiredElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/RequiredElementsBuilder.java
@@ -56,7 +56,7 @@ public class RequiredElementsBuilder implements AssertionBuilder {
         QName name = element.getQName();
         if (SP11Constants.XPATH.equals(name)) {
             parent.addXPathExpression(element.getText());
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/SignedElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/SignedElementsBuilder.java
index 185c8d1..11a54a9 100644
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/SignedElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy11/builders/SignedElementsBuilder.java
@@ -62,7 +62,7 @@ public class SignedElementsBuilder implements AssertionBuilder {
         QName name = element.getQName();
         if (SP11Constants.XPATH.equals(name)) {
             parent.addXPathExpression(element.getText());
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/ContentEncryptedElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/ContentEncryptedElementsBuilder.java
index 77e5c14..fa94274 100644
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/ContentEncryptedElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/ContentEncryptedElementsBuilder.java
@@ -56,7 +56,7 @@ public class ContentEncryptedElementsBuilder implements AssertionBuilder {
         QName name = element.getQName();
         if (SP12Constants.XPATH.equals(name)) {
             parent.addXPathExpression(element.getText());
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/EncryptedElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/EncryptedElementsBuilder.java
index 3c9c8e7..e927f44 100755
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/EncryptedElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/EncryptedElementsBuilder.java
@@ -65,7 +65,7 @@ public class EncryptedElementsBuilder implements AssertionBuilder {
     private void processElement(OMElement element, SignedEncryptedElements parent) {
         if (SP12Constants.XPATH.equals(element.getQName())) {
             parent.addXPathExpression(element.getText());   
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/RequiredElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/RequiredElementsBuilder.java
index 5c1dc6f..ece4b04 100644
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/RequiredElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/RequiredElementsBuilder.java
@@ -57,7 +57,7 @@ public class RequiredElementsBuilder implements AssertionBuilder {
         QName name = element.getQName();
         if (SP12Constants.XPATH.equals(name)) {
             parent.addXPathExpression(element.getText());
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());
diff --git a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/SignedElementsBuilder.java b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/SignedElementsBuilder.java
index f08d6b0..a34be11 100755
--- a/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/SignedElementsBuilder.java
+++ b/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy12/builders/SignedElementsBuilder.java
@@ -63,7 +63,7 @@ public class SignedElementsBuilder implements AssertionBuilder {
         QName name = element.getQName();
         if (SP12Constants.XPATH.equals(name)) {
             parent.addXPathExpression(element.getText());
-            Iterator namespaces = element.getAllDeclaredNamespaces();
+            Iterator namespaces = element.getNamespacesInScope();
             while (namespaces.hasNext()) {
                 OMNamespace nm = (OMNamespace) namespaces.next();
                 parent.addDeclaredNamespaces(nm.getNamespaceURI(), nm.getPrefix());


[axis-axis2-java-rampart] 05/18: RAMPART-278: Merged r1052172 and r1052173 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 2b0e5e8f30bcfd051294efec65f227376de806b2
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Tue Oct 18 22:04:37 2011 +0000

    RAMPART-278: Merged r1052172 and r1052173 to the 1.5 branch.
---
 .../rampart/PolicyBasedResultsValidator.java       |  46 ++++++---
 .../java/org/apache/rampart/util/Axis2Util.java    |   4 +-
 modules/rampart-integration/pom.xml                |   6 ++
 .../test/java/org/apache/rampart/RampartTest.java  |  15 ++-
 .../src/test/resources/rampart/policy/31.xml       |  75 ++++++++++++++
 .../src/test/resources/rampart/services-31.xml     | 111 +++++++++++++++++++++
 6 files changed, 241 insertions(+), 16 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java b/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java
index 4cc430b..24db745 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java
@@ -31,6 +31,7 @@ import org.apache.ws.security.message.token.Timestamp;
 import org.apache.ws.security.util.WSSecurityUtil;
 import org.w3c.dom.Element;
 import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
 import org.jaxen.XPath;
 import org.jaxen.JaxenException;
 
@@ -555,16 +556,34 @@ public class PolicyBasedResultsValidator implements PolicyValidatorCallbackHandl
         Vector actuallySigned = new Vector();
         if (actionResults != null) {
             for (int j = 0; j < actionResults.length; j++) {
+                
                 WSSecurityEngineResult actionResult = actionResults[j];
-                Set signedIDs = (Set) actionResult
-                        .get(WSSecurityEngineResult.TAG_SIGNED_ELEMENT_IDS);
-                for (Iterator i = signedIDs.iterator(); i.hasNext();) {
-                    String e = (String) i.next();
-
-                    Element element = WSSecurityUtil.findElementById(envelope, e,
-                            WSConstants.WSU_NS);
-                    actuallySigned.add(element);
+                List wsDataRefs = (List)actionResult.get(WSSecurityEngineResult.TAG_DATA_REF_URIS);
+                
+                // if header was encrypted before it was signed, protected
+                // element is 'EncryptedHeader.' the actual element is
+                // first child element
+
+                for (Iterator k = wsDataRefs.iterator(); k.hasNext();) {
+                    WSDataRef wsDataRef = (WSDataRef)k.next();
+                    Element protectedElement = wsDataRef.getProtectedElement();
+                    if (protectedElement.getLocalName().equals("EncryptedHeader")) {
+                        NodeList nodeList = protectedElement.getChildNodes();
+                        for (int x = 0; x < nodeList.getLength(); x++) {
+                            if (nodeList.item(x).getNodeType() == Node.ELEMENT_NODE) {
+                                String ns = ((Element)nodeList.item(x)).getNamespaceURI();
+                                String ln = ((Element)nodeList.item(x)).getLocalName();
+                                actuallySigned.add(new QName(ns,ln));
+                                break;
+                            }
+                        } 
+                    } else {
+                        String ns = protectedElement.getNamespaceURI();
+                        String ln = protectedElement.getLocalName();
+                        actuallySigned.add(new QName(ns,ln));
+                    }
                 }
+                
             }
         }
         
@@ -573,15 +592,15 @@ public class PolicyBasedResultsValidator implements PolicyValidatorCallbackHandl
             
             if (wsep.getType() == WSConstants.PART_TYPE_BODY) {
                 
-                Element body;
+                QName bodyQName;
                 
                 if (WSConstants.URI_SOAP11_ENV.equals(envelope.getNamespaceURI())) {
-                    body = WSSecurityUtil.findBodyElement(rmd.getDocument(), new SOAP11Constants());
+                    bodyQName = new SOAP11Constants().getBodyQName();
                 } else {
-                    body = WSSecurityUtil.findBodyElement(rmd.getDocument(), new SOAP12Constants());
+                    bodyQName = new SOAP12Constants().getBodyQName();
                 }
                 
-                if (!actuallySigned.contains(body) && !rmd.getPolicyData().isSignBodyOptional()) {
+                if (!actuallySigned.contains(bodyQName) && !rmd.getPolicyData().isSignBodyOptional()) {
                     // soap body is not signed
                     throw new RampartException("bodyNotSigned");
                 }
@@ -591,6 +610,7 @@ public class PolicyBasedResultsValidator implements PolicyValidatorCallbackHandl
                
                 Element element = (Element) WSSecurityUtil.findElement(
                         envelope, wsep.getName(), wsep.getNamespace() );
+                
                 if( element == null ) {
                     // The signedpart header or element we are checking is not present in 
                     // soap envelope - this is allowed
@@ -598,7 +618,7 @@ public class PolicyBasedResultsValidator implements PolicyValidatorCallbackHandl
                 }
                 
                 // header or the element present in soap envelope - verify that it is part of signature
-                if( actuallySigned.contains( element) ) {
+                if( actuallySigned.contains( new QName(element.getNamespaceURI(), element.getLocalName())) ) {
                     continue;
                 }
                 
diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index 2de1406..b974cdb 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -205,7 +205,9 @@ public class Axis2Util {
                     			OMNamespace ns =  (OMNamespace) nsIter.next();
                     			header.declareNamespace(ns);
                     		}
-                    		Iterator children = element.getChildElements();
+                    		// retrieve all child nodes (including any text nodes)
+                    		// and re-attach to header block
+                    		Iterator children = element.getChildren();
                     		while (children.hasNext()) {
                     			OMNode child = (OMNode)children.next();
                     			children.remove();
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index b465196..68b1e0d 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -249,6 +249,12 @@
                                 <copy overwrite="yes" file="src/test/resources/rampart/services-30.xml" tofile="target/temp-ramp/META-INF/services.xml" />
                                 <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService30.aar" basedir="target/temp-ramp" />
 
+                                <!-- Service 31 -->
+                                <copy overwrite="yes"
+                                      file="src/test/resources/rampart/services-31.xml"
+                                      tofile="target/temp-ramp/META-INF/services.xml"/>
+                                <jar jarfile="target/test-resources/rampart_service_repo/services/SecureService31.aar"
+                                     basedir="target/temp-ramp"/>
 
                                 <!-- Service SC-1 -->
                                 <copy overwrite="yes" file="src/test/resources/rampart/issuer.properties" tofile="target/temp-ramp/issuer.properties" />
diff --git a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
index 8b0b84f..34c8f2b 100644
--- a/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
+++ b/modules/rampart-integration/src/test/java/org/apache/rampart/RampartTest.java
@@ -21,6 +21,8 @@ import org.apache.axiom.om.OMElement;
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.util.AXIOMUtil;
+import org.apache.axiom.soap.SOAPHeaderBlock;
 import org.apache.axis2.Constants;
 import org.apache.axis2.AxisFault;
 import org.apache.axis2.addressing.EndpointReference;
@@ -77,7 +79,7 @@ public class RampartTest extends TestCase {
                         "Unlimited Strength Jurisdiction Policy !!!");
             }
             
-            for (int i = 1; i <= 30; i++) { //<-The number of tests we have
+            for (int i = 1; i <= 31; i++) { //<-The number of tests we have
                 if(!basic256Supported && (i == 3 || i == 4 || i == 5)) {
                     //Skip the Basic256 tests
                     continue;
@@ -106,7 +108,16 @@ public class RampartTest extends TestCase {
                 context.setProperty(RampartMessageData.KEY_RAMPART_POLICY, 
                         loadPolicy("/rampart/policy/" + i + ".xml"));
                 serviceClient.setOptions(options);
-
+                
+                if (i == 31) {
+                    OMNamespace omNamespace = OMAbstractFactory.getOMFactory().createOMNamespace(
+                            "http://sample.com", "myNs");
+                    SOAPHeaderBlock header = OMAbstractFactory.getSOAP12Factory()
+                            .createSOAPHeaderBlock("VitalHeader", omNamespace);
+                    header.addChild(AXIOMUtil.stringToOM("<foo>This is a sample Header</foo>"));
+                    serviceClient.addHeader(header);
+                }
+                
                 // Invoking the serive in the TestCase-28 should fail. So handling it differently..
                 if (i == 28) {
                     try {
diff --git a/modules/rampart-integration/src/test/resources/rampart/policy/31.xml b/modules/rampart-integration/src/test/resources/rampart/policy/31.xml
new file mode 100644
index 0000000..8559f1f
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/policy/31.xml
@@ -0,0 +1,75 @@
+<wsp:Policy wsu:Id="EncrSig" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 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:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic128/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+					<sp:IncludeTimestamp/>
+					<sp:EncryptBeforeSigning />
+					<sp:OnlySignEntireHeadersAndBody/>
+				</wsp:Policy>
+			</sp:AsymmetricBinding>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+					<sp:MustSupportRefKeyIdentifier/>
+					<sp:MustSupportRefIssuerSerial/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+				<sp:Header Name="VitalHeader" Namespace="http://sample.com"/>
+			</sp:SignedParts>
+			<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+				<sp:Header Name="VitalHeader" Namespace="http://sample.com"/>
+			</sp:EncryptedParts>
+			<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> 
+				<ramp:user>alice</ramp:user>
+				<ramp:encryptionUser>bob</ramp:encryptionUser>
+				<ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+				
+				<ramp:signatureCrypto>
+					<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+					</ramp:crypto>
+				</ramp:signatureCrypto>
+				<ramp:encryptionCypto>
+					<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+					</ramp:crypto>
+				</ramp:encryptionCypto>
+			</ramp:RampartConfig>
+		</wsp:All>
+	</wsp:ExactlyOne>
+</wsp:Policy>
diff --git a/modules/rampart-integration/src/test/resources/rampart/services-31.xml b/modules/rampart-integration/src/test/resources/rampart/services-31.xml
new file mode 100644
index 0000000..53bc982
--- /dev/null
+++ b/modules/rampart-integration/src/test/resources/rampart/services-31.xml
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ !
+ ! Copyright 2006 The Apache Software Foundation.
+ !
+ ! Licensed 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.
+ !-->
+<service name="SecureService31">
+
+	<module ref="addressing"/>
+	<module ref="rampart"/>
+
+	<parameter locked="false" name="ServiceClass">org.apache.rampart.Service</parameter>
+
+	<operation name="echo">
+		<messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+		<actionMapping>urn:echo</actionMapping>
+	</operation>
+	
+	 <operation name="returnError">
+        <messageReceiver class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+        <actionMapping>urn:returnError</actionMapping>
+    </operation>
+
+    <wsp:Policy wsu:Id="EncrSig" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" 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:AlgorithmSuite>
+						<wsp:Policy>
+							<sp:Basic128/>
+						</wsp:Policy>
+					</sp:AlgorithmSuite>
+					<sp:Layout>
+						<wsp:Policy>
+							<sp:Strict/>
+						</wsp:Policy>
+					</sp:Layout>
+					<sp:IncludeTimestamp/>
+					<sp:EncryptBeforeSigning />
+					<sp:OnlySignEntireHeadersAndBody/>
+				</wsp:Policy>
+			</sp:AsymmetricBinding>
+			<sp:Wss10 xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<wsp:Policy>
+					<sp:MustSupportRefKeyIdentifier/>
+					<sp:MustSupportRefIssuerSerial/>
+				</wsp:Policy>
+			</sp:Wss10>
+			<sp:SignedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+				<sp:Header Name="VitalHeader" Namespace="http://sample.com"/>
+			</sp:SignedParts>
+			<sp:EncryptedParts xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy">
+				<sp:Body/>
+				<sp:Header Name="VitalHeader" Namespace="http://sample.com"/>
+			</sp:EncryptedParts>
+				
+			<ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> 
+				<ramp:user>alice</ramp:user>
+				<ramp:encryptionUser>bob</ramp:encryptionUser>
+				<ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+				
+				<ramp:signatureCrypto>
+					<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+					</ramp:crypto>
+				</ramp:signatureCrypto>
+				<ramp:encryptionCypto>
+					<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+						<ramp:property name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+					</ramp:crypto>
+				</ramp:encryptionCypto>
+			</ramp:RampartConfig>	
+			</wsp:All>
+		</wsp:ExactlyOne>
+	</wsp:Policy>
+</service>


[axis-axis2-java-rampart] 07/18: Merged r1186491 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit da94a7de268bb9cda46315ce55db7f0c614a6d42
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Wed Oct 19 21:14:49 2011 +0000

    Merged r1186491 to the 1.5 branch.
---
 modules/distribution/bin.xml |  1 +
 modules/distribution/pom.xml | 21 +++++++++++++++++++++
 modules/distribution/src.xml |  9 +++++++++
 release-docs/README.txt      |  6 +++---
 4 files changed, 34 insertions(+), 3 deletions(-)

diff --git a/modules/distribution/bin.xml b/modules/distribution/bin.xml
index 2a075a7..bc32fdf 100644
--- a/modules/distribution/bin.xml
+++ b/modules/distribution/bin.xml
@@ -59,6 +59,7 @@
             <source>../../release-docs/README.txt</source>
             <outputDirectory>${dist.dir}</outputDirectory>
             <destName>README</destName>
+            <filtered>true</filtered>
         </file>
         <file>
             <source>../../release-docs/LICENSE.txt</source>
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 0da00fd..3f5b5bc 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -69,6 +69,27 @@
                 </executions>
             </plugin>
             <plugin>
+                <groupId>org.codehaus.gmaven</groupId>
+                <artifactId>gmaven-plugin</artifactId>
+                <version>1.2</version>
+                <executions>
+                    <execution>
+                        <id>generate-timestamp</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>execute</goal>
+                        </goals>
+                        <configuration>
+                            <source>
+                                import java.util.Date 
+                                import java.text.MessageFormat 
+                                project.properties['buildTimestamp'] = MessageFormat.format("{0,date,MMM dd, yyyy}", new Date())
+                            </source>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-assembly-plugin</artifactId>
                 <executions>
diff --git a/modules/distribution/src.xml b/modules/distribution/src.xml
index b4802d7..9c3575c 100644
--- a/modules/distribution/src.xml
+++ b/modules/distribution/src.xml
@@ -28,7 +28,16 @@
                 <exclude>**/.settings</exclude>
                 <exclude>**/.settings/**/*</exclude>
                 <exclude>**/.svn/**</exclude>
+                <exclude>release-docs/README.txt</exclude>
             </excludes>
         </fileSet>
+        <fileSet>
+            <directory>../..</directory>
+            <outputDirectory>rampart-src-${project.version}</outputDirectory>
+            <filtered>true</filtered>
+            <includes>
+                <include>release-docs/README.txt</include>
+            </includes>
+        </fileSet>
     </fileSets>
 </assembly>
diff --git a/release-docs/README.txt b/release-docs/README.txt
index 27acc24..b79bbb9 100644
--- a/release-docs/README.txt
+++ b/release-docs/README.txt
@@ -1,5 +1,5 @@
 ======================================================
-Apache Rampart-1.5.1 build  (Jan 04, 2011)
+Apache Rampart-${project.version} build  (${buildTimestamp})
 
 http://axis.apache.org/axis2/java/rampart
 ------------------------------------------------------
@@ -13,8 +13,8 @@ lib      - This directory contains all the libraries required by rampart
            release.
 	   
 
-rampart-1.5.1.mar   - WS-Security and WS-SecureConversation support for Axis2
-rahas-1.5.1.mar     - STS module - to be used to add STS operations to a service
+rampart-${project.version}.mar   - WS-Security and WS-SecureConversation support for Axis2
+rahas-${project.version}.mar     - STS module - to be used to add STS operations to a service
 
 samples  - This contains samples on using Apache Rampart and configuring
            different components to carryout different WS-Sec* operations.


[axis-axis2-java-rampart] 01/18: [maven-release-plugin] prepare for next development iteration

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 3fb814d71ed148d26fcbcbad4b4f24711b66cc81
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Sep 25 09:22:21 2011 +0000

    [maven-release-plugin] prepare for next development iteration
---
 modules/distribution/pom.xml        | 2 +-
 modules/documentation/pom.xml       | 2 +-
 modules/rampart-core/pom.xml        | 2 +-
 modules/rampart-integration/pom.xml | 2 +-
 modules/rampart-mar/pom.xml         | 8 ++++----
 modules/rampart-policy/pom.xml      | 2 +-
 modules/rampart-tests/pom.xml       | 2 +-
 modules/rampart-trust-mar/pom.xml   | 8 ++++----
 modules/rampart-trust/pom.xml       | 2 +-
 pom.xml                             | 8 ++++----
 10 files changed, 19 insertions(+), 19 deletions(-)

diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 67f907c..0da00fd 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/modules/documentation/pom.xml b/modules/documentation/pom.xml
index ac73a7d..2af12bc 100644
--- a/modules/documentation/pom.xml
+++ b/modules/documentation/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     <modelVersion>4.0.0</modelVersion>
diff --git a/modules/rampart-core/pom.xml b/modules/rampart-core/pom.xml
index 3f8e6e8..3f4b99c 100644
--- a/modules/rampart-core/pom.xml
+++ b/modules/rampart-core/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index 4ba6883..b465196 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/rampart-mar/pom.xml b/modules/rampart-mar/pom.xml
index e758e44..9cb5579 100644
--- a/modules/rampart-mar/pom.xml
+++ b/modules/rampart-mar/pom.xml
@@ -24,7 +24,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
@@ -35,11 +35,11 @@
     <name>Rampart - Mar</name>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/tags/v1.5.2</connection>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/branches/1_5_x</connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/tags/v1.5.2
+            scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/branches/1_5_x
         </developerConnection>
-        <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/tags/v1.5.2</url>
+        <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_5_x</url>
     </scm>
 
     <build>
diff --git a/modules/rampart-policy/pom.xml b/modules/rampart-policy/pom.xml
index 407bbed..ee766b4 100644
--- a/modules/rampart-policy/pom.xml
+++ b/modules/rampart-policy/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/rampart-tests/pom.xml b/modules/rampart-tests/pom.xml
index bc49c58..22c3d48 100644
--- a/modules/rampart-tests/pom.xml
+++ b/modules/rampart-tests/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/modules/rampart-trust-mar/pom.xml b/modules/rampart-trust-mar/pom.xml
index 63b21bd..12a4f94 100644
--- a/modules/rampart-trust-mar/pom.xml
+++ b/modules/rampart-trust-mar/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
     
@@ -36,10 +36,10 @@
     <name>Rampart - Trust-Mar</name>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/tags/v1.5.2</connection>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/branches/1_5_x</connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/tags/v1.5.2</developerConnection>
-        <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/tags/v1.5.2</url>
+            scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/branches/1_5_x</developerConnection>
+        <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_5_x</url>
     </scm>
 
     <build>
diff --git a/modules/rampart-trust/pom.xml b/modules/rampart-trust/pom.xml
index 2431ece..c97964b 100644
--- a/modules/rampart-trust/pom.xml
+++ b/modules/rampart-trust/pom.xml
@@ -25,7 +25,7 @@
     <parent>
         <groupId>org.apache.rampart</groupId>
         <artifactId>rampart-project</artifactId>
-        <version>1.5.2</version>
+        <version>1.5.3-SNAPSHOT</version>
         <relativePath>../../pom.xml</relativePath>
     </parent>
 
diff --git a/pom.xml b/pom.xml
index fdb5e39..169142c 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
     <artifactId>rampart-project</artifactId>
     <packaging>pom</packaging>
     <description> WS-Security, WS-Trust and WS-SecureConversation implementaion for Apache Axis2 </description>
-    <version>1.5.2</version>
+    <version>1.5.3-SNAPSHOT</version>
     <name>Apache Rampart</name>
     <url>http://ws.apache.org/rampart</url>
 
@@ -103,12 +103,12 @@
 
     <scm>
         <connection>
-            scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/tags/v1.5.2
+            scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/branches/1_5_x
         </connection>
         <developerConnection>
-            scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/tags/v1.5.2
+            scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/branches/1_5_x
         </developerConnection>
-        <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/tags/v1.5.2</url>
+        <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/1_5_x</url>
     </scm>
 
 


[axis-axis2-java-rampart] 18/18: Switched the Rampart 1.5 branch to Axiom 1.2.13.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 91567ea045bbb61f2f51e1e076d1b11d16cba5de
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Mon Apr 9 14:22:20 2012 +0000

    Switched the Rampart 1.5 branch to Axiom 1.2.13.
---
 pom.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 2773bb8..013c19a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -392,7 +392,7 @@
 
     <properties>
         <axis2.version>1.5.7-SNAPSHOT</axis2.version>
-        <axiom.version>1.2.13-SNAPSHOT</axiom.version>
+        <axiom.version>1.2.13</axiom.version>
 
         <wss4j.version>1.5.12</wss4j.version>
         <opensaml.version>1.1</opensaml.version>


[axis-axis2-java-rampart] 16/18: Merged r1303198 to the 1.5 branch for debugging purposes.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 14e01826290f5f62cefbcb7e858957c809fbf03b
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Tue Mar 20 23:13:35 2012 +0000

    Merged r1303198 to the 1.5 branch for debugging purposes.
---
 .../src/main/java/org/apache/rahas/TestClient.java | 116 ++++++++++-----------
 1 file changed, 55 insertions(+), 61 deletions(-)

diff --git a/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java b/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
index 3fdb63c..bedca63 100644
--- a/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
+++ b/modules/rampart-integration/src/main/java/org/apache/rahas/TestClient.java
@@ -54,68 +54,62 @@ public abstract class TestClient extends TestCase {
 
     /**
      */
-    public void testRequest() {
-        try {
-
-            // Get the repository location from the args
-            String repo = Constants.TESTING_PATH + "rahas_client_repo";
-
-            ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo,
-                                                                                                                      null);
-            ServiceClient serviceClient = new ServiceClient(configContext, null);
-            Options options = new Options();
-
-            System.setProperty("javax.net.ssl.keyStorePassword", "password");
-            System.setProperty("javax.net.ssl.keyStoreType", "JKS");
-            System.setProperty("javax.net.ssl.trustStore", "/home/ruchith/Desktop/interop/certs/interop2.jks");
-            System.setProperty("javax.net.ssl.trustStorePassword", "password");
-            System.setProperty("javax.net.ssl.trustStoreType","JKS");
-
-            options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
-//            options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLHoK"));
-//            options.setTo(new EndpointReference("https://www-lk.wso2.com:8443/axis2/services/UTSAMLHoK"));
-//            options.setTo(new EndpointReference("https://192.18.49.133:2343/jaxws-s1-sts/sts"));
-//            options.setTo(new EndpointReference("https://207.200.37.116/SxSts/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport"));
-//            options.setTo(new EndpointReference("http://localhost:9090/SxSts/Scenario_4_IssuedToken_MutualCertificate10"));
-
-//            options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/MutualCertsSAMLHoK"));
-//            options.setTo(new EndpointReference("http://www-lk.wso2.com:8888/axis2/services/MutualCertsSAMLHoK"));
-//            options.setTo(new EndpointReference("https://131.107.72.15/trust/Addressing2004/UserName"));
-//            options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
-//            options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/trust/X509WSS10"));
-//            options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
-//            options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/jaxws-s4-sts/sts"));
-//            options.setTo(new EndpointReference("http://127.0.0.1:9090/jaxws-s4/simple"));
-//            options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLBearer"));
-
-            options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
-            options.setAction(this.getRequestAction());
-//            options.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, this.getWSANamespace());
-
-            options.setTimeOutInMilliSeconds(200 * 1000);
-            OutflowConfiguration clientOutflowConfiguration = getClientOutflowConfiguration();
-            if (clientOutflowConfiguration != null) {
-                configContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, clientOutflowConfiguration.getProperty());
-            }
-            InflowConfiguration clientInflowConfiguration = getClientInflowConfiguration();
-            if (clientInflowConfiguration != null) {
-                configContext.setProperty(WSSHandlerConstants.INFLOW_SECURITY, clientInflowConfiguration.getProperty());
-            }
-
-            serviceClient.engageModule(new QName("addressing"));
-            serviceClient.engageModule(new QName("rampart"));
-
-            serviceClient.setOptions(options);
-
-            //Blocking invocation
-
-            OMElement result = serviceClient.sendReceive(getRequest());
-
-            this.validateRsponse(result);
-        } catch (Exception e) {
-            e.printStackTrace();
-            fail(e.getMessage());
+    public void testRequest() throws Exception {
+        // Get the repository location from the args
+        String repo = Constants.TESTING_PATH + "rahas_client_repo";
+
+        ConfigurationContext configContext = ConfigurationContextFactory.createConfigurationContextFromFileSystem(repo,
+                                                                                                                  null);
+        ServiceClient serviceClient = new ServiceClient(configContext, null);
+        Options options = new Options();
+
+        System.setProperty("javax.net.ssl.keyStorePassword", "password");
+        System.setProperty("javax.net.ssl.keyStoreType", "JKS");
+        System.setProperty("javax.net.ssl.trustStore", "/home/ruchith/Desktop/interop/certs/interop2.jks");
+        System.setProperty("javax.net.ssl.trustStorePassword", "password");
+        System.setProperty("javax.net.ssl.trustStoreType","JKS");
+
+        options.setTo(new EndpointReference("http://127.0.0.1:" + port + "/axis2/services/SecureService"));
+//        options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLHoK"));
+//        options.setTo(new EndpointReference("https://www-lk.wso2.com:8443/axis2/services/UTSAMLHoK"));
+//        options.setTo(new EndpointReference("https://192.18.49.133:2343/jaxws-s1-sts/sts"));
+//        options.setTo(new EndpointReference("https://207.200.37.116/SxSts/Scenario_1_IssuedTokenOverTransport_UsernameOverTransport"));
+//        options.setTo(new EndpointReference("http://localhost:9090/SxSts/Scenario_4_IssuedToken_MutualCertificate10"));
+
+//        options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/MutualCertsSAMLHoK"));
+//        options.setTo(new EndpointReference("http://www-lk.wso2.com:8888/axis2/services/MutualCertsSAMLHoK"));
+//        options.setTo(new EndpointReference("https://131.107.72.15/trust/Addressing2004/UserName"));
+//        options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
+//        options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/trust/X509WSS10"));
+//        options.setTo(new EndpointReference("https://131.107.72.15/trust/UserName"));
+//        options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/jaxws-s4-sts/sts"));
+//        options.setTo(new EndpointReference("http://127.0.0.1:9090/jaxws-s4/simple"));
+//        options.setTo(new EndpointReference("http://127.0.0.1:" + 9090 + "/axis2/services/UTSAMLBearer"));
+
+        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
+        options.setAction(this.getRequestAction());
+//        options.setProperty(AddressingConstants.WS_ADDRESSING_VERSION, this.getWSANamespace());
+
+        options.setTimeOutInMilliSeconds(200 * 1000);
+        OutflowConfiguration clientOutflowConfiguration = getClientOutflowConfiguration();
+        if (clientOutflowConfiguration != null) {
+            configContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY, clientOutflowConfiguration.getProperty());
         }
+        InflowConfiguration clientInflowConfiguration = getClientInflowConfiguration();
+        if (clientInflowConfiguration != null) {
+            configContext.setProperty(WSSHandlerConstants.INFLOW_SECURITY, clientInflowConfiguration.getProperty());
+        }
+
+        serviceClient.engageModule(new QName("addressing"));
+        serviceClient.engageModule(new QName("rampart"));
+
+        serviceClient.setOptions(options);
+
+        //Blocking invocation
+
+        OMElement result = serviceClient.sendReceive(getRequest());
+
+        this.validateRsponse(result);
     }
 
     protected String getWSANamespace() {


[axis-axis2-java-rampart] 11/18: RAMPART-338: Merged r1221926 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit a06889cb25114b31fbc7d69427d04e362a88f421
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Thu Dec 22 10:16:50 2011 +0000

    RAMPART-338: Merged r1221926 to the 1.5 branch.
---
 modules/rampart-samples/basic/build.xml  | 19 ++++++++++++-------
 modules/rampart-samples/policy/build.xml | 32 ++++++++++++++++++++------------
 2 files changed, 32 insertions(+), 19 deletions(-)

diff --git a/modules/rampart-samples/basic/build.xml b/modules/rampart-samples/basic/build.xml
index 830b5e0..7f3b690 100644
--- a/modules/rampart-samples/basic/build.xml
+++ b/modules/rampart-samples/basic/build.xml
@@ -23,9 +23,6 @@
 	<property name="keys.dir" value="../keys"/>
 	<property name="temp.client.dir" value="build/temp_client"/>
 	
-	<property name="addressing.mar" value="addressing-1.5.4.mar"/>
-	<property name="rampart.mar" value="rampart-1.5.1.mar"/>	
-	
 	<property name="client.port" value="8080"/>
 	<property name="server.port" value="8080"/>
 	
@@ -165,8 +162,12 @@
 	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}/modules"/>
 	   		
 	   		<!-- copy modules -->
-	   		<copy file="${modules.dir}/${addressing.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${addressing.mar}" overwrite="true"/>
-	   		<copy file="${modules.dir}/${rampart.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${rampart.mar}" overwrite="true"/>
+	   		<copy todir="${service.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		    </fileset>
+	   		</copy>
 	   		
 	   		<!-- create service -->
 	   		<mkdir dir="${temp.dir}"/>
@@ -221,8 +222,12 @@
 	   		<copy file="sample@{sample.number}/client.axis2.xml" tofile="${client.repos.dir}/sample@{sample.number}/conf/axis2.xml" overwrite="true"/>
 	   		
 	   		<!-- copy modules -->
-	   		<copy file="${modules.dir}/${addressing.mar}" tofile="${client.repos.dir}/sample@{sample.number}/modules/${addressing.mar}" overwrite="true"/>
-	   		<copy file="${modules.dir}/${rampart.mar}" tofile="${client.repos.dir}/sample@{sample.number}/modules/${rampart.mar}" overwrite="true"/>
+	   		<copy todir="${client.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		    </fileset>
+	   		</copy>
 	   		
 	   		<mkdir dir="${temp.client.dir}"/>
 	   		
diff --git a/modules/rampart-samples/policy/build.xml b/modules/rampart-samples/policy/build.xml
index cab2149..b913e69 100644
--- a/modules/rampart-samples/policy/build.xml
+++ b/modules/rampart-samples/policy/build.xml
@@ -24,10 +24,6 @@
 	<property name="keys.dir" value="../keys"/>
 	<property name="temp.client.dir" value="build/temp_client"/>
 	
-	<property name="addressing.mar" value="addressing-1.5.4.mar"/>
-	<property name="rampart.mar" value="rampart-1.5.1.mar"/>
-	<property name="rahas.mar" value="rahas-1.5.1.mar"/>
-
 	<property name="client.port" value="8080"/>
 	<property name="server.port" value="8080"/>
 	
@@ -137,9 +133,13 @@
 	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}/modules"/>
 	   		
 	   		<!-- copy modules -->
-	   		<copy file="${modules.dir}/${addressing.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${addressing.mar}" overwrite="true"/>
-	   		<copy file="${modules.dir}/${rampart.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${rampart.mar}" overwrite="true"/>
-	   		<copy file="${modules.dir}/${rahas.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${rahas.mar}" overwrite="true"/>
+	   		<copy todir="${service.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		        <include name="rahas-*.mar"/>
+	   		    </fileset>
+	   		</copy>
 	   		
 	   		<!-- create service -->
 	   		<mkdir dir="${temp.dir}"/>
@@ -192,9 +192,13 @@
             <mkdir dir="${service.repos.dir}/sample@{sample.number}/modules"/>
             
             <!-- copy modules -->
-            <copy file="${modules.dir}/${addressing.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${addressing.mar}" overwrite="true"/>
-            <copy file="${modules.dir}/${rampart.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${rampart.mar}" overwrite="true"/>
-            <copy file="${modules.dir}/${rahas.mar}" tofile="${service.repos.dir}/sample@{sample.number}/modules/${rahas.mar}" overwrite="true"/>
+	   		<copy todir="${service.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		        <include name="rahas-*.mar"/>
+	   		    </fileset>
+	   		</copy>
             
             <!-- create service -->
             <mkdir dir="${temp.dir}"/>
@@ -248,8 +252,12 @@
 	   		<mkdir dir="${client.repos.dir}/sample@{sample.number}/modules"/>
 	   		
 	   		<!-- copy modules -->
-	   		<copy file="${modules.dir}/${addressing.mar}" tofile="${client.repos.dir}/sample@{sample.number}/modules/${addressing.mar}" overwrite="true"/>
-	   		<copy file="${modules.dir}/${rampart.mar}" tofile="${client.repos.dir}/sample@{sample.number}/modules/${rampart.mar}" overwrite="true"/>
+	   		<copy todir="${client.repos.dir}/sample@{sample.number}/modules">
+	   		    <fileset dir="${modules.dir}">
+	   		        <include name="addressing-*.mar"/>
+	   		        <include name="rampart-*.mar"/>
+	   		    </fileset>
+	   		</copy>
 	   		
 	   		<mkdir dir="${temp.client.dir}"/>
 	   		


[axis-axis2-java-rampart] 04/18: RAMPART-336: Merged r1177413 to the 1.5 branch and updated the dependencies.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit eacfeb5e78e02ea834a598561a51260ab24a3f10
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Oct 1 22:56:53 2011 +0000

    RAMPART-336: Merged r1177413 to the 1.5 branch and updated the dependencies.
---
 .../src/main/java/org/apache/rampart/util/Axis2Util.java  | 15 ++++-----------
 pom.xml                                                   |  4 ++--
 2 files changed, 6 insertions(+), 13 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index 7874475..2de1406 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -194,10 +194,6 @@ public class Axis2Util {
                         // it is a header we have added in rampart eg. EncryptedHeader and should
                         // be converted to SOAPHeaderBlock for processing
                     	} else {
-                            // First detach element from soap header
-                            element.detach();
-
-                            // add new element
                     		header = soapHeader.addHeaderBlock(element.getLocalName(), element.getNamespace());
                     		Iterator attrIter = element.getAllAttributes();
                     		while (attrIter.hasNext()) {
@@ -210,17 +206,14 @@ public class Axis2Util {
                     			header.declareNamespace(ns);
                     		}
                     		Iterator children = element.getChildElements();
-
-                            // Element is a composite element, in which it has many siblings.
-                            // All siblings will be added when we add a single node.
-                            // See ParentNode.insertBefore(Node newChild, Node refChild) for
-                            // more information.
-                    		if (children.hasNext()) {
+                    		while (children.hasNext()) {
                     			OMNode child = (OMNode)children.next();
                     			children.remove();
                     			header.addChild(child);
                     		}
-
+                    		
+                    		element.detach();
+                    		
                     		soapHeader.build();
                     		
                     		header.setProcessed();
diff --git a/pom.xml b/pom.xml
index 169142c..295044d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -382,8 +382,8 @@
     </modules>
 
     <properties>
-        <axis2.version>1.5.6</axis2.version>
-        <axiom.version>1.2.12</axiom.version>
+        <axis2.version>1.5.7-SNAPSHOT</axis2.version>
+        <axiom.version>1.2.13-SNAPSHOT</axiom.version>
 
         <wss4j.version>1.5.12</wss4j.version>
         <opensaml.version>1.1</opensaml.version>


[axis-axis2-java-rampart] 02/18: Partial merge of r1131278 to the 1.5 branch to avoid a minor issue when building the documentation module.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 1142211d68e236cc79a2dbf912d3844f890b7c74
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Sep 25 09:54:45 2011 +0000

    Partial merge of r1131278 to the 1.5 branch to avoid a minor issue when building the documentation module.
---
 modules/documentation/src/site/xdoc/download/1.5.1/download.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/modules/documentation/src/site/xdoc/download/1.5.1/download.xml b/modules/documentation/src/site/xdoc/download/1.5.1/download.xml
index e33362c..725810e 100644
--- a/modules/documentation/src/site/xdoc/download/1.5.1/download.xml
+++ b/modules/documentation/src/site/xdoc/download/1.5.1/download.xml
@@ -96,7 +96,7 @@ Other mirrors: <select name="Preferred">
 [if-any backup]
   [for backup]<option value="[backup]">[backup] (backup)</option>[end]
 [end]
-</select><input type="submit" value="Change"></form><p>You may also consult the <a class="externalLink" href="http://www.apache.org/mirrors/">complete list of mirrors</a>
+</select><input type="submit" value="Change"/></form><p>You may also consult the <a class="externalLink" href="http://www.apache.org/mirrors/">complete list of mirrors</a>
 .</p>
 <p><strong>Note:</strong> when downloading from a mirror please
 check the <a href=


[axis-axis2-java-rampart] 13/18: Merged r1221937 to the 1.5 branch to make OpenSAML work in the samples.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 51acc3c001fc3c8f07efce978fc623b6e9fb8267
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Thu Dec 22 11:18:42 2011 +0000

    Merged r1221937 to the 1.5 branch to make OpenSAML work in the samples.
---
 legal/{slf4j-jdk14-LICENSE.txt => slf4j-jcl-LICENSE.txt} | 0
 modules/distribution/bin.xml                             | 2 +-
 modules/distribution/pom.xml                             | 4 ++++
 pom.xml                                                  | 5 +++++
 4 files changed, 10 insertions(+), 1 deletion(-)

diff --git a/legal/slf4j-jdk14-LICENSE.txt b/legal/slf4j-jcl-LICENSE.txt
similarity index 100%
rename from legal/slf4j-jdk14-LICENSE.txt
rename to legal/slf4j-jcl-LICENSE.txt
diff --git a/modules/distribution/bin.xml b/modules/distribution/bin.xml
index bc32fdf..729b121 100644
--- a/modules/distribution/bin.xml
+++ b/modules/distribution/bin.xml
@@ -27,7 +27,7 @@
                 <include>org.opensaml:xmltooling:jar</include>
                 <include>joda-time:joda-time:jar</include>
                 <include>org.slf4j:slf4j-api:jar</include>
-                <include>org.slf4j:slf4j-jdk14:jar</include>
+                <include>org.slf4j:slf4j-jcl:jar</include>
                 <include>velocity:velocity:jar</include>
                 <include>commons-collections:commons-collections:jar</include>
                 <include>org.opensaml:openws:jar</include>
diff --git a/modules/distribution/pom.xml b/modules/distribution/pom.xml
index 3f5b5bc..fa61489 100644
--- a/modules/distribution/pom.xml
+++ b/modules/distribution/pom.xml
@@ -144,6 +144,10 @@
             <artifactId>bcprov-jdk15</artifactId>
             <version>${bcprov.jdk15.version}</version>
         </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-jcl</artifactId>
+        </dependency>
     </dependencies>
 
 </project>
diff --git a/pom.xml b/pom.xml
index f4afdfa..2773bb8 100644
--- a/pom.xml
+++ b/pom.xml
@@ -295,6 +295,11 @@
                 <version>1.5.5</version>
             </dependency>
             <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-jcl</artifactId>
+                <version>1.5.5</version>
+            </dependency>
+            <dependency>
                 <groupId>log4j</groupId>
                 <artifactId>log4j</artifactId>
                 <version>1.2.15</version>


[axis-axis2-java-rampart] 09/18: Merged r1194848 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 87298a8216c0a9c9df73fedbc97bfaa5a5fb4160
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sat Oct 29 09:46:26 2011 +0000

    Merged r1194848 to the 1.5 branch.
---
 modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java b/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
index 72f2316..80b410e 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
@@ -26,11 +26,18 @@ import org.apache.neethi.Policy;
 import org.apache.rampart.policy.model.RampartConfig;
 import org.apache.ws.secpolicy.SP11Constants;
 import org.apache.ws.secpolicy.SP12Constants;
+import org.opensaml.DefaultBootstrap;
+import org.opensaml.xml.ConfigurationException;
 
 public class Rampart implements Module /* , ModulePolicyExtension */  {
 
     public void init(ConfigurationContext configContext, AxisModule module)
             throws AxisFault {
+        try {
+            DefaultBootstrap.bootstrap();
+        } catch (ConfigurationException ex) {
+            throw new AxisFault("Failed to bootstrap OpenSAML", ex);
+        }
     }
 
     public void engageNotify(AxisDescription axisDescription) throws AxisFault {


[axis-axis2-java-rampart] 12/18: Merged r1221940 (with changes) to the 1.5 branch to get log4j working in the samples.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 703a0181392ebdd46c00217d149c614e3b1f69ef
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Thu Dec 22 10:29:15 2011 +0000

    Merged r1221940 (with changes) to the 1.5 branch to get log4j working in the samples.
---
 modules/rampart-samples/basic/build.xml  | 21 +++++++++++----------
 modules/rampart-samples/policy/build.xml | 30 +++++++++++++-----------------
 2 files changed, 24 insertions(+), 27 deletions(-)

diff --git a/modules/rampart-samples/basic/build.xml b/modules/rampart-samples/basic/build.xml
index 7f3b690..6517093 100644
--- a/modules/rampart-samples/basic/build.xml
+++ b/modules/rampart-samples/basic/build.xml
@@ -30,6 +30,15 @@
 	
     <property environment="env"/>
     	
+    <property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
+    
+    <path id="runtime.classpath">
+        <fileset dir="${lib.dir}">
+            <include name="**/*.jar"/>
+        </fileset>
+        <pathelement location="${env.AXIS2_HOME}"/>
+    </path>
+    
 	<target name="check.dependency" unless="env.AXIS2_HOME">
         <echo message="AXIS2_HOME must be set"/>
     </target>
@@ -155,7 +164,6 @@
 	   	<sequential>
 	   		
 	   		<property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
-	   		<property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
 	   		
 	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}"/>
 	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}/services"/>
@@ -196,11 +204,7 @@
             <java classname="org.apache.axis2.transport.http.SimpleHTTPServer" fork="true">
                     <arg value="${service.repos.dir}/sample@{sample.number}"/>
                     <arg value="-p${server.port}"/>
-                    <classpath>
-                            <fileset dir="${lib.dir}">
-                                    <include name="**/*.jar"/>
-                            </fileset>
-                    </classpath>
+                	<classpath refid="runtime.classpath"/>
             </java>
 
 	   </sequential>
@@ -211,7 +215,6 @@
 	   	<sequential>
 	   		
 	   		<property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
-	   		<property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
 	   		
 	   		<!-- Create the client repo -->
 	   		<mkdir dir="${client.repos.dir}/sample@{sample.number}"/>
@@ -250,9 +253,7 @@
                     <arg value="${sample.services.url}/sample@{sample.number}"/>
                     <arg value="${client.repos.dir}/sample@{sample.number}"/>
                     <classpath>
-                        <fileset dir="${lib.dir}">
-                        	<include name="**/*.jar"/>
-                        </fileset>
+                        <path refid="runtime.classpath"/>
                   		<dirset dir="${temp.client.dir}" />
                     </classpath>
             </java>
diff --git a/modules/rampart-samples/policy/build.xml b/modules/rampart-samples/policy/build.xml
index b913e69..af91b66 100644
--- a/modules/rampart-samples/policy/build.xml
+++ b/modules/rampart-samples/policy/build.xml
@@ -30,7 +30,16 @@
 	<property name="sample.services.url" value="http://localhost:${client.port}/axis2/services"/>
 	
     <property environment="env"/>
-    	
+    
+    <property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
+    
+    <path id="runtime.classpath">
+        <fileset dir="${lib.dir}">
+            <include name="**/*.jar"/>
+        </fileset>
+        <pathelement location="${env.AXIS2_HOME}"/>
+    </path>
+    
 	<target name="check.dependency" unless="env.AXIS2_HOME">
         <echo message="AXIS2_HOME must be set"/>
     </target>
@@ -126,7 +135,6 @@
 	   	<sequential>
 	   		
 	   		<property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
-	   		<property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
 	   		
 	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}"/>
 	   		<mkdir dir="${service.repos.dir}/sample@{sample.number}/services"/>
@@ -169,11 +177,7 @@
             <java classname="org.apache.axis2.transport.http.SimpleHTTPServer" fork="true">
                     <arg value="${service.repos.dir}/sample@{sample.number}"/>
                     <arg value="-p${server.port}"/>
-                    <classpath>
-                            <fileset dir="${lib.dir}">
-                                    <include name="**/*.jar"/>
-                            </fileset>
-                    </classpath>
+                    <classpath refid="runtime.classpath"/>
             </java>
 
 	   </sequential>
@@ -185,7 +189,6 @@
         <sequential>
             
             <property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
-            <property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
             
             <mkdir dir="${service.repos.dir}/sample@{sample.number}"/>
             <mkdir dir="${service.repos.dir}/sample@{sample.number}/services"/>
@@ -229,11 +232,7 @@
             <java classname="org.apache.axis2.transport.http.SimpleHTTPServer" fork="true">
                     <arg value="${service.repos.dir}/sample@{sample.number}"/>
                     <arg value="-p${server.port}"/>
-                    <classpath>
-                            <fileset dir="${lib.dir}">
-                                    <include name="**/*.jar"/>
-                            </fileset>
-                    </classpath>
+                    <classpath refid="runtime.classpath"/>
             </java>
 
        </sequential>
@@ -244,7 +243,6 @@
 	   	<sequential>
 	   		
 	   		<property name="modules.dir" value="${env.AXIS2_HOME}/repository/modules/"/>
-	   		<property name="lib.dir" value="${env.AXIS2_HOME}/lib"/>
 	   		
 	   		<!-- Create the client repo -->
 	   		<mkdir dir="${client.repos.dir}/sample@{sample.number}"/>
@@ -281,9 +279,7 @@
                     <arg value="${client.repos.dir}/sample@{sample.number}"/>
                     <arg value="sample@{sample.number}/policy.xml"/>
                     <classpath>
-                        <fileset dir="${lib.dir}">
-                        	<include name="**/*.jar"/>
-                        </fileset>
+                        <path refid="runtime.classpath"/>
                   		<dirset dir="${temp.client.dir}" />
                     </classpath>
             </java>


[axis-axis2-java-rampart] 17/18: Compensate for change r1299894 in Axiom.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit bf35d2b17371ec72a1d100fd40b0ecaac3d62ff8
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Tue Mar 20 23:38:55 2012 +0000

    Compensate for change r1299894 in Axiom.
---
 .../rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java    | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java b/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java
index c52d355..6f3b1b0 100644
--- a/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java
+++ b/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java
@@ -421,12 +421,15 @@ public class TrustUtil {
      * @return SOAPEnvelope
      */
     public static SOAPEnvelope createSOAPEnvelope(String nsUri) {
+        SOAPEnvelope env;
         if (nsUri != null
             && SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsUri)) {
-            return DOOMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+            env = DOOMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
         } else {
-            return DOOMAbstractFactory.getSOAP12Factory().getDefaultEnvelope();
+            env = DOOMAbstractFactory.getSOAP12Factory().getDefaultEnvelope();
         }
+        ((Element)env).getOwnerDocument().appendChild((Element)env);
+        return env;
     }
 
 


[axis-axis2-java-rampart] 14/18: Merged r1090540 and r1235059 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit cb786b055433f3dbdce1066753d28b51b299be83
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Tue Jan 24 07:16:43 2012 +0000

    Merged r1090540 and r1235059 to the 1.5 branch.
---
 .../java/org/apache/rampart/util/Axis2Util.java    | 31 +++++++++++++++++++++-
 1 file changed, 30 insertions(+), 1 deletion(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index 4d719e1..8eb0b55 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -35,6 +35,7 @@ import org.apache.axiom.soap.impl.dom.factory.DOMSOAPFactory;
 import org.apache.rampart.handler.WSSHandlerConstants;
 import org.apache.ws.security.WSSecurityException;
 import org.apache.xml.security.utils.XMLUtils;
+import org.w3c.dom.DOMConfiguration;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
 
@@ -89,7 +90,35 @@ public class Axis2Util {
 			throws WSSecurityException {
 		try {
             if(env instanceof Element) {
-                return ((Element)env).getOwnerDocument();
+                Element element = (Element)env;
+                Document document = element.getOwnerDocument();
+                // For outgoing messages, Axis2 only creates the SOAPEnvelope, but no document. If
+                // the Axiom implementation also supports DOM, then the envelope (seen as a DOM
+                // element) will have an owner document, but the document and the envelope have no
+                // parent-child relationship. On the other hand, the input expected by WSS4J is
+                // a document with the envelope as document element. Therefore we need to set the
+                // envelope as document element on the owner document.
+                if (element.getParentNode() != document) {
+                    document.appendChild(element);
+                }
+                // If the Axiom implementation supports DOM, then it is possible/likely that the
+                // DOM API was used to create the object model (or parts of it). In this case, the
+                // object model is not necessarily well formed with respect to namespaces because
+                // DOM doesn't generate namespace declarations automatically. This is an issue
+                // because WSS4J/Santuario expects that all namespace declarations are present.
+                // If this is not the case, then signature values or encryptions will be incorrect.
+                // To avoid this, we normalize the document. Note that if we disable the other
+                // normalizations supported by DOM, this is generally not a heavy operation.
+                // In particular, the Axiom implementation is not required to expand the object
+                // model (including OMSourcedElements) because the Axiom builder is required to
+                // perform namespace repairing, so that no modifications to unexpanded parts of
+                // the message are required.
+                DOMConfiguration domConfig = document.getDomConfig();
+                domConfig.setParameter("split-cdata-sections", Boolean.FALSE);
+                domConfig.setParameter("well-formed", Boolean.FALSE);
+                domConfig.setParameter("namespaces", Boolean.TRUE);
+                document.normalizeDocument();
+                return document;
             }
             
             if (useDoom) {


[axis-axis2-java-rampart] 08/18: Merged r1190533 and r1190600 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 1a599e8d1990392af8e40896bdf735701174f661
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Fri Oct 28 22:23:10 2011 +0000

    Merged r1190533 and r1190600 to the 1.5 branch.
---
 .../main/java/org/apache/rampart/util/Axis2Util.java  |  2 +-
 modules/rampart-integration/pom.xml                   | 19 +++++++++++++++++++
 pom.xml                                               |  4 ++++
 release-docs/README.txt                               | 10 +++++++---
 4 files changed, 31 insertions(+), 4 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index b974cdb..4d719e1 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -131,7 +131,7 @@ public class Axis2Util {
                         env.getXMLStreamReader(), factory, nsURI);
                 SOAPEnvelope envelope = (stAXSOAPModelBuilder)
                         .getSOAPEnvelope();
-                ((OMNode) envelope.getParent()).build();
+                envelope.getParent().build();
                 
                 //Set the processed flag of the processed headers
                 SOAPHeader header = envelope.getHeader();
diff --git a/modules/rampart-integration/pom.xml b/modules/rampart-integration/pom.xml
index dc3eeec..a6e613d 100644
--- a/modules/rampart-integration/pom.xml
+++ b/modules/rampart-integration/pom.xml
@@ -75,6 +75,18 @@
                             </artifactItems>
                         </configuration>
                     </execution>
+                    <execution>
+                        <id>copy-endorsed</id>
+                        <phase>process-resources</phase>
+                        <goals>
+                            <goal>copy-dependencies</goal>
+                        </goals>
+                        <configuration>
+                            <includeGroupIds>org.apache.xerces,org.apache.xalan</includeGroupIds>
+                            <outputDirectory>${project.build.directory}/endorsed</outputDirectory>
+                            <stripVersion>true</stripVersion>
+                        </configuration>
+                    </execution>
                 </executions>
             </plugin>
             <plugin>
@@ -548,6 +560,13 @@
                     </execution>
                 </executions>
             </plugin-->
+            <plugin>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <configuration>
+                    <!-- Add the Xerces/Xalan versions expected by OpenSAML to the boot classpath so that the build succeeds on older 1.5 JDKs -->
+                    <argLine>-Xbootclasspath/p:${project.build.directory}/endorsed/xml-apis.jar${path.separator}${project.build.directory}/endorsed/xercesImpl.jar${path.separator}${project.build.directory}/endorsed/resolver.jar${path.separator}${project.build.directory}/endorsed/serializer.jar${path.separator}${project.build.directory}/endorsed/xalan.jar</argLine>
+                </configuration>
+            </plugin>
         </plugins>
     </build>
 
diff --git a/pom.xml b/pom.xml
index 295044d..f4afdfa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -147,6 +147,10 @@
                     <artifactId>axis2-mar-maven-plugin</artifactId>
                     <version>1.5.4</version>
                 </plugin>
+                <plugin>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <version>2.10</version>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>
diff --git a/release-docs/README.txt b/release-docs/README.txt
index b79bbb9..e9f7512 100644
--- a/release-docs/README.txt
+++ b/release-docs/README.txt
@@ -64,14 +64,18 @@ http://www.bouncycastle.org/latest_releases.html
 lib/security directory as the last line.
 security.provider.X=org.bouncycastle.jce.provider.BouncyCastleProvider
 
-Test cases written for SAML 2.0 support requires endorsing the JDK's default JAXP 
+On older JDKs, the SAML 2.0 support requires endorsing the JDK's default JAXP 
 implementation with Xerces(http://xerces.apache.org/mirrors.cgi#binary) and 
-Xalan(http://xml.apache.org/xalan-j/downloads.html#latest-release). So before building Rampart from the
-source distribution, you need to copy resolver-x.x.x.jar, serializer-x.x.x.jar, xercesImpl-x.x.x.jar 
+Xalan(http://xml.apache.org/xalan-j/downloads.html#latest-release). To do that,
+you need to copy resolver-x.x.x.jar, serializer-x.x.x.jar, xercesImpl-x.x.x.jar 
 and xml-apis-x.x.x.jar from the Xerces binary distribution and xalan-x.x.x.jar from the xalan binary 
 distribution to the endorsed directory. If you are using Sun JDK, endorsed directory is located at 
 $JAVA_HOME/jre/lib/endorsed.
 
+Note that during the build these JARs are added automatically to the boot classpath
+of the JVM running the unit tests. Therefore this is only necessary at runtime, not
+when building Rampart. 
+
 When Rampart is deployed in a particular application server, please refer to the endorsing mechanism 
 recommended for that server and endorse the JAXP implementation using the set of jars mentioned above. 
 


[axis-axis2-java-rampart] 15/18: Merged r1299342, r1299389 and r1299390 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 922366589c9f2528659b3eba9ab2bc3b707301c0
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Mar 11 18:08:33 2012 +0000

    Merged r1299342, r1299389 and r1299390 to the 1.5 branch.
---
 .../src/main/java/org/apache/rampart/util/Axis2Util.java     |  2 +-
 .../src/main/java/org/apache/rahas/client/STSClient.java     | 12 +++++-------
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
index 8eb0b55..07840f1 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
@@ -243,7 +243,7 @@ public class Axis2Util {
                     			header.addChild(child);
                     		}
                     		
-                    		element.detach();
+                    		headerBlocs.remove();
                     		
                     		soapHeader.build();
                     		
diff --git a/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java b/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
index 01ad8ad..3803148 100644
--- a/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
+++ b/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
@@ -661,18 +661,16 @@ public class STSClient {
 
             Iterator templateChildren = rstTemplate.getChildElements();
             while (templateChildren.hasNext()) {
-                OMNode child = (OMNode) templateChildren.next();
-                rst.addChild(child);
+                OMElement child = (OMElement) templateChildren.next();
+                rst.addChild(child.cloneOMElement());
                 //Look for the key size element
-                if (child instanceof OMElement
-                    && ((OMElement) child).getQName().equals(
+                if (child.getQName().equals(
                         new QName(TrustUtil.getWSTNamespace(this.version),
                                   RahasConstants.IssuanceBindingLocalNames.KEY_SIZE))) {
                     log.debug("Extracting key size from the RSTTemplate: ");
-                    OMElement childElem = (OMElement) child;
                     this.keySize =
-                            (childElem.getText() != null && !"".equals(childElem.getText())) ?
-                            Integer.parseInt(childElem.getText()) :
+                            (child.getText() != null && !"".equals(child.getText())) ?
+                            Integer.parseInt(child.getText()) :
                             -1;
                     log.debug("Key size from RSTTemplate: " + this.keySize);
                 }


[axis-axis2-java-rampart] 10/18: Merged r1194994 to the 1.5 branch.

Posted by bi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

billblough pushed a commit to branch 1_5_x
in repository https://gitbox.apache.org/repos/asf/axis-axis2-java-rampart.git

commit 42e65c43fff71232fcc7d9bceba5292a14e5f440
Author: Andreas Veithen <ve...@apache.org>
AuthorDate: Sun Oct 30 11:45:15 2011 +0000

    Merged r1194994 to the 1.5 branch.
---
 .../src/main/java/org/apache/rampart/Rampart.java  |  7 ---
 modules/rampart-trust-mar/module.xml               |  2 +-
 .../src/main/java/org/apache/rahas/Rahas.java      | 55 ++++++++++++++++++++++
 3 files changed, 56 insertions(+), 8 deletions(-)

diff --git a/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java b/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
index 80b410e..72f2316 100644
--- a/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
+++ b/modules/rampart-core/src/main/java/org/apache/rampart/Rampart.java
@@ -26,18 +26,11 @@ import org.apache.neethi.Policy;
 import org.apache.rampart.policy.model.RampartConfig;
 import org.apache.ws.secpolicy.SP11Constants;
 import org.apache.ws.secpolicy.SP12Constants;
-import org.opensaml.DefaultBootstrap;
-import org.opensaml.xml.ConfigurationException;
 
 public class Rampart implements Module /* , ModulePolicyExtension */  {
 
     public void init(ConfigurationContext configContext, AxisModule module)
             throws AxisFault {
-        try {
-            DefaultBootstrap.bootstrap();
-        } catch (ConfigurationException ex) {
-            throw new AxisFault("Failed to bootstrap OpenSAML", ex);
-        }
     }
 
     public void engageNotify(AxisDescription axisDescription) throws AxisFault {
diff --git a/modules/rampart-trust-mar/module.xml b/modules/rampart-trust-mar/module.xml
index c24682f..bfc5119 100644
--- a/modules/rampart-trust-mar/module.xml
+++ b/modules/rampart-trust-mar/module.xml
@@ -1,4 +1,4 @@
-<module name="rahas">
+<module name="rahas" class="org.apache.rahas.Rahas">
     <Description>This module is used to STS enable a service where it adds
         the RequestSecurityToken operation to a service that the module is engaged to</Description>
 
diff --git a/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java b/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java
new file mode 100644
index 0000000..6130ffb
--- /dev/null
+++ b/modules/rampart-trust/src/main/java/org/apache/rahas/Rahas.java
@@ -0,0 +1,55 @@
+/*
+ * 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.
+ */
+package org.apache.rahas;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.description.AxisDescription;
+import org.apache.axis2.description.AxisModule;
+import org.apache.axis2.modules.Module;
+import org.apache.neethi.Assertion;
+import org.apache.neethi.Policy;
+import org.opensaml.DefaultBootstrap;
+import org.opensaml.xml.ConfigurationException;
+
+public class Rahas implements Module {
+    public void init(ConfigurationContext configContext, AxisModule module)
+            throws AxisFault {
+        try {
+            DefaultBootstrap.bootstrap();
+        } catch (ConfigurationException ex) {
+            throw new AxisFault("Failed to bootstrap OpenSAML", ex);
+        }
+    }
+
+    public void engageNotify(AxisDescription axisDescription) throws AxisFault {
+    }
+
+    public boolean canSupportAssertion(Assertion assertion) {
+        return false;
+    }
+
+    public void applyPolicy(Policy policy, AxisDescription axisDescription)
+            throws AxisFault {
+    }
+
+    public void shutdown(ConfigurationContext configurationContext)
+            throws AxisFault {
+    }
+}