cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject git commit: [CXF-5750, CXF-5751] - Support SpnegoContextTokens with the TransportBinding, Support policy validation for SupportingToken SpnegoContextTokens
Date Mon, 19 May 2014 15:12:24 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 10969ab68 -> 0dcfa2fb5


[CXF-5750,CXF-5751] - Support SpnegoContextTokens with the TransportBinding, Support policy
validation for SupportingToken SpnegoContextTokens


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

Branch: refs/heads/master
Commit: 0dcfa2fb543dd69dfc4a3b7135bc5a93fa130e9a
Parents: 10969ab
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon May 19 16:11:42 2014 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon May 19 16:11:42 2014 +0100

----------------------------------------------------------------------
 .../policyhandlers/AbstractBindingBuilder.java  |   4 +-
 .../policyhandlers/TransportBindingHandler.java |   3 +-
 .../ConcreteSupportingTokenPolicyValidator.java |   4 +-
 .../EncryptedTokenPolicyValidator.java          |   4 +-
 .../EndorsingEncryptedTokenPolicyValidator.java |   4 +-
 .../EndorsingTokenPolicyValidator.java          |   4 +-
 .../SignedEncryptedTokenPolicyValidator.java    |   4 +-
 ...dEndorsingEncryptedTokenPolicyValidator.java |   4 +-
 .../SignedEndorsingTokenPolicyValidator.java    |   4 +-
 .../cxf/systest/ws/spnego/SpnegoTokenTest.java  |  79 +++++++++
 .../cxf/systest/ws/spnego/DoubleItSpnego.wsdl   | 168 +++++++++++++++++++
 .../org/apache/cxf/systest/ws/spnego/client.xml |  23 +++
 .../org/apache/cxf/systest/ws/spnego/server.xml |  37 ++++
 .../cxf/systest/ws/spnego/stax-server.xml       |  39 +++++
 14 files changed, 372 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
index f87c9fd..0a6a075 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/AbstractBindingBuilder.java
@@ -132,6 +132,7 @@ import org.apache.wss4j.policy.model.SecureConversationToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
 import org.apache.wss4j.policy.model.SignedElements;
 import org.apache.wss4j.policy.model.SignedParts;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.SymmetricBinding;
 import org.apache.wss4j.policy.model.UsernameToken;
