cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1532333 - in /cxf/trunk: rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/ services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/ services/sts/systests/basic/src/test/resources/org/...
Date Tue, 15 Oct 2013 13:39:44 GMT
Author: coheigea
Date: Tue Oct 15 13:39:44 2013
New Revision: 1532333

URL: http://svn.apache.org/r1532333
Log:
Adding more streaming STS systests following a fix for WSS-479

Added:
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
    cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxX509SymmetricBindingTest.java
    cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
Modified:
    cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java

Modified: cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java?rev=1532333&r1=1532332&r2=1532333&view=diff
==============================================================================
--- cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
(original)
+++ cxf/trunk/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/StaxSymmetricBindingHandler.java
Tue Oct 15 13:39:44 2013
@@ -58,7 +58,9 @@ import org.apache.wss4j.policy.model.Sym
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
 import org.apache.wss4j.stax.ext.WSSConstants;
+import org.apache.wss4j.stax.securityEvent.SamlTokenSecurityEvent;
 import org.apache.wss4j.stax.securityEvent.WSSecurityEventConstants;
+import org.apache.wss4j.stax.securityToken.WSSecurityTokenConstants;
 import org.apache.xml.security.algorithms.JCEMapper;
 import org.apache.xml.security.exceptions.XMLSecurityException;
 import org.apache.xml.security.stax.ext.SecurePart;
