You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/03/28 12:13:49 UTC
[1/5] cxf git commit: Removing unused file
Repository: cxf
Updated Branches:
refs/heads/3.1.x-fixes 3fd465a1b -> 0b094e88f
Removing unused file
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/d32aab3c
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/d32aab3c
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/d32aab3c
Branch: refs/heads/3.1.x-fixes
Commit: d32aab3cb2d834b61e95f32c586218056a5a4014
Parents: 3fd465a
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 11:55:24 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 13:13:39 2017 +0100
----------------------------------------------------------------------
systests/ws-security/src/test/resources/kerberos.jaas | 8 --------
1 file changed, 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/d32aab3c/systests/ws-security/src/test/resources/kerberos.jaas
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/kerberos.jaas b/systests/ws-security/src/test/resources/kerberos.jaas
deleted file mode 100644
index b773cf6..0000000
--- a/systests/ws-security/src/test/resources/kerberos.jaas
+++ /dev/null
@@ -1,8 +0,0 @@
-
-alice {
- com.sun.security.auth.module.Krb5LoginModule required refreshKrb5Config=true useKeyTab=true keyTab="/etc/alice.keytab" principal="alice";
-};
-
-bob {
- com.sun.security.auth.module.Krb5LoginModule required refreshKrb5Config=true useKeyTab=true storeKey=true keyTab="/etc/bob.keytab" principal="bob/service.ws.apache.org";
-};
[5/5] cxf git commit: Recording .gitmergeinfo Changes
Posted by co...@apache.org.
Recording .gitmergeinfo Changes
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/0b094e88
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0b094e88
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0b094e88
Branch: refs/heads/3.1.x-fixes
Commit: 0b094e88f775dc10caea0b85a52dcc21ef45300c
Parents: e632d68
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 13:13:42 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 13:13:42 2017 +0100
----------------------------------------------------------------------
.gitmergeinfo | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/0b094e88/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index a184639..d09c806 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -439,6 +439,7 @@ M 955fd4b7fee79642934a828b7758ce14f783364a
M 9a9e0a8a37608195c4ef6fbf386728d13d025d2d
M 9b2bda583c09861c693122ab631c4bffa2187ddd
M 9b6666816a21d8b85cc051be59a8ab6e968c5d0d
+M 9c6f0b8ef0a00887d11706771c88b0a28c818b9a
M 9cd3116cbdbbfb139f40ad2d9e49cec1adf08a08
M 9d3c46e0cfe87700d7105ee131c3e3e33f228e06
M 9d64bcedb508732cdc377312f0fb433ee1dc630e
[2/5] cxf git commit: Adding signature negative tests for WS-Security,
client + server side
Posted by co...@apache.org.
Adding signature negative tests for WS-Security, client + server side
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/f05a4156
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/f05a4156
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/f05a4156
Branch: refs/heads/3.1.x-fixes
Commit: f05a41565bb5e27b15a00e75c704b41e59789e39
Parents: d32aab3
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 12:18:54 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 13:13:40 2017 +0100
----------------------------------------------------------------------
.../cxf/systest/ws/action/ActionTest.java | 112 +++++++++++++++++++
.../ws/common/KeystorePasswordCallback.java | 2 +
.../src/test/resources/bethal.properties | 24 ++++
.../cxf/systest/ws/action/DoubleItAction.wsdl | 12 ++
.../org/apache/cxf/systest/ws/action/client.xml | 104 +++++++++++++++++
.../org/apache/cxf/systest/ws/action/server.xml | 104 +++++++++++++++++
.../src/test/resources/truststore.properties | 23 ++++
7 files changed, 381 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
index 2a67c22..9d86f62 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/action/ActionTest.java
@@ -291,4 +291,116 @@ public class ActionTest extends AbstractBusClientServerTestBase {
((java.io.Closeable)port).close();
bus.shutdown(true);
}
+
+ @org.junit.Test
+ public void testSignatureNegativeClient() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = ActionTest.class.getResource("client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItSignatureNegativeClientPort");
+ DoubleItPortType port =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(port, PORT);
+
+ try {
+ port.doubleIt(25);
+ fail("Failure expected as the client doesn't trust the cert of the service");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ // expected
+ }
+
+ ((java.io.Closeable)port).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testSignatureNegativeClientStreaming() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = ActionTest.class.getResource("client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItSignatureNegativeClientPort2");
+ DoubleItPortType port =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(port, PORT);
+
+ try {
+ port.doubleIt(25);
+ fail("Failure expected as the client doesn't trust the cert of the service");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ // expected
+ }
+
+ ((java.io.Closeable)port).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testSignatureNegativeServer() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = ActionTest.class.getResource("client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItSignatureNegativeServerPort");
+ DoubleItPortType port =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(port, PORT);
+
+ try {
+ port.doubleIt(25);
+ fail("Failure expected as the service doesn't trust the client cert");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ // expected
+ }
+
+ ((java.io.Closeable)port).close();
+ bus.shutdown(true);
+ }
+
+ @org.junit.Test
+ public void testSignatureNegativeServerStreaming() throws Exception {
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = ActionTest.class.getResource("client.xml");
+
+ Bus bus = bf.createBus(busFile.toString());
+ SpringBusFactory.setDefaultBus(bus);
+ SpringBusFactory.setThreadDefaultBus(bus);
+
+ URL wsdl = ActionTest.class.getResource("DoubleItAction.wsdl");
+ Service service = Service.create(wsdl, SERVICE_QNAME);
+ QName portQName = new QName(NAMESPACE, "DoubleItSignatureNegativeServerPort2");
+ DoubleItPortType port =
+ service.getPort(portQName, DoubleItPortType.class);
+ updateAddressPort(port, PORT);
+
+ try {
+ port.doubleIt(25);
+ fail("Failure expected as the service doesn't trust the client cert");
+ } catch (javax.xml.ws.soap.SOAPFaultException ex) {
+ // expected
+ }
+
+ ((java.io.Closeable)port).close();
+ bus.shutdown(true);
+ }
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
index 511155a..e680dce 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/common/KeystorePasswordCallback.java
@@ -46,6 +46,8 @@ public class KeystorePasswordCallback implements CallbackHandler {
passwords.put("6e0e88f36ebb8744d470f62f604d03ea4ebe5094", "password");
passwords.put("wss40rev", "security");
passwords.put("morpit", "password");
+ passwords.put("myclientkey", "ckpass");
+ passwords.put("myservicekey", "skpass");
}
/**
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/resources/bethal.properties
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/bethal.properties b/systests/ws-security/src/test/resources/bethal.properties
new file mode 100644
index 0000000..7356fc5
--- /dev/null
+++ b/systests/ws-security/src/test/resources/bethal.properties
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+org.apache.wss4j.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.wss4j.crypto.merlin.keystore.type=jks
+org.apache.wss4j.crypto.merlin.keystore.password=password
+org.apache.wss4j.crypto.merlin.keystore.alias=bethal
+org.apache.wss4j.crypto.merlin.keystore.file=keys/Bethal.jks
+
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
index dcb40d4..eca0182 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/DoubleItAction.wsdl
@@ -66,6 +66,18 @@
<wsdl:port name="DoubleItEncryptionPort" binding="tns:DoubleItNoSecurityBinding">
<soap:address location="http://localhost:9001/DoubleItEncryption"/>
</wsdl:port>
+ <wsdl:port name="DoubleItSignatureNegativeClientPort" binding="tns:DoubleItNoSecurityBinding">
+ <soap:address location="http://localhost:9001/DoubleItSignatureNegativeClient"/>
+ </wsdl:port>
+ <wsdl:port name="DoubleItSignatureNegativeClientPort2" binding="tns:DoubleItNoSecurityBinding">
+ <soap:address location="http://localhost:9001/DoubleItSignatureNegativeClient2"/>
+ </wsdl:port>
+ <wsdl:port name="DoubleItSignatureNegativeServerPort" binding="tns:DoubleItNoSecurityBinding">
+ <soap:address location="http://localhost:9001/DoubleItSignatureNegativeServer"/>
+ </wsdl:port>
+ <wsdl:port name="DoubleItSignatureNegativeServerPort2" binding="tns:DoubleItNoSecurityBinding">
+ <soap:address location="http://localhost:9001/DoubleItSignatureNegativeServer2"/>
+ </wsdl:port>
</wsdl:service>
</wsdl:definitions>
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/client.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/client.xml
index ad76afe..8b2829d 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/client.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/client.xml
@@ -231,4 +231,108 @@
</jaxws:inInterceptors>
</jaxws:client>
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignatureNegativeClientPort" createdFromAPI="true">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="bethal"/>
+ <entry key="signaturePropFile" value="bethal.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="bethal.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:client>
+
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignatureNegativeClientPort2" createdFromAPI="true">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JStaxOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="bethal"/>
+ <entry key="signaturePropFile" value="bethal.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JStaxInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="bethal.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:client>
+
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignatureNegativeServerPort" createdFromAPI="true">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="bethal"/>
+ <entry key="signaturePropFile" value="bethal.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="truststore.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:client>
+
+ <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSignatureNegativeServerPort2" createdFromAPI="true">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="bethal"/>
+ <entry key="signaturePropFile" value="bethal.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="truststore.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:client>
+
</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
index a336df4..8b363b1 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/action/server.xml
@@ -169,4 +169,108 @@
</jaxws:inInterceptors>
</jaxws:endpoint>
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SignatureNegativeClient" address="http://localhost:${testutil.ports.action.Server}/DoubleItSignatureNegativeClient" serviceName="s:DoubleItService" endpointName="s:DoubleItSignatureNegativeClientPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" wsdlLocation="org/apache/cxf/systest/ws/action/DoubleItAction.wsdl">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="morpit"/>
+ <entry key="signaturePropFile" value="morpit.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="truststore.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SignatureNegativeClient2" address="http://localhost:${testutil.ports.action.Server}/DoubleItSignatureNegativeClient2" serviceName="s:DoubleItService" endpointName="s:DoubleItSignatureNegativeClientPort2" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" wsdlLocation="org/apache/cxf/systest/ws/action/DoubleItAction.wsdl">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="morpit"/>
+ <entry key="signaturePropFile" value="morpit.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="truststore.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SignatureNegativeServer" address="http://localhost:${testutil.ports.action.Server}/DoubleItSignatureNegativeServer" serviceName="s:DoubleItService" endpointName="s:DoubleItSignatureNegativeServerPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" wsdlLocation="org/apache/cxf/systest/ws/action/DoubleItAction.wsdl">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="morpit"/>
+ <entry key="signaturePropFile" value="morpit.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="morpit.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
+ <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SignatureNegativeServer2" address="http://localhost:${testutil.ports.action.Server}/DoubleItSignatureNegativeServer2" serviceName="s:DoubleItService" endpointName="s:DoubleItSignatureNegativeServerPort2" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl" wsdlLocation="org/apache/cxf/systest/ws/action/DoubleItAction.wsdl">
+ <jaxws:outInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JStaxOutInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureUser" value="morpit"/>
+ <entry key="signaturePropFile" value="morpit.properties"/>
+ <entry key="signatureKeyIdentifier" value="DirectReference"/>
+ <entry key="passwordCallbackClass" value="org.apache.cxf.systest.ws.common.KeystorePasswordCallback"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:outInterceptors>
+ <jaxws:inInterceptors>
+ <bean class="org.apache.cxf.ws.security.wss4j.WSS4JStaxInInterceptor">
+ <constructor-arg>
+ <map>
+ <entry key="action" value="Signature"/>
+ <entry key="signatureVerificationPropFile" value="morpit.properties"/>
+ </map>
+ </constructor-arg>
+ </bean>
+ </jaxws:inInterceptors>
+ </jaxws:endpoint>
+
</beans>
http://git-wip-us.apache.org/repos/asf/cxf/blob/f05a4156/systests/ws-security/src/test/resources/truststore.properties
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/truststore.properties b/systests/ws-security/src/test/resources/truststore.properties
new file mode 100644
index 0000000..170389a
--- /dev/null
+++ b/systests/ws-security/src/test/resources/truststore.properties
@@ -0,0 +1,23 @@
+#
+# 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.
+#
+org.apache.wss4j.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.wss4j.crypto.merlin.keystore.type=jks
+org.apache.wss4j.crypto.merlin.keystore.password=password
+org.apache.wss4j.crypto.merlin.keystore.file=keys/Truststore.jks
+
[4/5] cxf git commit: Fixing tests
Posted by co...@apache.org.
Fixing tests
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/e632d680
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/e632d680
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/e632d680
Branch: refs/heads/3.1.x-fixes
Commit: e632d68027186cecd1e45261bdb250f32019c013
Parents: af69b53
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 13:10:51 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 13:13:42 2017 +0100
----------------------------------------------------------------------
.../jaxrs/security/xml/JAXRSXmlSecTest.java | 26 ++++++++------------
1 file changed, 10 insertions(+), 16 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/e632d680/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
index 94084a6..3d55f31 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
@@ -279,7 +279,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
if (!useKeyInfo) {
sigInInterceptor.setSignatureVerificationAlias("alice");
}
- bean.getInInterceptors().add(sigInInterceptor);
+ bean.setProvider(sigInInterceptor);
} else {
XmlSigOutInterceptor sigOutInterceptor = new XmlSigOutInterceptor();
if (enveloping) {
@@ -295,19 +295,13 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
WebClient wc = bean.createWebClient();
WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
- try {
- Book book;
- if (!fromResponse) {
- book = wc.post(new Book("CXF", 126L), Book.class);
- } else {
- book = wc.post(new Book("CXF", 126L)).readEntity(Book.class);
- }
- assertEquals(126L, book.getId());
- } catch (WebApplicationException ex) {
- fail(ex.getMessage());
- } catch (ProcessingException ex) {
- assertTrue(ex.getCause() instanceof BadRequestException);
+ Book book;
+ if (!fromResponse) {
+ book = wc.post(new Book("CXF", 126L), Book.class);
+ } else {
+ book = wc.post(new Book("CXF", 126L)).readEntity(Book.class);
}
+ assertEquals(126L, book.getId());
}
@Test
@@ -336,7 +330,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
XmlSecInInterceptor sigInInterceptor = new XmlSecInInterceptor();
sigInInterceptor.setRequireSignature(true);
- bean.getInInterceptors().add(sigInInterceptor);
+ bean.setProvider(sigInInterceptor);
} else {
XmlSigOutInterceptor sigOutInterceptor = new XmlSigOutInterceptor();
bean.getOutInterceptors().add(sigOutInterceptor);
@@ -381,7 +375,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
XmlSecInInterceptor sigInInterceptor = new XmlSecInInterceptor();
sigInInterceptor.setRequireSignature(true);
- bean.getInInterceptors().add(sigInInterceptor);
+ bean.setProvider(sigInInterceptor);
} else {
XmlSigOutInterceptor sigOutInterceptor = new XmlSigOutInterceptor();
bean.getOutInterceptors().add(sigOutInterceptor);
@@ -577,7 +571,7 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
XmlSecInInterceptor encInInterceptor = new XmlSecInInterceptor();
encInInterceptor.setRequireEncryption(true);
- bean.getInInterceptors().add(encInInterceptor);
+ bean.setProvider(encInInterceptor);
} else {
if (sign) {
bean.getOutInterceptors().add(new XmlSigOutInterceptor());
[3/5] cxf git commit: Adding some negative tests for trust
verification for rs-security
Posted by co...@apache.org.
Adding some negative tests for trust verification for rs-security
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/af69b53d
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/af69b53d
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/af69b53d
Branch: refs/heads/3.1.x-fixes
Commit: af69b53d8460c7c80546afb8ae56dd086a807a6f
Parents: f05a415
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Tue Mar 28 13:04:16 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Tue Mar 28 13:13:41 2017 +0100
----------------------------------------------------------------------
.../security/xml/AbstractXmlSecInHandler.java | 6 +-
.../rs/security/xml/XmlSecInInterceptor.java | 20 ++---
.../security/saml/KeystorePasswordCallback.java | 4 +
.../jaxrs/security/xml/JAXRSXmlSecTest.java | 90 ++++++++++++++++++++
.../systest/jaxrs/security/bethal.properties | 24 ++++++
.../systest/jaxrs/security/morpit.properties | 21 +++++
.../jaxrs/security/morpittrust.properties | 23 +++++
.../cxf/systest/jaxrs/security/xml/server.xml | 32 +++++++
.../systest/jaxrs/security/xml/stax-server.xml | 34 +++++++-
9 files changed, 242 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecInHandler.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecInHandler.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecInHandler.java
index 8d79b1c..27bc803 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecInHandler.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/AbstractXmlSecInHandler.java
@@ -96,7 +96,11 @@ public abstract class AbstractXmlSecInHandler {
}
protected void throwFault(String error, Exception ex) {
- LOG.warning(error);
+ StringBuilder log = new StringBuilder(error);
+ if (ex != null) {
+ log = log.append(" - ").append(ex.getMessage());
+ }
+ LOG.warning(log.toString());
Response response = JAXRSUtils.toResponseBuilder(400).entity(error).build();
throw ExceptionUtils.toBadRequestException(null, response);
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
index 19a7457..3341793 100644
--- a/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
+++ b/rt/rs/security/xml/src/main/java/org/apache/cxf/rs/security/xml/XmlSecInInterceptor.java
@@ -106,9 +106,9 @@ public class XmlSecInInterceptor extends AbstractPhaseInterceptor<Message> imple
message.getInterceptorChain().add(
new StaxActionInInterceptor(requireSignature, requireEncryption));
}
-
+
private void prepareMessage(Message inMsg) throws Fault {
-
+
XMLStreamReader originalXmlStreamReader = inMsg.getContent(XMLStreamReader.class);
if (originalXmlStreamReader == null) {
InputStream is = inMsg.getContent(InputStream.class);
@@ -147,7 +147,7 @@ public class XmlSecInInterceptor extends AbstractPhaseInterceptor<Message> imple
return "GET".equals(method) && !MessageUtils.isRequestor(message);
}
-
+
private void configureDecryptionKeys(Message message, XMLSecurityProperties properties)
throws IOException,
UnsupportedCallbackException, WSSecurityException {
@@ -311,8 +311,8 @@ public class XmlSecInInterceptor extends AbstractPhaseInterceptor<Message> imple
new TrustValidator().validateTrust(sigCrypto, cert, publicKey,
getSubjectContraints(msg));
} catch (WSSecurityException e) {
- throw new XMLSecurityException("empty", new Object[] {"Error during Signature Trust "
- + "validation: " + e.getMessage()});
+ String error = "Signature validation failed";
+ throw new XMLSecurityException("empty", new Object[] {error});
}
if (persistSignature) {
@@ -408,19 +408,19 @@ public class XmlSecInInterceptor extends AbstractPhaseInterceptor<Message> imple
@Override
public Object aroundReadFrom(ReaderInterceptorContext ctx) throws IOException, WebApplicationException {
Message message = ((ReaderInterceptorContextImpl)ctx).getMessage();
-
+
if (isServerGet(message)) {
- return ctx.proceed();
+ return ctx.proceed();
} else {
prepareMessage(message);
Object object = ctx.proceed();
- new StaxActionInInterceptor(requireSignature,
+ new StaxActionInInterceptor(requireSignature,
requireEncryption).handleMessage(message);
return object;
}
-
+
}
-
+
/**
* This interceptor handles parsing the StaX results (events) + checks to see whether the
* required (if any) Actions (signature or encryption) were fulfilled.
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/KeystorePasswordCallback.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/KeystorePasswordCallback.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/KeystorePasswordCallback.java
index 3103aad..099bc4e 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/KeystorePasswordCallback.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/saml/KeystorePasswordCallback.java
@@ -46,6 +46,10 @@ public class KeystorePasswordCallback implements CallbackHandler {
pc.setPassword("password");
} else if ("bob".equals(pc.getIdentifier())) {
pc.setPassword("password");
+ } else if ("morpit".equals(pc.getIdentifier())) {
+ pc.setPassword("password");
+ } else if ("bethal".equals(pc.getIdentifier())) {
+ pc.setPassword("password");
} else {
pc.setPassword("abcd!1234");
}
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
index b1c42d8..94084a6 100644
--- a/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
+++ b/systests/rs-security/src/test/java/org/apache/cxf/systest/jaxrs/security/xml/JAXRSXmlSecTest.java
@@ -311,6 +311,96 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
}
@Test
+ public void testSignatureNegativeServer() throws Exception {
+ String address = "https://localhost:" + test.port + "/xmlsignegativeserver/bookstore/books";
+
+ JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
+ bean.setAddress(address);
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = JAXRSXmlSecTest.class.getResource("client.xml");
+ Bus springBus = bf.createBus(busFile.toString());
+ bean.setBus(springBus);
+
+ Map<String, Object> properties = new HashMap<>();
+ properties.put("security.callback-handler",
+ "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+ properties.put("security.signature.username", "bethal");
+ properties.put("security.signature.properties",
+ "org/apache/cxf/systest/jaxrs/security/bethal.properties");
+ bean.setProperties(properties);
+ if (test.streaming) {
+ XmlSecOutInterceptor sigOutInterceptor = new XmlSecOutInterceptor();
+ sigOutInterceptor.setSignRequest(true);
+ bean.getOutInterceptors().add(sigOutInterceptor);
+
+ XmlSecInInterceptor sigInInterceptor = new XmlSecInInterceptor();
+ sigInInterceptor.setRequireSignature(true);
+ bean.getInInterceptors().add(sigInInterceptor);
+ } else {
+ XmlSigOutInterceptor sigOutInterceptor = new XmlSigOutInterceptor();
+ bean.getOutInterceptors().add(sigOutInterceptor);
+
+ XmlSigInInterceptor sigInInterceptor = new XmlSigInInterceptor();
+ bean.getInInterceptors().add(sigInInterceptor);
+ }
+
+ WebClient wc = bean.createWebClient();
+ WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
+ try {
+ wc.post(new Book("CXF", 126L), Book.class);
+ fail("Failure expected on signature trust failure");
+ } catch (WebApplicationException ex) {
+ assertTrue(ex.getMessage().contains("400 Bad Request"));
+ }
+ }
+
+ @Test
+ public void testSignatureNegativeClient() throws Exception {
+ String address = "https://localhost:" + test.port + "/xmlsignegativeclient/bookstore/books";
+
+ JAXRSClientFactoryBean bean = new JAXRSClientFactoryBean();
+ bean.setAddress(address);
+
+ SpringBusFactory bf = new SpringBusFactory();
+ URL busFile = JAXRSXmlSecTest.class.getResource("client.xml");
+ Bus springBus = bf.createBus(busFile.toString());
+ bean.setBus(springBus);
+
+ Map<String, Object> properties = new HashMap<>();
+ properties.put("security.callback-handler",
+ "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
+ properties.put("security.signature.username", "bethal");
+ properties.put("security.signature.properties",
+ "org/apache/cxf/systest/jaxrs/security/bethal.properties");
+ bean.setProperties(properties);
+ if (test.streaming) {
+ XmlSecOutInterceptor sigOutInterceptor = new XmlSecOutInterceptor();
+ sigOutInterceptor.setSignRequest(true);
+ bean.getOutInterceptors().add(sigOutInterceptor);
+
+ XmlSecInInterceptor sigInInterceptor = new XmlSecInInterceptor();
+ sigInInterceptor.setRequireSignature(true);
+ bean.getInInterceptors().add(sigInInterceptor);
+ } else {
+ XmlSigOutInterceptor sigOutInterceptor = new XmlSigOutInterceptor();
+ bean.getOutInterceptors().add(sigOutInterceptor);
+
+ XmlSigInInterceptor sigInInterceptor = new XmlSigInInterceptor();
+ bean.getInInterceptors().add(sigInInterceptor);
+ }
+
+ WebClient wc = bean.createWebClient();
+ WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
+ try {
+ wc.post(new Book("CXF", 126L), Book.class);
+ fail("Failure expected on signature trust failure");
+ } catch (ProcessingException ex) {
+ assertTrue(ex.getCause() instanceof BadRequestException);
+ }
+ }
+
+ @Test
public void testPostEncryptedBook() throws Exception {
String address = "https://localhost:" + test.port + "/xmlenc/bookstore/books";
Map<String, Object> properties = new HashMap<String, Object>();
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/bethal.properties
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/bethal.properties b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/bethal.properties
new file mode 100644
index 0000000..7356fc5
--- /dev/null
+++ b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/bethal.properties
@@ -0,0 +1,24 @@
+#
+# 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.
+#
+org.apache.wss4j.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.wss4j.crypto.merlin.keystore.type=jks
+org.apache.wss4j.crypto.merlin.keystore.password=password
+org.apache.wss4j.crypto.merlin.keystore.alias=bethal
+org.apache.wss4j.crypto.merlin.keystore.file=keys/Bethal.jks
+
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpit.properties
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpit.properties b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpit.properties
new file mode 100644
index 0000000..7cf81d6
--- /dev/null
+++ b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpit.properties
@@ -0,0 +1,21 @@
+# 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.
+org.apache.wss4j.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.wss4j.crypto.merlin.keystore.type=jks
+org.apache.wss4j.crypto.merlin.keystore.password=password
+org.apache.wss4j.crypto.merlin.keystore.alias=morpit
+org.apache.wss4j.crypto.merlin.keystore.file=keys/Morpit.jks
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpittrust.properties
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpittrust.properties b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpittrust.properties
new file mode 100644
index 0000000..0056c7d
--- /dev/null
+++ b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/morpittrust.properties
@@ -0,0 +1,23 @@
+# 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.
+org.apache.wss4j.crypto.provider=org.apache.wss4j.common.crypto.Merlin
+org.apache.wss4j.crypto.merlin.keystore.type=jks
+org.apache.wss4j.crypto.merlin.keystore.password=password
+org.apache.wss4j.crypto.merlin.keystore.alias=morpit
+org.apache.wss4j.crypto.merlin.keystore.file=keys/Morpit.jks
+org.apache.wss4j.crypto.merlin.truststore.password=password
+org.apache.wss4j.crypto.merlin.truststore.file=keys/Truststore.jks
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/server.xml
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/server.xml b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/server.xml
index d3c70c0..a1aaf40 100644
--- a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/server.xml
+++ b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/server.xml
@@ -96,6 +96,38 @@ under the License.
</jaxrs:properties>
</jaxrs:server>
+ <jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec}/xmlsignegativeserver">
+ <jaxrs:serviceBeans>
+ <ref bean="serviceBean"/>
+ </jaxrs:serviceBeans>
+ <jaxrs:providers>
+ <ref bean="xmlSigInHandler"/>
+ </jaxrs:providers>
+ <jaxrs:outInterceptors>
+ <ref bean="xmlSigOutHandler"/>
+ </jaxrs:outInterceptors>
+ <jaxrs:properties>
+ <entry key="security.callback-handler" value="org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback"/>
+ <entry key="security.signature.properties" value="org/apache/cxf/systest/jaxrs/security/morpit.properties"/>
+ </jaxrs:properties>
+ </jaxrs:server>
+
+ <jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec}/xmlsignegativeclient">
+ <jaxrs:serviceBeans>
+ <ref bean="serviceBean"/>
+ </jaxrs:serviceBeans>
+ <jaxrs:providers>
+ <ref bean="xmlSigInHandler"/>
+ </jaxrs:providers>
+ <jaxrs:outInterceptors>
+ <ref bean="xmlSigOutHandler"/>
+ </jaxrs:outInterceptors>
+ <jaxrs:properties>
+ <entry key="security.callback-handler" value="org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback"/>
+ <entry key="security.signature.properties" value="org/apache/cxf/systest/jaxrs/security/morpittrust.properties"/>
+ </jaxrs:properties>
+ </jaxrs:server>
+
<jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec}/xmlsigconstraints">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
http://git-wip-us.apache.org/repos/asf/cxf/blob/af69b53d/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/stax-server.xml
----------------------------------------------------------------------
diff --git a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/stax-server.xml b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/stax-server.xml
index 9ba3bce..2281c60 100644
--- a/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/stax-server.xml
+++ b/systests/rs-security/src/test/resources/org/apache/cxf/systest/jaxrs/security/xml/stax-server.xml
@@ -116,7 +116,39 @@ under the License.
</jaxrs:properties>
</jaxrs:server>
- <jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec-stax}/xmlsigconstraints">
+ <jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec-stax}/xmlsignegativeserver">
+ <jaxrs:serviceBeans>
+ <ref bean="serviceBean"/>
+ </jaxrs:serviceBeans>
+ <jaxrs:inInterceptors>
+ <ref bean="xmlSigInHandler"/>
+ </jaxrs:inInterceptors>
+ <jaxrs:outInterceptors>
+ <ref bean="xmlSigOutHandler"/>
+ </jaxrs:outInterceptors>
+ <jaxrs:properties>
+ <entry key="security.callback-handler" value="org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback"/>
+ <entry key="security.signature.properties" value="org/apache/cxf/systest/jaxrs/security/morpit.properties"/>
+ </jaxrs:properties>
+ </jaxrs:server>
+
+ <jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec-stax}/xmlsignegativeclient">
+ <jaxrs:serviceBeans>
+ <ref bean="serviceBean"/>
+ </jaxrs:serviceBeans>
+ <jaxrs:inInterceptors>
+ <ref bean="xmlSigInHandler"/>
+ </jaxrs:inInterceptors>
+ <jaxrs:outInterceptors>
+ <ref bean="xmlSigOutHandler"/>
+ </jaxrs:outInterceptors>
+ <jaxrs:properties>
+ <entry key="security.callback-handler" value="org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback"/>
+ <entry key="security.signature.properties" value="org/apache/cxf/systest/jaxrs/security/morpittrust.properties"/>
+ </jaxrs:properties>
+ </jaxrs:server>
+
+ <jaxrs:server address="https://localhost:${testutil.ports.jaxrs-xmlsec-stax}/xmlsigconstraints">
<jaxrs:serviceBeans>
<ref bean="serviceBean"/>
</jaxrs:serviceBeans>