cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/3] git commit: [CXF-5585] - "SignatureConfirmation does not work with the Asymmetric Binding + EncryptBeforeSigning".
Date Fri, 28 Feb 2014 15:12:51 GMT
[CXF-5585] - "SignatureConfirmation does not work with the Asymmetric Binding + EncryptBeforeSigning".

Conflicts:
	rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AsymmetricBindingHandler.java
	systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/client.xml
	systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/server.xml


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/4c25920e
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4c25920e
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4c25920e

Branch: refs/heads/2.6.x-fixes
Commit: 4c25920e0c603597cce73f47035972a8e06110f8
Parents: beb466f
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Feb 28 14:55:24 2014 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Feb 28 15:11:32 2014 +0000

----------------------------------------------------------------------
 .../ws/bindings/BindingPropertiesTest.java      | 24 ++++++++++++++++++++
 .../systest/ws/bindings/DoubleItBindings.wsdl   |  3 +++
 .../cxf/systest/ws/bindings/client/client.xml   | 16 +++++++++++++
 .../cxf/systest/ws/bindings/server/server.xml   | 14 +++++++++++-
 4 files changed, 56 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/4c25920e/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
index ccdbda3..4387bf3 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/bindings/BindingPropertiesTest.java
@@ -425,4 +425,28 @@ public class BindingPropertiesTest extends AbstractBusClientServerTestBase
{
         bus.shutdown(true);
     }
     
+    @org.junit.Test
+    public void testSignatureConfirmationEncBeforeSigning() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = BindingPropertiesTest.class.getResource("client/client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = BindingPropertiesTest.class.getResource("DoubleItBindings.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+       
+        QName portQName = new QName(NAMESPACE, "DoubleItSignatureConfirmationEncBeforeSigningPort");
+        DoubleItPortType port = service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(port, PORT);
+        
+        port.doubleIt(25);
+        
+        ((java.io.Closeable)port).close();
+        bus.shutdown(true);
+    }
+    
+    
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/4c25920e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/DoubleItBindings.wsdl
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/DoubleItBindings.wsdl
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/DoubleItBindings.wsdl
index 10eff18..7d2d6f0 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/DoubleItBindings.wsdl
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/DoubleItBindings.wsdl
@@ -122,6 +122,9 @@
         <wsdl:port name="DoubleItSignatureConfirmationPort2" binding="tns:DoubleItStandardBinding">
             <soap:address location="http://localhost:9010/DoubleItSignatureConfirmation2"
/>
         </wsdl:port>
+        <wsdl:port name="DoubleItSignatureConfirmationEncBeforeSigningPort" binding="tns:DoubleItStandardBinding">
+            <soap:address location="http://localhost:9010/DoubleItSignatureConfirmationEncBeforeSigning"/>
+        </wsdl:port>
         <wsdl:port name="DoubleItStrictPort" binding="tns:DoubleItStandardBinding">
             <soap:address location="http://localhost:9010/DoubleItStrict" />
         </wsdl:port>

http://git-wip-us.apache.org/repos/asf/cxf/blob/4c25920e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/client/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/client/client.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/client/client.xml
index a10ed2b..29e6300 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/client/client.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/client/client.xml
@@ -480,4 +480,20 @@
         </jaxws:features>
     </jaxws:client>
 	
+	   <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignatureConfirmationEncBeforeSigningPort"
createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="ws-security.username" value="Alice"/>
+            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.wssec10.client.UTPasswordCallback"/>
+            <entry key="ws-security.encryption.properties" value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+            <entry key="ws-security.encryption.username" value="bob"/>
+            <entry key="ws-security.signature.properties" value="org/apache/cxf/systest/ws/wssec10/client/alice.properties"/>
+            <entry key="ws-security.signature.username" value="alice"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/bindings/sig-conf-enc-before-signing-policy.xml"/>
+            </p:policies>
+        </jaxws:features>
+    </jaxws:client>
+    
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/4c25920e/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/server/server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/server/server.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/server/server.xml
index 91dda30..8aa5ab3 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/server/server.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/bindings/server/server.xml
@@ -504,5 +504,17 @@
 
     </jaxws:endpoint>
     
-    
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SignatureConfirmationEncBeforeSigningEndpoint"
address="http://localhost:${testutil.ports.Server}/DoubleItSignatureConfirmationEncBeforeSigning"
serviceName="s:DoubleItService" endpointName="s:DoubleItSignatureConfirmationEncBeforeSigningPort"
implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" wsdlLocation="org/apache/cxf/systest/ws/bindings/DoubleItBindings.wsdl">
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.ws.wssec10.client.UTPasswordCallback"/>
+            <entry key="ws-security.signature.properties" value="org/apache/cxf/systest/ws/wssec10/client/bob.properties"/>
+            <entry key="ws-security.encryption.username" value="useReqSigCert"/>
+            <entry key="ws-security.subject.cert.constraints" value=".*O=apache.org.*"/>
+        </jaxws:properties>
+        <jaxws:features>
+            <p:policies>
+                <wsp:PolicyReference xmlns:wsp="http://www.w3.org/ns/ws-policy" URI="classpath:/org/apache/cxf/systest/ws/bindings/sig-conf-enc-before-signing-policy.xml"/>
+            </p:policies>
+        </jaxws:features>
+    </jaxws:endpoint>
 </beans>


Mime
View raw message