@@ -150,6 +152,11 @@ public class StaxSymmetricBindingHandler
             } else if (encryptionToken instanceof IssuedToken) {
                 tok = getSecurityToken();
                 addIssuedToken((IssuedToken)encryptionToken, tok, false, true);
+                if (tok == null && !isRequestor()) {
+                    org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
+                        findIssuedToken();
+                    tokenId = parseStreamingSecurityToken(securityToken);
+                }
             } else if (encryptionToken instanceof SecureConversationToken
                 || encryptionToken instanceof SecurityContextToken
                 || encryptionToken instanceof SpnegoContextToken) {
@@ -168,7 +175,9 @@ public class StaxSymmetricBindingHandler
                 if (isRequestor()) {
                     tokenId = setupEncryptedKey(encryptionWrapper, encryptionToken);
                 } else {
-                    tokenId = getEncryptedKey();
+                    org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
+                        findEncryptedKeyToken();
+                    tokenId = parseStreamingSecurityToken(securityToken);
                 }
             } else if (encryptionToken instanceof UsernameToken) {
                 policyNotAsserted(sbinding, "UsernameTokens not supported with Symmetric
binding");
@@ -260,6 +269,11 @@ public class StaxSymmetricBindingHandler
                 } else if (sigToken instanceof IssuedToken) {
                     sigTok = getSecurityToken();
                     addIssuedToken((IssuedToken)sigToken, sigTok, false, true);
+                    if (sigTok == null && !isRequestor()) {
+                        org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
+                            findIssuedToken();
+                        sigTokId = parseStreamingSecurityToken(securityToken);
+                    }
                 } else if (sigToken instanceof SecureConversationToken
                     || sigToken instanceof SecurityContextToken
                     || sigToken instanceof SpnegoContextToken) {
@@ -278,7 +292,9 @@ public class StaxSymmetricBindingHandler
                     if (isRequestor()) {
                         sigTokId = setupEncryptedKey(sigAbstractTokenWrapper, sigToken);
                     } else {
-                        sigTokId = getEncryptedKey();
+                        org.apache.xml.security.stax.securityToken.SecurityToken securityToken
= 
+                            findEncryptedKeyToken();
+                        sigTokId = parseStreamingSecurityToken(securityToken);
                     }
                 } else if (sigToken instanceof UsernameToken) {
                     policyNotAsserted(sbinding, "UsernameTokens not supported with Symmetric
binding");
@@ -414,6 +430,8 @@ public class StaxSymmetricBindingHandler
             } else if (recToken.getToken() instanceof KerberosToken && !isRequestor())
{
                 config.put(ConfigurationConstants.ENC_KEY_ID, "KerberosSHA1");
                 config.put(ConfigurationConstants.DERIVED_TOKEN_KEY_ID, "KerberosSHA1");
+            } else if (recToken.getToken() instanceof IssuedToken && !isRequestor())
{
+                config.put(ConfigurationConstants.ENC_KEY_ID, "DirectReference");
             } else {
                 config.put(ConfigurationConstants.ENC_KEY_ID, "EncryptedKeySHA1");
                 if (recToken.getToken().getDerivedKeys() == DerivedKeys.RequireDerivedKeys)
{
@@ -558,28 +576,39 @@ public class StaxSymmetricBindingHandler
         return tempTok.getId();
     }
     
-    private String getEncryptedKey() throws XMLSecurityException {
-        org.apache.xml.security.stax.securityToken.SecurityToken securityToken = 
-            findEncryptedKeyToken();
+    private String parseStreamingSecurityToken(
+        org.apache.xml.security.stax.securityToken.SecurityToken securityToken
+    ) throws XMLSecurityException {
         if (securityToken != null) {
             Date created = new Date();
             Date expires = new Date();
             expires.setTime(created.getTime() + 300000);
-
-            String encryptedKeyID = securityToken.getId();
-            SecurityToken tempTok = new SecurityToken(encryptedKeyID, created, expires);
-            tempTok.setSHA1(securityToken.getSha1Identifier());
+            
+            SecurityToken cachedTok = new SecurityToken(securityToken.getId(), created, expires);
+            cachedTok.setSHA1(securityToken.getSha1Identifier());
+            
+            if (securityToken.getTokenType() != null) {
+                if (securityToken.getTokenType() == WSSecurityTokenConstants.EncryptedKeyToken)
{
+                    cachedTok.setTokenType(WSSConstants.NS_WSS_ENC_KEY_VALUE_TYPE);
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.KerberosToken)
{
+                    cachedTok.setTokenType(WSSConstants.NS_GSS_Kerberos5_AP_REQ);
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml11Token)
{
+                    cachedTok.setTokenType(WSSConstants.NS_SAML11_TOKEN_PROFILE_TYPE);
+                } else if (securityToken.getTokenType() == WSSecurityTokenConstants.Saml20Token)
{
+                    cachedTok.setTokenType(WSSConstants.NS_SAML20_TOKEN_PROFILE_TYPE);
+                }
+            }
             
             for (String key : securityToken.getSecretKey().keySet()) {
                 if (securityToken.getSecretKey().get(key) != null) {
-                    tempTok.setKey(securityToken.getSecretKey().get(key));
-                    tempTok.setSecret(securityToken.getSecretKey().get(key).getEncoded());
+                    cachedTok.setKey(securityToken.getSecretKey().get(key));
+                    cachedTok.setSecret(securityToken.getSecretKey().get(key).getEncoded());
                     break;
                 }
             }
-            getTokenStore().add(tempTok);
+            getTokenStore().add(cachedTok);
 
-            return encryptedKeyID;
+            return cachedTok.getId();
         }
         return null;
         
@@ -610,6 +639,23 @@ public class StaxSymmetricBindingHandler
         return null;
     }
     
+    private org.apache.xml.security.stax.securityToken.SecurityToken 
+    findIssuedToken() throws XMLSecurityException {
+        @SuppressWarnings("unchecked")
+        final List<SecurityEvent> incomingEventList = 
+            (List<SecurityEvent>) message.getExchange().get(SecurityEvent.class.getName()
+ ".in");
+        if (incomingEventList != null) {
+            for (SecurityEvent incomingEvent : incomingEventList) {
+                if (WSSecurityEventConstants.SamlToken == incomingEvent.getSecurityEventType())
{
+                    org.apache.xml.security.stax.securityToken.SecurityToken token = 
+                        ((SamlTokenSecurityEvent)incomingEvent).getSecurityToken();
+                    return token;
+                }
+            }
+        }
+        return null;
+    }
+    
     private KeyGenerator getKeyGenerator(String symEncAlgo) throws WSSecurityException {
         try {
             //

Added: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java?rev=1532333&view=auto
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
(added)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
Tue Oct 15 13:39:44 2013
@@ -0,0 +1,50 @@
+/**
+ * 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.cxf.systest.sts.x509_symmetric;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.testutil.common.AbstractBusTestServerBase;
+
+public class StaxServer extends AbstractBusTestServerBase {
+
+    public StaxServer() {
+
+    }
+
+    protected void run()  {
+        URL busFile = StaxServer.class.getResource("cxf-stax-service.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new StaxServer();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public static void main(String args[]) {
+        new StaxServer().run();
+    }
+}

Added: cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxX509SymmetricBindingTest.java
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxX509SymmetricBindingTest.java?rev=1532333&view=auto
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxX509SymmetricBindingTest.java
(added)
+++ cxf/trunk/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxX509SymmetricBindingTest.java
Tue Oct 15 13:39:44 2013
@@ -0,0 +1,201 @@
+/**
+ * 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.cxf.systest.sts.x509_symmetric;
+
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.BindingProvider;
+import javax.xml.ws.Service;
+
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.cxf.systest.sts.common.SecurityTestUtil;
+import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+
+import org.example.contract.doubleit.DoubleItPortType;
+import org.junit.BeforeClass;
+
+/**
+ * Test the Symmetric binding. The CXF client gets a token from the STS by authenticating
via an
+ * X.509 Cert over the asymmetric binding, and then sends it to the CXF endpoint using 
+ * the symmetric binding.
+ * 
+ * It tests both DOM + StAX clients against the StAX server
+ */
+public class StaxX509SymmetricBindingTest extends AbstractBusClientServerTestBase {
+    
+    static final String STSPORT = allocatePort(STSServer.class);
+    static final String STSPORT2 = allocatePort(STSServer.class, 2);
+    
+    private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
+    private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
+    
+    private static final String PORT = allocatePort(StaxServer.class);
+    
+    private static boolean standalone;
+    
+    @BeforeClass
+    public static void startServers() throws Exception {
+        assertTrue(
+                   "Server failed to launch",
+                   // run the server in the same process
+                   // set this to false to fork
+                   launchServer(StaxServer.class, true)
+        );
+        String deployment = System.getProperty("sts.deployment");
+        if ("standalone".equals(deployment) || deployment == null) {
+            standalone = true;
+            assertTrue(
+                    "Server failed to launch",
+                    // run the server in the same process
+                    // set this to false to fork
+                    launchServer(STSServer.class, true)
+            );
+        }
+    }
+    
+    @org.junit.AfterClass
+    public static void cleanup() throws Exception {
+        SecurityTestUtil.cleanup();
+        stopAllServers();
+    }
+
+    @org.junit.Test
+    public void testX509SAML1() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = StaxX509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+        
+        URL wsdl = StaxX509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML1Port");
+        DoubleItPortType symmetricSaml1Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml1Port, PORT);
+        if (standalone) {
+            TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml1Port, STSPORT2);
+        }
+
+        // DOM
+        doubleIt(symmetricSaml1Port, 25);
+        
+        // Streaming
+        symmetricSaml1Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml1Port, PORT);
+        if (standalone) {
+            TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml1Port, STSPORT);
+        }
+        SecurityTestUtil.enableStreaming(symmetricSaml1Port);
+        doubleIt(symmetricSaml1Port, 45);
+        
+        ((java.io.Closeable)symmetricSaml1Port).close();
+        bus.shutdown(true);
+    }
+
+    @org.junit.Test
+    public void testX509SAML2() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = StaxX509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = StaxX509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML2Port");
+        DoubleItPortType symmetricSaml2Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml2Port, PORT);
+        if (standalone) {
+            TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, STSPORT2);
+        }
+        
+        // DOM
+        doubleIt(symmetricSaml2Port, 30);
+        TokenTestUtils.verifyToken(symmetricSaml2Port);
+        
+        // Streaming
+        symmetricSaml2Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml2Port, PORT);
+        if (standalone) {
+            TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, STSPORT);
+        }
+        SecurityTestUtil.enableStreaming(symmetricSaml2Port);
+        doubleIt(symmetricSaml2Port, 45);
+        
+        ((java.io.Closeable)symmetricSaml2Port).close();
+        bus.shutdown(true);
+    }
+    
+    // TODO See WSS-481 - "Problem with EncryptSignature + EndorsingSupportingTokens"
+    @org.junit.Test
+    @org.junit.Ignore
+    public void testX509SAML2Endorsing() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = StaxX509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = StaxX509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML2EndorsingPort");
+        DoubleItPortType symmetricSaml2Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml2Port, PORT);
+        if (standalone) {
+            TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, STSPORT2);
+        }
+        
+        // DOM
+        doubleIt(symmetricSaml2Port, 30);
+        
+        // Streaming
+        symmetricSaml2Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml2Port, PORT);
+        if (standalone) {
+            TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, STSPORT);
+        }
+        SecurityTestUtil.enableStreaming(symmetricSaml2Port);
+        // doubleIt(symmetricSaml2Port, 45);
+
+        ((java.io.Closeable)symmetricSaml2Port).close();
+        bus.shutdown(true);
+    }
+
+    private static void doubleIt(DoubleItPortType port, int numToDouble) {
+        int resp = port.doubleIt(numToDouble);
+        assertEquals(numToDouble * 2 , resp);
+    }
+}

