cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/3] cxf git commit: Fixing merge
Date Wed, 29 Mar 2017 11:11:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes c806cc348 -> 0cab8b7fe


Fixing merge


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

Branch: refs/heads/3.0.x-fixes
Commit: 0cab8b7fe8d13f4c57fe4f062465811ea2b12ea7
Parents: 8623596
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Wed Mar 29 12:09:47 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Wed Mar 29 12:09:53 2017 +0100

----------------------------------------------------------------------
 .../jaxrs/security/xml/JAXRSXmlSecTest.java     | 55 ++------------------
 .../cxf/systest/jaxrs/security/xml/server.xml   |  4 +-
 2 files changed, 6 insertions(+), 53 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0cab8b7f/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 11ce888..684f1b6 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
@@ -360,8 +360,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase {
     }
 
     @Test
-<<<<<<< HEAD
-=======
     public void testUnsignedServerResponse() throws Exception {
         if (STAX_PORT.equals(test.port)) {
             // We are only testing the client here
@@ -377,11 +375,11 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase
{
         Bus springBus = bf.createBus(busFile.toString());
         bean.setBus(springBus);
 
-        Map<String, Object> properties = new HashMap<>();
-        properties.put(SecurityConstants.CALLBACK_HANDLER,
+        Map<String, Object> properties = new HashMap<String, Object>();
+        properties.put("ws-security.callback-handler",
                        "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
-        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
+        properties.put("ws-security.signature.username", "alice");
+        properties.put("ws-security.signature.properties",
                        "org/apache/cxf/systest/jaxrs/security/alice.properties");
         bean.setProperties(properties);
         if (test.streaming) {
@@ -411,51 +409,6 @@ public class JAXRSXmlSecTest extends AbstractBusClientServerTestBase
{
     }
 
     @Test
-    public void testPostBookWithEnvelopedSigKeyName() throws Exception {
-        // This test only applies to StAX - see CXF-7084
-        if (!test.streaming || !STAX_PORT.equals(test.port)) {
-            return;
-        }
-        String address = "https://localhost:" + test.port + "/xmlsigkeyname/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(SecurityConstants.CALLBACK_HANDLER,
-                       "org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback");
-        properties.put(SecurityConstants.SIGNATURE_USERNAME, "alice");
-        properties.put(SecurityConstants.SIGNATURE_PROPERTIES,
-                       "org/apache/cxf/systest/jaxrs/security/alice.properties");
-        bean.setProperties(properties);
-        XmlSecOutInterceptor sigOutInterceptor = new XmlSecOutInterceptor();
-        sigOutInterceptor.setSignRequest(true);
-        sigOutInterceptor.setKeyInfoMustBeAvailable(true);
-
-        SignatureProperties sigProps = new SignatureProperties();
-        sigProps.setSignatureKeyName("alice-kn");
-        sigProps.setSignatureKeyIdType("KeyName");
-        sigOutInterceptor.setSignatureProperties(sigProps);
-
-        bean.getOutInterceptors().add(sigOutInterceptor);
-
-        XmlSecInInterceptor sigInInterceptor = new XmlSecInInterceptor();
-        sigInInterceptor.setRequireSignature(true);
-        bean.setProvider(sigInInterceptor);
-
-        WebClient wc = bean.createWebClient();
-        WebClient.getConfig(wc).getHttpConduit().getClient().setReceiveTimeout(10000000L);
-        Book book = wc.post(new Book("CXF", 126L), Book.class);
-        assertEquals(126L, book.getId());
-    }
-
-    @Test
->>>>>>> 533daf2... Add another test to check that an exception is thrown
if a service response is not signed
     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/0cab8b7f/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 f04497f..ab2ac7c 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
@@ -136,8 +136,8 @@ under the License.
             <ref bean="xmlSigInHandler"/>
         </jaxrs:providers>
         <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/alice.properties"/>
+            <entry key="ws-security.callback-handler" value="org.apache.cxf.systest.jaxrs.security.saml.KeystorePasswordCallback"/>
+            <entry key="ws-security.signature.properties" value="org/apache/cxf/systest/jaxrs/security/alice.properties"/>
         </jaxrs:properties>
     </jaxrs:server>
     


Mime
View raw message