@@ -418,7 +419,8 @@ public abstract class AbstractBindingBuilder extends AbstractCommonBindingHandle
             } else if (token instanceof IssuedToken
                     || token instanceof SecureConversationToken
                     || token instanceof SecurityContextToken
-                    || token instanceof KerberosToken) {
+                    || token instanceof KerberosToken
+                    || token instanceof SpnegoContextToken) {
                 //ws-trust/ws-sc stuff.......
                 SecurityToken secToken = getSecurityToken();
                 if (secToken == null) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
index 366cd2a..694d13b 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyhandlers/TransportBindingHandler.java
@@ -107,7 +107,8 @@ public class TransportBindingHandler extends AbstractBindingBuilder {
                     utBuilder.prepare(saaj.getSOAPPart());
                     utBuilder.appendToHeader(secHeader);
                 }
-            } else if (token instanceof IssuedToken || token instanceof KerberosToken) {
+            } else if (token instanceof IssuedToken || token instanceof KerberosToken
+                || token instanceof SpnegoContextToken) {
                 SecurityToken secTok = getSecurityToken();
                 
                 if (isTokenRequired(token.getIncludeTokenType())) {

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
index 540be81..b332486 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/ConcreteSupportingTokenPolicyValidator.java
@@ -33,6 +33,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -103,7 +104,8 @@ public class ConcreteSupportingTokenPolicyValidator extends AbstractSupportingTo
                     if (!processKeyValueTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
index c2ffab9..2ebb47c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EncryptedTokenPolicyValidator.java
@@ -33,6 +33,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -99,7 +100,8 @@ public class EncryptedTokenPolicyValidator extends AbstractSupportingTokenPolicy
                     if (!processKeyValueTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
index 955af8c..bb8b89f 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingEncryptedTokenPolicyValidator.java
@@ -34,6 +34,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -104,7 +105,8 @@ public class EndorsingEncryptedTokenPolicyValidator extends AbstractSupportingTo
                     if (!processUsernameTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
index b8ab36c..af09a72 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/EndorsingTokenPolicyValidator.java
@@ -34,6 +34,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -104,7 +105,8 @@ public class EndorsingTokenPolicyValidator extends AbstractSupportingTokenPolicy
                     if (!processUsernameTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
index 7c56b95..c40bae3 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEncryptedTokenPolicyValidator.java
@@ -33,6 +33,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -101,7 +102,8 @@ public class SignedEncryptedTokenPolicyValidator extends AbstractSupportingToken
                     if (!processKeyValueTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
index e125539..8ecc843 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingEncryptedTokenPolicyValidator.java
@@ -34,6 +34,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -109,7 +110,8 @@ public class SignedEndorsingEncryptedTokenPolicyValidator extends AbstractSuppor
                     if (!processUsernameTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
----------------------------------------------------------------------
diff --git a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
index 433ed00..9077e7c 100644
--- a/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
+++ b/rt/ws/security/src/main/java/org/apache/cxf/ws/security/wss4j/policyvalidators/SignedEndorsingTokenPolicyValidator.java
@@ -34,6 +34,7 @@ import org.apache.wss4j.policy.model.KerberosToken;
 import org.apache.wss4j.policy.model.KeyValueToken;
 import org.apache.wss4j.policy.model.SamlToken;
 import org.apache.wss4j.policy.model.SecurityContextToken;
+import org.apache.wss4j.policy.model.SpnegoContextToken;
 import org.apache.wss4j.policy.model.SupportingTokens;
 import org.apache.wss4j.policy.model.UsernameToken;
 import org.apache.wss4j.policy.model.X509Token;
@@ -108,7 +109,8 @@ public class SignedEndorsingTokenPolicyValidator extends AbstractSupportingToken
                     if (!processUsernameTokens()) {
                         processingFailed = true;
                     }
-                } else if (token instanceof SecurityContextToken) {
+                } else if (token instanceof SecurityContextToken 
+                    || token instanceof SpnegoContextToken) {
                     if (!processSCTokens()) {
                         processingFailed = true;
                     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
index d2c5062..6eb8802 100644
--- a/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
+++ b/systests/ws-security/src/test/java/org/apache/cxf/systest/ws/spnego/SpnegoTokenTest.java
@@ -50,7 +50,9 @@ import org.junit.runners.Parameterized.Parameters;
 @RunWith(value = org.junit.runners.Parameterized.class)
 public class SpnegoTokenTest extends AbstractBusClientServerTestBase {
     static final String PORT = allocatePort(Server.class);
+    static final String PORT2 = allocatePort(Server.class, 2);
     static final String STAX_PORT = allocatePort(StaxServer.class);
+    static final String STAX_PORT2 = allocatePort(StaxServer.class, 2);
 
     private static final String NAMESPACE = "http://www.example.org/contract/DoubleIt";
     private static final QName SERVICE_QNAME = new QName(NAMESPACE, "DoubleItService");
@@ -193,4 +195,81 @@ public class SpnegoTokenTest extends AbstractBusClientServerTestBase
{
         bus.shutdown(true);
     }
     
+    @org.junit.Test
+    public void testSpnegoOverTransport() throws Exception {
+        
+        if (!unrestrictedPoliciesInstalled) {
+            return;
+        }
+        
+        if (test.isStreaming()) {
+            // TODO Supporting streaming Snego outbound
+            return;
+        }
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = SpnegoTokenTest.class.getResource("client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = SpnegoTokenTest.class.getResource("DoubleItSpnego.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSpnegoTransportPort");
+        DoubleItPortType spnegoPort = 
+                service.getPort(portQName, DoubleItPortType.class);
+        String portNumber = PORT2;
+        if (STAX_PORT.equals(test.getPort())) {
+            portNumber = STAX_PORT2;
+        }
+        updateAddressPort(spnegoPort, portNumber);
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(spnegoPort);
+        }
+        
+        spnegoPort.doubleIt(25);
+        
+        ((java.io.Closeable)spnegoPort).close();
+    }
+    
+    @org.junit.Test
+    public void testSpnegoOverTransportEndorsing() throws Exception {
+        
+        if (!unrestrictedPoliciesInstalled) {
+            return;
+        }
+        
+        if (test.isStreaming()) {
+            // TODO Supporting streaming Snego outbound
+            return;
+        }
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = SpnegoTokenTest.class.getResource("client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = SpnegoTokenTest.class.getResource("DoubleItSpnego.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSpnegoTransportEndorsingPort");
+        DoubleItPortType spnegoPort = 
+                service.getPort(portQName, DoubleItPortType.class);
+        String portNumber = PORT2;
+        if (STAX_PORT.equals(test.getPort())) {
+            portNumber = STAX_PORT2;
+        }
+        updateAddressPort(spnegoPort, portNumber);
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(spnegoPort);
+        }
+        
+        spnegoPort.doubleIt(25);
+        
+        ((java.io.Closeable)spnegoPort).close();
+    }
 }

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl
index 898d565..c744437 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl
@@ -73,6 +73,42 @@
             </wsdl:fault>
         </wsdl:operation>
     </wsdl:binding>
+    <wsdl:binding name="DoubleItSpnegoTransportBinding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItSpnegoTransportPolicy"/>
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction=""/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy"/>
+            </wsdl:output>
+            <wsdl:fault name="DoubleItFault">
+                <soap:body use="literal" name="DoubleItFault"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItSpnegoTransportEndorsingBinding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItSpnegoTransportEndorsingPolicy"/>
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        <wsdl:operation name="DoubleIt">
+            <soap:operation soapAction=""/>
+            <wsdl:input>
+                <soap:body use="literal"/>
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Input_Policy"/>
+            </wsdl:input>
+            <wsdl:output>
+                <soap:body use="literal"/>
+                <wsp:PolicyReference URI="#DoubleItBinding_DoubleIt_Output_Policy"/>
+            </wsdl:output>
+            <wsdl:fault name="DoubleItFault">
+                <soap:body use="literal" name="DoubleItFault"/>
+            </wsdl:fault>
+        </wsdl:operation>
+    </wsdl:binding>
     <wsdl:service name="DoubleItService">
         <wsdl:port name="DoubleItSpnegoSymmetricPort" binding="tns:DoubleItSpnegoSymmetricProtectionBinding">
             <soap:address location="http://localhost:9001/DoubleItSpnegoSymmetric"/>
@@ -83,6 +119,12 @@
         <wsdl:port name="DoubleItSpnegoSymmetricEncryptBeforeSigningPort" binding="tns:DoubleItSpnegoSymmetricProtectionEncryptBeforeSigningBinding">
             <soap:address location="http://localhost:9001/DoubleItSpnegoSymmetricEncryptBeforeSigning"/>
         </wsdl:port>
+        <wsdl:port name="DoubleItSpnegoTransportPort" binding="tns:DoubleItSpnegoTransportBinding">
+            <soap:address location="https://localhost:9001/DoubleItSpnegoTransport"/>
+        </wsdl:port>
+        <wsdl:port name="DoubleItSpnegoTransportEndorsingPort" binding="tns:DoubleItSpnegoTransportEndorsingBinding">
+            <soap:address location="https://localhost:9001/DoubleItSpnegoTransportEndorsing"/>
+        </wsdl:port>
     </wsdl:service>
     <wsp:Policy wsu:Id="DoubleItSpnegoSymmetricProtectionPolicy">
         <wsp:ExactlyOne>
@@ -197,6 +239,132 @@
             </wsp:All>
         </wsp:ExactlyOne>
     </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItSpnegoTransportPolicy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:TransportBinding>
+                    <wsp:Policy>
+                        <sp:TransportToken>
+                            <wsp:Policy>
+                                <sp:HttpsToken>
+                                    <wsp:Policy/>
+                                </sp:HttpsToken>
+                            </wsp:Policy>
+                        </sp:TransportToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:TransportBinding>
+                <sp:SupportingTokens>
+                    <wsp:Policy>
+                        <sp:SpnegoContextToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Once">
+                            <wsp:Policy />
+                        </sp:SpnegoContextToken>
+                    </wsp:Policy>
+                </sp:SupportingTokens>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItSpnegoTransportPolicy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:TransportBinding>
+                    <wsp:Policy>
+                        <sp:TransportToken>
+                            <wsp:Policy>
+                                <sp:HttpsToken>
+                                    <wsp:Policy/>
+                                </sp:HttpsToken>
+                            </wsp:Policy>
+                        </sp:TransportToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:TransportBinding>
+                <sp:SupportingTokens>
+                    <wsp:Policy>
+                        <sp:SpnegoContextToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Once">
+                            <wsp:Policy />
+                        </sp:SpnegoContextToken>
+                    </wsp:Policy>
+                </sp:SupportingTokens>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItSpnegoTransportEndorsingPolicy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:TransportBinding>
+                    <wsp:Policy>
+                        <sp:TransportToken>
+                            <wsp:Policy>
+                                <sp:HttpsToken>
+                                    <wsp:Policy/>
+                                </sp:HttpsToken>
+                            </wsp:Policy>
+                        </sp:TransportToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:TransportBinding>
+                <sp:EndorsingSupportingTokens>
+                    <wsp:Policy>
+                        <sp:SpnegoContextToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Once">
+                            <wsp:Policy />
+                        </sp:SpnegoContextToken>
+                    </wsp:Policy>
+                </sp:EndorsingSupportingTokens>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
     <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
         <wsp:ExactlyOne>
             <wsp:All>

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/client.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/client.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/client.xml
index 88832b6..a9745c3 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/client.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/client.xml
@@ -43,4 +43,27 @@
             <entry key="ws-security.kerberos.spn" value="bob@service.ws.apache.org"/>
         </jaxws:properties>
     </jaxws:client>
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSpnegoTransportPort"
createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="ws-security.kerberos.jaas.context" value="alice"/>
+            <entry key="ws-security.kerberos.spn" value="bob@service.ws.apache.org"/>
+        </jaxws:properties>
+    </jaxws:client>
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSpnegoTransportEndorsingPort"
createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="ws-security.kerberos.jaas.context" value="alice"/>
+            <entry key="ws-security.kerberos.spn" value="bob@service.ws.apache.org"/>
+        </jaxws:properties>
+    </jaxws:client>
+    
+    <http:conduit name="https://localhost.*">
+        <http:tlsClientParameters disableCNCheck="true">
+            <sec:keyManagers keyPassword="password">
+                <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Morpit.jks"/>
+            </sec:keyManagers>
+            <sec:trustManagers>
+                <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
+            </sec:trustManagers>
+        </http:tlsClientParameters>
+    </http:conduit>
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/server.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/server.xml
index 1a26d34..a14dd76 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/server.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/server.xml
@@ -25,6 +25,33 @@
             <cxf:logging/>
         </cxf:features>
     </cxf:bus>
+    
+    <!-- -->
+    <!-- Any services listening on port 9009 must use the following -->
+    <!-- Transport Layer Security (TLS) settings -->
+    <!-- -->
+    <httpj:engine-factory id="tls-settings">
+        <httpj:engine port="${testutil.ports.Server.2}">
+            <httpj:tlsServerParameters>
+                <sec:keyManagers keyPassword="password">
+                    <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
+                </sec:keyManagers>
+                <sec:trustManagers>
+                    <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
+                </sec:trustManagers>
+                <sec:cipherSuitesFilter>
+                    <sec:include>.*_EXPORT_.*</sec:include>
+                    <sec:include>.*_EXPORT1024_.*</sec:include>
+                    <sec:include>.*_WITH_DES_.*</sec:include>
+                    <sec:include>.*_WITH_AES_.*</sec:include>
+                    <sec:include>.*_WITH_NULL_.*</sec:include>
+                    <sec:exclude>.*_DH_anon_.*</sec:exclude>
+                </sec:cipherSuitesFilter>
+                <sec:clientAuthentication want="true" required="true"/>
+            </httpj:tlsServerParameters>
+        </httpj:engine>
+    </httpj:engine-factory>
+    
     <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SpnegoOverSymmetric"
address="http://localhost:${testutil.ports.Server}/DoubleItSpnegoSymmetric" serviceName="s:DoubleItService"
endpointName="s:DoubleItSpnegoSymmetricPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
wsdlLocation="org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl">
         <jaxws:properties>
             <entry key="ws-security.kerberos.jaas.context" value="bob"/>
@@ -40,4 +67,14 @@
             <entry key="ws-security.kerberos.jaas.context" value="bob"/>
         </jaxws:properties>
     </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SpnegoOverTransport"
address="https://localhost:${testutil.ports.Server.2}/DoubleItSpnegoTransport" serviceName="s:DoubleItService"
endpointName="s:DoubleItSpnegoTransportPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
wsdlLocation="org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl" depends-on="tls-settings">
+        <jaxws:properties>
+            <entry key="ws-security.kerberos.jaas.context" value="bob"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SpnegoOverTransportEndorsing"
address="https://localhost:${testutil.ports.Server.2}/DoubleItSpnegoTransportEndorsing" serviceName="s:DoubleItService"
endpointName="s:DoubleItSpnegoTransportEndorsingPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
wsdlLocation="org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl" depends-on="tls-settings">
+        <jaxws:properties>
+            <entry key="ws-security.kerberos.jaas.context" value="bob"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/0dcfa2fb/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/stax-server.xml
----------------------------------------------------------------------
diff --git a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/stax-server.xml
b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/stax-server.xml
index ad49862..044f018 100644
--- a/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/stax-server.xml
+++ b/systests/ws-security/src/test/resources/org/apache/cxf/systest/ws/spnego/stax-server.xml
@@ -25,6 +25,33 @@
             <cxf:logging/>
         </cxf:features>
     </cxf:bus>
+    
+    <!-- -->
+    <!-- Any services listening on port 9009 must use the following -->
+    <!-- Transport Layer Security (TLS) settings -->
+    <!-- -->
+    <httpj:engine-factory id="tls-settings">
+        <httpj:engine port="${testutil.ports.StaxServer.2}">
+            <httpj:tlsServerParameters>
+                <sec:keyManagers keyPassword="password">
+                    <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Bethal.jks"/>
+                </sec:keyManagers>
+                <sec:trustManagers>
+                    <sec:keyStore type="jks" password="password" resource="org/apache/cxf/systest/ws/security/Truststore.jks"/>
+                </sec:trustManagers>
+                <sec:cipherSuitesFilter>
+                    <sec:include>.*_EXPORT_.*</sec:include>
+                    <sec:include>.*_EXPORT1024_.*</sec:include>
+                    <sec:include>.*_WITH_DES_.*</sec:include>
+                    <sec:include>.*_WITH_AES_.*</sec:include>
+                    <sec:include>.*_WITH_NULL_.*</sec:include>
+                    <sec:exclude>.*_DH_anon_.*</sec:exclude>
+                </sec:cipherSuitesFilter>
+                <sec:clientAuthentication want="true" required="true"/>
+            </httpj:tlsServerParameters>
+        </httpj:engine>
+    </httpj:engine-factory>
+    
     <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SpnegoOverSymmetric"
address="http://localhost:${testutil.ports.StaxServer}/DoubleItSpnegoSymmetric" serviceName="s:DoubleItService"
endpointName="s:DoubleItSpnegoSymmetricPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
wsdlLocation="org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl">
         <jaxws:properties>
             <entry key="ws-security.kerberos.jaas.context" value="bob"/>
@@ -43,4 +70,16 @@
             <entry key="ws-security.enable.streaming" value="true"/>
         </jaxws:properties>
     </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SpnegoOverTransport"
address="https://localhost:${testutil.ports.StaxServer.2}/DoubleItSpnegoTransport" serviceName="s:DoubleItService"
endpointName="s:DoubleItSpnegoTransportPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
wsdlLocation="org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl" depends-on="tls-settings">
+        <jaxws:properties>
+            <entry key="ws-security.kerberos.jaas.context" value="bob"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="SpnegoOverTransportEndorsing"
address="https://localhost:${testutil.ports.StaxServer.2}/DoubleItSpnegoTransportEndorsing"
serviceName="s:DoubleItService" endpointName="s:DoubleItSpnegoTransportEndorsingPort" implementor="org.apache.cxf.systest.ws.common.DoubleItImpl"
wsdlLocation="org/apache/cxf/systest/ws/spnego/DoubleItSpnego.wsdl" depends-on="tls-settings">
+        <jaxws:properties>
+            <entry key="ws-security.kerberos.jaas.context" value="bob"/>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
 </beans>


Mime
View raw message