Added: cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml?rev=1532333&view=auto
==============================================================================
--- cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
(added)
+++ cxf/trunk/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
Tue Oct 15 13:39:44 2013
@@ -0,0 +1,100 @@
+<!--
+ 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.
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:cxf="http://cxf.apache.org/core"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+  xmlns:sec="http://cxf.apache.org/configuration/security"
+  xmlns:http="http://cxf.apache.org/transports/http/configuration"
+  xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
+  xmlns:jaxws="http://cxf.apache.org/jaxws"
+  xsi:schemaLocation="
+            http://cxf.apache.org/core
+            http://cxf.apache.org/schemas/core.xsd
+            http://cxf.apache.org/configuration/security
+            http://cxf.apache.org/schemas/configuration/security.xsd
+            http://cxf.apache.org/jaxws
+            http://cxf.apache.org/schemas/jaxws.xsd
+            http://cxf.apache.org/transports/http/configuration
+            http://cxf.apache.org/schemas/configuration/http-conf.xsd
+            http://cxf.apache.org/transports/http-jetty/configuration
+            http://cxf.apache.org/schemas/configuration/http-jetty.xsd
+            http://www.springframework.org/schema/beans
+            http://www.springframework.org/schema/beans/spring-beans.xsd">
+   
+   <bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"/>
+    
+   <jaxws:endpoint id="doubleitsymmetricsaml1"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItSymmetricSAML1Port"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.StaxServer}/doubleit/services/doubleitsymmetricsaml1"
+      wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+         <entry key="ws-security.saml1.validator">
+            <bean class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
+         </entry>
+         <entry key="ws-security.enable.streaming" value="true"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
+   <jaxws:endpoint id="doubleitsymmetricsaml2"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItSymmetricSAML2Port"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.StaxServer}/doubleit/services/doubleitsymmetricsaml2"
+      wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+         <entry key="ws-security.saml2.validator">
+            <bean class="org.apache.cxf.ws.security.trust.STSTokenValidator"/>
+         </entry>
+         <entry key="ws-security.enable.streaming" value="true"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
+   <jaxws:endpoint id="doubleitsymmetricsaml2endorsing"
+      implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl"
+      endpointName="s:DoubleItSymmetricSAML2EndorsingPort"
+      serviceName="s:DoubleItService"
+      address="http://localhost:${testutil.ports.StaxServer}/doubleit/services/doubleitsymmetricsaml2endorsing"
+      wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl"
+      xmlns:s="http://www.example.org/contract/DoubleIt">
+        
+      <jaxws:properties>
+         <entry key="ws-security.callback-handler" 
+                value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="serviceKeystore.properties"/>
+         <entry key="ws-security.is-bsp-compliant" value="false"/>
+         <entry key="ws-security.enable.streaming" value="true"/>
+      </jaxws:properties> 
+   </jaxws:endpoint>
+   
+</beans>
+



Mime
View raw message