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 2016/02/15 17:21:23 UTC

[1/4] cxf git commit: Renaming tests

Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 484ab8dd1 -> d1bb6c14c


http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl
deleted file mode 100644
index ff9ca36..0000000
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl
+++ /dev/null
@@ -1,430 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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.
--->
-<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:di="http://www.example.org/schema/DoubleIt" xmlns:tns="http://www.example.org/contract/DoubleIt" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsaw="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" name="DoubleIt" targetNamespace="http://www.example.org/contract/DoubleIt">
-    <wsdl:import location="src/test/resources/DoubleItLogical.wsdl" namespace="http://www.example.org/contract/DoubleIt"/>
-    <wsdl:binding name="DoubleItSymmetricSAML1Binding" type="tns:DoubleItPortType">
-        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML1Policy"/>
-        <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:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DoubleItSymmetricSAML2Binding" type="tns:DoubleItPortType">
-        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML2Policy"/>
-        <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:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DoubleItSymmetricSAML2EndorsingBinding" type="tns:DoubleItPortType">
-        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML2EndorsingPolicy"/>
-        <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:operation>
-    </wsdl:binding>
-    <wsdl:binding name="DoubleItSymmetricSAML2SupportingBinding" type="tns:DoubleItPortType">
-        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML2SupportingPolicy"/>
-        <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:operation>
-    </wsdl:binding>
-    <wsdl:service name="DoubleItService">
-        <wsdl:port name="DoubleItSymmetricSAML1Port" binding="tns:DoubleItSymmetricSAML1Binding">
-            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml1"/>
-        </wsdl:port>
-        <wsdl:port name="DoubleItSymmetricSAML2Port" binding="tns:DoubleItSymmetricSAML2Binding">
-            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml2"/>
-        </wsdl:port>
-        <wsdl:port name="DoubleItSymmetricSAML2EndorsingPort" binding="tns:DoubleItSymmetricSAML2EndorsingBinding">
-            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml2endorsing"/>
-        </wsdl:port>
-        <wsdl:port name="DoubleItSymmetricSAML2SupportingPort" binding="tns:DoubleItSymmetricSAML2SupportingBinding">
-            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml2supporting"/>
-        </wsdl:port>
-    </wsdl:service>
-    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML1Policy">
-        <wsp:ExactlyOne>
-            <wsp:All>
-                <wsam:Addressing wsp:Optional="false">
-                    <wsp:Policy/>
-                </wsam:Addressing>
-                <sp:SymmetricBinding>
-                    <wsp:Policy>
-                        <sp:ProtectionToken>
-                            <wsp:Policy>
-                                <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
-                                    <sp:RequestSecurityTokenTemplate>
-                                        <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</t:TokenType>
-                                        <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</t:KeyType>
-                                        <t:KeySize>128</t:KeySize>
-                                    </sp:RequestSecurityTokenTemplate>
-                                    <wsp:Policy>
-                                        <sp:RequireInternalReference/>
-                                    </wsp:Policy>
-                                    <sp:Issuer>
-                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
-                                                                                </wsaw:Address>
-                                        <wsaw:Metadata>
-                                            <wsx:Metadata>
-                                                <wsx:MetadataSection>
-                                                    <wsx:MetadataReference>
-                                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
-                                                                                                                </wsaw:Address>
-                                                    </wsx:MetadataReference>
-                                                </wsx:MetadataSection>
-                                            </wsx:Metadata>
-                                        </wsaw:Metadata>
-                                    </sp:Issuer>
-                                </sp:IssuedToken>
-                            </wsp:Policy>
-                        </sp:ProtectionToken>
-                        <sp:Layout>
-                            <wsp:Policy>
-                                <sp:Lax/>
-                            </wsp:Policy>
-                        </sp:Layout>
-                        <sp:IncludeTimestamp/>
-                        <sp:OnlySignEntireHeadersAndBody/>
-                        <sp:AlgorithmSuite>
-                            <wsp:Policy>
-                                <sp:Basic128/>
-                            </wsp:Policy>
-                        </sp:AlgorithmSuite>
-                    </wsp:Policy>
-                </sp:SymmetricBinding>
-                <sp:Wss11>
-                    <wsp:Policy>
-                        <sp:MustSupportRefIssuerSerial/>
-                        <sp:MustSupportRefThumbprint/>
-                        <sp:MustSupportRefEncryptedKey/>
-                    </wsp:Policy>
-                </sp:Wss11>
-                <sp:Trust13>
-                    <wsp:Policy>
-                        <sp:MustSupportIssuedTokens/>
-                        <sp:RequireClientEntropy/>
-                        <sp:RequireServerEntropy/>
-                    </wsp:Policy>
-                </sp:Trust13>
-            </wsp:All>
-        </wsp:ExactlyOne>
-    </wsp:Policy>
-    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML2Policy">
-        <wsp:ExactlyOne>
-            <wsp:All>
-                <wsam:Addressing wsp:Optional="false">
-                    <wsp:Policy/>
-                </wsam:Addressing>
-                <sp:SymmetricBinding>
-                    <wsp:Policy>
-                        <sp:ProtectionToken>
-                            <wsp:Policy>
-                                <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
-                                    <sp:RequestSecurityTokenTemplate>
-                                        <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
-                                        <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</t:KeyType>
-                                        <t:KeySize>128</t:KeySize>
-                                    </sp:RequestSecurityTokenTemplate>
-                                    <wsp:Policy>
-                                        <sp:RequireInternalReference/>
-                                    </wsp:Policy>
-                                    <sp:Issuer>
-                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
-                                                                                </wsaw:Address>
-                                        <wsaw:Metadata>
-                                            <wsx:Metadata>
-                                                <wsx:MetadataSection>
-                                                    <wsx:MetadataReference>
-                                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
-                                                                                                                </wsaw:Address>
-                                                    </wsx:MetadataReference>
-                                                </wsx:MetadataSection>
-                                            </wsx:Metadata>
-                                        </wsaw:Metadata>
-                                    </sp:Issuer>
-                                </sp:IssuedToken>
-                            </wsp:Policy>
-                        </sp:ProtectionToken>
-                        <sp:Layout>
-                            <wsp:Policy>
-                                <sp:Lax/>
-                            </wsp:Policy>
-                        </sp:Layout>
-                        <sp:IncludeTimestamp/>
-                        <sp:OnlySignEntireHeadersAndBody/>
-                        <sp:AlgorithmSuite>
-                            <wsp:Policy>
-                                <sp:Basic128/>
-                            </wsp:Policy>
-                        </sp:AlgorithmSuite>
-                    </wsp:Policy>
-                </sp:SymmetricBinding>
-                <sp:Wss11>
-                    <wsp:Policy>
-                        <sp:MustSupportRefIssuerSerial/>
-                        <sp:MustSupportRefThumbprint/>
-                        <sp:MustSupportRefEncryptedKey/>
-                    </wsp:Policy>
-                </sp:Wss11>
-                <sp:Trust13>
-                    <wsp:Policy>
-                        <sp:MustSupportIssuedTokens/>
-                        <sp:RequireClientEntropy/>
-                        <sp:RequireServerEntropy/>
-                    </wsp:Policy>
-                </sp:Trust13>
-            </wsp:All>
-        </wsp:ExactlyOne>
-    </wsp:Policy>
-    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML2EndorsingPolicy">
-        <wsp:ExactlyOne>
-            <wsp:All>
-                <wsam:Addressing wsp:Optional="false">
-                    <wsp:Policy/>
-                </wsam:Addressing>
-                <sp:SymmetricBinding>
-                    <wsp:Policy>
-                        <sp:ProtectionToken>
-                            <wsp:Policy>
-                                <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
-                                    <wsp:Policy>
-                                        <sp:RequireThumbprintReference/>
-                                        <sp:WssX509V3Token10/>
-                                    </wsp:Policy>
-                                </sp:X509Token>
-                            </wsp:Policy>
-                        </sp:ProtectionToken>
-                        <sp:Layout>
-                            <wsp:Policy>
-                                <sp:Lax/>
-                            </wsp:Policy>
-                        </sp:Layout>
-                        <sp:IncludeTimestamp/>
-                        <sp:OnlySignEntireHeadersAndBody/>
-                        <sp:EncryptSignature/>
-                        <sp:AlgorithmSuite>
-                            <wsp:Policy>
-                                <sp:Basic128/>
-                            </wsp:Policy>
-                        </sp:AlgorithmSuite>
-                    </wsp:Policy>
-                </sp:SymmetricBinding>
-                <sp:EndorsingSupportingTokens>
-                    <wsp:Policy>
-                        <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
-                            <sp:RequestSecurityTokenTemplate>
-                                <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
-                                <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</t:KeyType>
-                                <t:KeySize>128</t:KeySize>
-                            </sp:RequestSecurityTokenTemplate>
-                            <wsp:Policy>
-                                <sp:RequireInternalReference/>
-                            </wsp:Policy>
-                            <sp:Issuer>
-                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
-                                        </wsaw:Address>
-                                <wsaw:Metadata>
-                                    <wsx:Metadata>
-                                        <wsx:MetadataSection>
-                                            <wsx:MetadataReference>
-                                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
-                                                        </wsaw:Address>
-                                            </wsx:MetadataReference>
-                                        </wsx:MetadataSection>
-                                    </wsx:Metadata>
-                                </wsaw:Metadata>
-                            </sp:Issuer>
-                        </sp:IssuedToken>
-                    </wsp:Policy>
-                </sp:EndorsingSupportingTokens>
-                <sp:Wss11>
-                    <wsp:Policy>
-                        <sp:MustSupportRefIssuerSerial/>
-                        <sp:MustSupportRefThumbprint/>
-                        <sp:MustSupportRefEncryptedKey/>
-                    </wsp:Policy>
-                </sp:Wss11>
-                <sp:Trust13>
-                    <wsp:Policy>
-                        <sp:MustSupportIssuedTokens/>
-                        <sp:RequireClientEntropy/>
-                        <sp:RequireServerEntropy/>
-                    </wsp:Policy>
-                </sp:Trust13>
-            </wsp:All>
-        </wsp:ExactlyOne>
-    </wsp:Policy>
-    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML2SupportingPolicy">
-        <wsp:ExactlyOne>
-            <wsp:All>
-                <wsam:Addressing wsp:Optional="false">
-                    <wsp:Policy/>
-                </wsam:Addressing>
-                <sp:SymmetricBinding>
-                    <wsp:Policy>
-                        <sp:ProtectionToken>
-                            <wsp:Policy>
-                                <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
-                                    <wsp:Policy>
-                                        <sp:RequireThumbprintReference/>
-                                        <sp:WssX509V3Token10/>
-                                    </wsp:Policy>
-                                </sp:X509Token>
-                            </wsp:Policy>
-                        </sp:ProtectionToken>
-                        <sp:Layout>
-                            <wsp:Policy>
-                                <sp:Lax/>
-                            </wsp:Policy>
-                        </sp:Layout>
-                        <sp:IncludeTimestamp/>
-                        <sp:OnlySignEntireHeadersAndBody/>
-                        <sp:AlgorithmSuite>
-                            <wsp:Policy>
-                                <sp:Basic128/>
-                            </wsp:Policy>
-                        </sp:AlgorithmSuite>
-                    </wsp:Policy>
-                </sp:SymmetricBinding>
-                <sp:SignedEncryptedSupportingTokens>
-                    <wsp:Policy>
-                        <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
-                            <sp:RequestSecurityTokenTemplate>
-                                <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
-                                <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
-                            </sp:RequestSecurityTokenTemplate>
-                            <wsp:Policy>
-                                <sp:RequireInternalReference/>
-                            </wsp:Policy>
-                            <sp:Issuer>
-                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
-                                        </wsaw:Address>
-                                <wsaw:Metadata>
-                                    <wsx:Metadata>
-                                        <wsx:MetadataSection>
-                                            <wsx:MetadataReference>
-                                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
-                                                        </wsaw:Address>
-                                            </wsx:MetadataReference>
-                                        </wsx:MetadataSection>
-                                    </wsx:Metadata>
-                                </wsaw:Metadata>
-                            </sp:Issuer>
-                        </sp:IssuedToken>
-                    </wsp:Policy>
-                </sp:SignedEncryptedSupportingTokens>
-                <sp:Wss11>
-                    <wsp:Policy>
-                        <sp:MustSupportRefIssuerSerial/>
-                        <sp:MustSupportRefThumbprint/>
-                        <sp:MustSupportRefEncryptedKey/>
-                    </wsp:Policy>
-                </sp:Wss11>
-                <sp:Trust13>
-                    <wsp:Policy>
-                        <sp:MustSupportIssuedTokens/>
-                        <sp:RequireClientEntropy/>
-                        <sp:RequireServerEntropy/>
-                    </wsp:Policy>
-                </sp:Trust13>
-            </wsp:All>
-        </wsp:ExactlyOne>
-    </wsp:Policy>
-    <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
-        <wsp:ExactlyOne>
-            <wsp:All>
-                <sp:EncryptedParts>
-                    <sp:Body/>
-                </sp:EncryptedParts>
-                <sp:SignedParts>
-                    <sp:Body/>
-                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="AckRequested" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                    <sp:Header Name="SequenceAcknowledgement" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                    <sp:Header Name="Sequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                    <sp:Header Name="CreateSequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                </sp:SignedParts>
-            </wsp:All>
-        </wsp:ExactlyOne>
-    </wsp:Policy>
-    <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Output_Policy">
-        <wsp:ExactlyOne>
-            <wsp:All>
-                <sp:EncryptedParts>
-                    <sp:Body/>
-                </sp:EncryptedParts>
-                <sp:SignedParts>
-                    <sp:Body/>
-                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
-                    <sp:Header Name="AckRequested" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                    <sp:Header Name="SequenceAcknowledgement" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                    <sp:Header Name="Sequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                    <sp:Header Name="CreateSequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
-                </sp:SignedParts>
-            </wsp:All>
-        </wsp:ExactlyOne>
-    </wsp:Policy>
-</wsdl:definitions>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-client.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-client.xml
deleted file mode 100644
index 9afda0c..0000000
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-client.xml
+++ /dev/null
@@ -1,66 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:sec="http://cxf.apache.org/configuration/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.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/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd">
-    <cxf:bus>
-        <cxf:features>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    <bean id="stsClient" class="org.apache.cxf.ws.security.trust.STSClient">
-        <constructor-arg ref="cxf"/>
-        <property name="wsdlLocation" value="http://localhost:8080/SecurityTokenService/X509?wsdl"/>
-        <property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
-        <property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port"/>
-        <property name="properties">
-            <map>
-                <entry key="security.signature.username" value="myclientkey"/>
-                <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-                <entry key="security.signature.properties" value="clientKeystore.properties"/>
-                <entry key="security.encryption.properties" value="clientKeystore.properties"/>
-                <entry key="security.encryption.username" value="mystskey"/>
-            </map>
-        </property>
-    </bean>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML1Port" createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="security.sts.client" value-ref="stsClient"/>
-        </jaxws:properties>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML2Port" createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="security.sts.client" value-ref="stsClient"/>
-        </jaxws:properties>
-    </jaxws:client>
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML2EndorsingPort" createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="security.encryption.properties" value="clientKeystore.properties"/>
-            <entry key="security.encryption.username" value="myservicekey"/>
-            <entry key="security.sts.client" value-ref="stsClient"/>
-        </jaxws:properties>
-    </jaxws:client>
-    
-    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML2SupportingPort" createdFromAPI="true">
-        <jaxws:properties>
-            <entry key="security.encryption.properties" value="clientKeystore.properties"/>
-            <entry key="security.encryption.username" value="myservicekey"/>
-            <entry key="security.sts.client" value-ref="stsClient"/>
-        </jaxws:properties>
-    </jaxws:client>
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-service.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-service.xml
deleted file mode 100644
index 8b5f41c..0000000
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-service.xml
+++ /dev/null
@@ -1,85 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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"/>
-    
-    <cxf:bus>
-        <cxf:features>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    
-    <bean id="stsclient" class="org.apache.cxf.ws.security.trust.STSClient">
-        <constructor-arg ref="cxf"/>
-        <property name="wsdlLocation" value="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/X509?wsdl"/>
-        <property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
-        <property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port"/>
-        <property name="properties">
-            <map>
-                <entry key="security.signature.username" value="myservicekey"/>
-                <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-                <entry key="security.signature.properties" value="serviceKeystore.properties"/>
-                <entry key="security.encryption.properties" value="serviceKeystore.properties"/>
-                <entry key="security.encryption.username" value="mystskey"/>
-            </map>
-        </property>
-    </bean>
-    
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.Server}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="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>
-        </jaxws:properties>
-    </jaxws:endpoint>
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.Server}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="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">
-                    <constructor-arg value="true"/>
-                </bean>
-            </entry>
-            <entry key="security.sts.client">
-                <ref bean="stsclient"/>
-            </entry>
-        </jaxws:properties>
-    </jaxws:endpoint>
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.Server}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="security.signature.properties" value="serviceKeystore.properties"/>
-            <entry key="ws-security.is-bsp-compliant" value="false"/>
-        </jaxws:properties>
-    </jaxws:endpoint>
-    
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.Server}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="security.signature.properties" value="serviceKeystore.properties"/>
-            <entry key="ws-security.is-bsp-compliant" value="false"/>
-        </jaxws:properties>
-    </jaxws:endpoint>
-</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
deleted file mode 100644
index be5f158..0000000
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509_symmetric/cxf-stax-service.xml
+++ /dev/null
@@ -1,89 +0,0 @@
-<?xml version="1.0"?>
-<!--
- 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"/>
-    
-    <cxf:bus>
-        <cxf:features>
-            <cxf:logging/>
-        </cxf:features>
-    </cxf:bus>
-    
-    <bean id="stsclient" class="org.apache.cxf.ws.security.trust.STSClient">
-        <constructor-arg ref="cxf"/>
-        <property name="wsdlLocation" value="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/X509?wsdl"/>
-        <property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
-        <property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port"/>
-        <property name="properties">
-            <map>
-                <entry key="security.signature.username" value="myservicekey"/>
-                <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-                <entry key="security.signature.properties" value="serviceKeystore.properties"/>
-                <entry key="security.encryption.properties" value="serviceKeystore.properties"/>
-                <entry key="security.encryption.username" value="mystskey"/>
-            </map>
-        </property>
-    </bean>
-    
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="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.STSStaxTokenValidator">
-                    <constructor-arg value="true"/>
-                </bean>
-            </entry>
-            <entry key="security.sts.client">
-                <ref bean="stsclient"/>
-            </entry>
-            <entry key="ws-security.enable.streaming" value="true"/>
-        </jaxws:properties>
-    </jaxws:endpoint>
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="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.STSStaxTokenValidator"/>
-            </entry>
-            <entry key="ws-security.enable.streaming" value="true"/>
-        </jaxws:properties>
-    </jaxws:endpoint>
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="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>
-    
-    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509_symmetric.StaxServer}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509_symmetric/DoubleIt.wsdl">
-        <jaxws:properties>
-            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
-            <entry key="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>


[3/4] cxf git commit: NPE fix

Posted by co...@apache.org.
NPE fix


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

Branch: refs/heads/3.1.x-fixes
Commit: 710beae44bb62a50e7d24337a2f2d550abf782c1
Parents: fe9e4fb
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Feb 15 16:06:52 2016 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Feb 15 16:21:16 2016 +0000

----------------------------------------------------------------------
 .../src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/710beae4/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
index 6534394..0bb2900 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/claims/ClaimsManager.java
@@ -183,6 +183,10 @@ public class ClaimsManager {
         ProcessedClaimCollection returnCollection = new ProcessedClaimCollection();
         Principal originalPrincipal = parameters.getPrincipal();
         
+        if (claimHandlers == null) {
+            return returnCollection;
+        }
+        
         for (ClaimsHandler handler : claimHandlers) {
             
             ClaimCollection supportedClaims = 


[2/4] cxf git commit: Renaming tests

Posted by co...@apache.org.
Renaming tests


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

Branch: refs/heads/3.1.x-fixes
Commit: fe9e4fbf7d99d8161c1eda0e49647cfcc0c00dc4
Parents: 484ab8d
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Feb 15 14:37:54 2016 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Feb 15 16:21:14 2016 +0000

----------------------------------------------------------------------
 .../org/apache/cxf/systest/sts/x509/Server.java |  50 +++
 .../apache/cxf/systest/sts/x509/StaxServer.java |  50 +++
 .../sts/x509/X509SymmetricBindingTest.java      | 278 ++++++++++++
 .../cxf/systest/sts/x509_symmetric/Server.java  |  50 ---
 .../systest/sts/x509_symmetric/StaxServer.java  |  50 ---
 .../X509SymmetricBindingTest.java               | 278 ------------
 .../apache/cxf/systest/sts/x509/DoubleIt.wsdl   | 430 +++++++++++++++++++
 .../apache/cxf/systest/sts/x509/cxf-client.xml  |  66 +++
 .../apache/cxf/systest/sts/x509/cxf-service.xml |  85 ++++
 .../cxf/systest/sts/x509/cxf-stax-service.xml   |  89 ++++
 .../systest/sts/x509_symmetric/DoubleIt.wsdl    | 430 -------------------
 .../systest/sts/x509_symmetric/cxf-client.xml   |  66 ---
 .../systest/sts/x509_symmetric/cxf-service.xml  |  85 ----
 .../sts/x509_symmetric/cxf-stax-service.xml     |  89 ----
 14 files changed, 1048 insertions(+), 1048 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java
new file mode 100644
index 0000000..b1a8cd3
--- /dev/null
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/Server.java
@@ -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;
+
+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 Server extends AbstractBusTestServerBase {
+
+    public Server() {
+
+    }
+
+    protected void run()  {
+        URL busFile = Server.class.getResource("cxf-service.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new Server();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public static void main(String args[]) {
+        new Server().run();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java
new file mode 100644
index 0000000..bae308b
--- /dev/null
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/StaxServer.java
@@ -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;
+
+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();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java
new file mode 100644
index 0000000..0e3878b
--- /dev/null
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509SymmetricBindingTest.java
@@ -0,0 +1,278 @@
+/**
+ * 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;
+
+import java.net.URL;
+import java.util.Arrays;
+import java.util.Collection;
+
+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.TestParam;
+import org.apache.cxf.systest.sts.common.TokenTestUtils;
+import org.apache.cxf.systest.sts.deployment.STSServer;
+import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
+import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
+import org.example.contract.doubleit.DoubleItPortType;
+import org.junit.BeforeClass;
+import org.junit.runner.RunWith;
+import org.junit.runners.Parameterized.Parameters;
+
+/**
+ * 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.
+ */
+@RunWith(value = org.junit.runners.Parameterized.class)
+public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
+    
+    static final String STSPORT = allocatePort(STSServer.class);
+    static final String STAX_STSPORT = allocatePort(StaxSTSServer.class);
+    static final String STSPORT2 = allocatePort(STSServer.class, 2);
+    static final String STAX_STSPORT2 = allocatePort(StaxSTSServer.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(Server.class);
+    private static final String STAX_PORT = allocatePort(StaxServer.class);
+    
+    final TestParam test;
+    
+    public X509SymmetricBindingTest(TestParam type) {
+        this.test = type;
+    }
+    
+    @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(Server.class, true)
+        );
+        assertTrue(
+                   "Server failed to launch",
+                   // run the server in the same process
+                   // set this to false to fork
+                   launchServer(StaxServer.class, true)
+        );
+        assertTrue(
+                   "Server failed to launch",
+                   // run the server in the same process
+                   // set this to false to fork
+                   launchServer(STSServer.class, true)
+        );
+        assertTrue(
+                   "Server failed to launch",
+                   // run the server in the same process
+                   // set this to false to fork
+                   launchServer(StaxSTSServer.class, true)
+        );
+    }
+    
+    @Parameters(name = "{0}")
+    public static Collection<TestParam[]> data() {
+       
+        return Arrays.asList(new TestParam[][] {{new TestParam(PORT, false, STSPORT2)},
+                                                {new TestParam(PORT, true, STSPORT2)},
+                                                {new TestParam(STAX_PORT, false, STSPORT2)},
+                                                {new TestParam(STAX_PORT, true, STSPORT2)},
+                                                
+                                                {new TestParam(PORT, false, STAX_STSPORT2)},
+                                                {new TestParam(PORT, true, STAX_STSPORT2)},
+                                                {new TestParam(STAX_PORT, false, STAX_STSPORT2)},
+                                                {new TestParam(STAX_PORT, true, STAX_STSPORT2)},
+        });
+    }
+    
+    @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 = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+        
+        URL wsdl = X509SymmetricBindingTest.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, test.getPort());
+        
+        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml1Port, test.getStsPort());
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(symmetricSaml1Port);
+        }
+
+        doubleIt(symmetricSaml1Port, 25);
+        
+        ((java.io.Closeable)symmetricSaml1Port).close();
+        bus.shutdown(true);
+    }
+
+    @org.junit.Test
+    public void testX509SAML2() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = X509SymmetricBindingTest.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, test.getPort());
+        
+        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
+        }
+        
+        doubleIt(symmetricSaml2Port, 30);
+        TokenTestUtils.verifyToken(symmetricSaml2Port);
+        
+        ((java.io.Closeable)symmetricSaml2Port).close();
+        bus.shutdown(true);
+    }
+    
+    @org.junit.Test
+    public void testX509SAML2Endorsing() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = X509SymmetricBindingTest.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, test.getPort());
+        
+        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
+        }
+        
+        // TODO Streaming client is not including a separate main Signature
+        if (!test.isStreaming()) {
+            doubleIt(symmetricSaml2Port, 30);
+        }
+        
+        ((java.io.Closeable)symmetricSaml2Port).close();
+        bus.shutdown(true);
+    }
+    
+    @org.junit.Test
+    public void testX509SAML2Supporting() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML2SupportingPort");
+        DoubleItPortType symmetricSaml2Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml2Port, test.getPort());
+        
+        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
+        }
+        
+        doubleIt(symmetricSaml2Port, 30);
+        
+        ((java.io.Closeable)symmetricSaml2Port).close();
+        bus.shutdown(true);
+    }
+
+    // Here we refer to the Assertion directly, instead of creating a SecurityTokenReference and using the
+    // STR Transform
+    @org.junit.Test
+    public void testX509SAML2SupportingDirectReferenceToAssertion() throws Exception {
+        
+        // TODO Not yet supported for the client streaming code
+        if (test.isStreaming()) {
+            return;
+        }
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML2SupportingPort");
+        DoubleItPortType symmetricSaml2Port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(symmetricSaml2Port, test.getPort());
+        
+        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
+        
+        if (test.isStreaming()) {
+            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
+        }
+        
+        ((BindingProvider)symmetricSaml2Port).getRequestContext().put("ws-security.use.str.transform", "false");
+        
+        doubleIt(symmetricSaml2Port, 30);
+        
+        ((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);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/Server.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/Server.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/Server.java
deleted file mode 100644
index 18e61c2..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/Server.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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 Server extends AbstractBusTestServerBase {
-
-    public Server() {
-
-    }
-
-    protected void run()  {
-        URL busFile = Server.class.getResource("cxf-service.xml");
-        Bus busLocal = new SpringBusFactory().createBus(busFile);
-        BusFactory.setDefaultBus(busLocal);
-        setBus(busLocal);
-
-        try {
-            new Server();
-        } catch (Exception e) {
-            e.printStackTrace();
-        }
-    }
-    
-    public static void main(String args[]) {
-        new Server().run();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
deleted file mode 100644
index 3729f57..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/StaxServer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/**
- * 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();
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java
deleted file mode 100644
index b89e1be..0000000
--- a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509_symmetric/X509SymmetricBindingTest.java
+++ /dev/null
@@ -1,278 +0,0 @@
-/**
- * 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 java.util.Arrays;
-import java.util.Collection;
-
-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.TestParam;
-import org.apache.cxf.systest.sts.common.TokenTestUtils;
-import org.apache.cxf.systest.sts.deployment.STSServer;
-import org.apache.cxf.systest.sts.deployment.StaxSTSServer;
-import org.apache.cxf.testutil.common.AbstractBusClientServerTestBase;
-import org.example.contract.doubleit.DoubleItPortType;
-import org.junit.BeforeClass;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized.Parameters;
-
-/**
- * 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.
- */
-@RunWith(value = org.junit.runners.Parameterized.class)
-public class X509SymmetricBindingTest extends AbstractBusClientServerTestBase {
-    
-    static final String STSPORT = allocatePort(STSServer.class);
-    static final String STAX_STSPORT = allocatePort(StaxSTSServer.class);
-    static final String STSPORT2 = allocatePort(STSServer.class, 2);
-    static final String STAX_STSPORT2 = allocatePort(StaxSTSServer.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(Server.class);
-    private static final String STAX_PORT = allocatePort(StaxServer.class);
-    
-    final TestParam test;
-    
-    public X509SymmetricBindingTest(TestParam type) {
-        this.test = type;
-    }
-    
-    @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(Server.class, true)
-        );
-        assertTrue(
-                   "Server failed to launch",
-                   // run the server in the same process
-                   // set this to false to fork
-                   launchServer(StaxServer.class, true)
-        );
-        assertTrue(
-                   "Server failed to launch",
-                   // run the server in the same process
-                   // set this to false to fork
-                   launchServer(STSServer.class, true)
-        );
-        assertTrue(
-                   "Server failed to launch",
-                   // run the server in the same process
-                   // set this to false to fork
-                   launchServer(StaxSTSServer.class, true)
-        );
-    }
-    
-    @Parameters(name = "{0}")
-    public static Collection<TestParam[]> data() {
-       
-        return Arrays.asList(new TestParam[][] {{new TestParam(PORT, false, STSPORT2)},
-                                                {new TestParam(PORT, true, STSPORT2)},
-                                                {new TestParam(STAX_PORT, false, STSPORT2)},
-                                                {new TestParam(STAX_PORT, true, STSPORT2)},
-                                                
-                                                {new TestParam(PORT, false, STAX_STSPORT2)},
-                                                {new TestParam(PORT, true, STAX_STSPORT2)},
-                                                {new TestParam(STAX_PORT, false, STAX_STSPORT2)},
-                                                {new TestParam(STAX_PORT, true, STAX_STSPORT2)},
-        });
-    }
-    
-    @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 = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
-        Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
-        
-        URL wsdl = X509SymmetricBindingTest.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, test.getPort());
-        
-        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml1Port, test.getStsPort());
-        
-        if (test.isStreaming()) {
-            SecurityTestUtil.enableStreaming(symmetricSaml1Port);
-        }
-
-        doubleIt(symmetricSaml1Port, 25);
-        
-        ((java.io.Closeable)symmetricSaml1Port).close();
-        bus.shutdown(true);
-    }
-
-    @org.junit.Test
-    public void testX509SAML2() throws Exception {
-
-        SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
-        Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
-
-        URL wsdl = X509SymmetricBindingTest.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, test.getPort());
-        
-        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
-        
-        if (test.isStreaming()) {
-            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
-        }
-        
-        doubleIt(symmetricSaml2Port, 30);
-        TokenTestUtils.verifyToken(symmetricSaml2Port);
-        
-        ((java.io.Closeable)symmetricSaml2Port).close();
-        bus.shutdown(true);
-    }
-    
-    @org.junit.Test
-    public void testX509SAML2Endorsing() throws Exception {
-
-        SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
-        Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
-
-        URL wsdl = X509SymmetricBindingTest.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, test.getPort());
-        
-        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
-        
-        if (test.isStreaming()) {
-            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
-        }
-        
-        // TODO Streaming client is not including a separate main Signature
-        if (!test.isStreaming()) {
-            doubleIt(symmetricSaml2Port, 30);
-        }
-        
-        ((java.io.Closeable)symmetricSaml2Port).close();
-        bus.shutdown(true);
-    }
-    
-    @org.junit.Test
-    public void testX509SAML2Supporting() throws Exception {
-
-        SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
-        Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
-
-        URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
-        Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML2SupportingPort");
-        DoubleItPortType symmetricSaml2Port = 
-            service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(symmetricSaml2Port, test.getPort());
-        
-        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
-        
-        if (test.isStreaming()) {
-            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
-        }
-        
-        doubleIt(symmetricSaml2Port, 30);
-        
-        ((java.io.Closeable)symmetricSaml2Port).close();
-        bus.shutdown(true);
-    }
-
-    // Here we refer to the Assertion directly, instead of creating a SecurityTokenReference and using the
-    // STR Transform
-    @org.junit.Test
-    public void testX509SAML2SupportingDirectReferenceToAssertion() throws Exception {
-        
-        // TODO Not yet supported for the client streaming code
-        if (test.isStreaming()) {
-            return;
-        }
-
-        SpringBusFactory bf = new SpringBusFactory();
-        URL busFile = X509SymmetricBindingTest.class.getResource("cxf-client.xml");
-
-        Bus bus = bf.createBus(busFile.toString());
-        SpringBusFactory.setDefaultBus(bus);
-        SpringBusFactory.setThreadDefaultBus(bus);
-
-        URL wsdl = X509SymmetricBindingTest.class.getResource("DoubleIt.wsdl");
-        Service service = Service.create(wsdl, SERVICE_QNAME);
-        QName portQName = new QName(NAMESPACE, "DoubleItSymmetricSAML2SupportingPort");
-        DoubleItPortType symmetricSaml2Port = 
-            service.getPort(portQName, DoubleItPortType.class);
-        updateAddressPort(symmetricSaml2Port, test.getPort());
-        
-        TokenTestUtils.updateSTSPort((BindingProvider)symmetricSaml2Port, test.getStsPort());
-        
-        if (test.isStreaming()) {
-            SecurityTestUtil.enableStreaming(symmetricSaml2Port);
-        }
-        
-        ((BindingProvider)symmetricSaml2Port).getRequestContext().put("ws-security.use.str.transform", "false");
-        
-        doubleIt(symmetricSaml2Port, 30);
-        
-        ((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);
-    }
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleIt.wsdl
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleIt.wsdl b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleIt.wsdl
new file mode 100644
index 0000000..ff9ca36
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleIt.wsdl
@@ -0,0 +1,430 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:di="http://www.example.org/schema/DoubleIt" xmlns:tns="http://www.example.org/contract/DoubleIt" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsaw="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" name="DoubleIt" targetNamespace="http://www.example.org/contract/DoubleIt">
+    <wsdl:import location="src/test/resources/DoubleItLogical.wsdl" namespace="http://www.example.org/contract/DoubleIt"/>
+    <wsdl:binding name="DoubleItSymmetricSAML1Binding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML1Policy"/>
+        <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:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItSymmetricSAML2Binding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML2Policy"/>
+        <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:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItSymmetricSAML2EndorsingBinding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML2EndorsingPolicy"/>
+        <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:operation>
+    </wsdl:binding>
+    <wsdl:binding name="DoubleItSymmetricSAML2SupportingBinding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItSymmetricBindingSAML2SupportingPolicy"/>
+        <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:operation>
+    </wsdl:binding>
+    <wsdl:service name="DoubleItService">
+        <wsdl:port name="DoubleItSymmetricSAML1Port" binding="tns:DoubleItSymmetricSAML1Binding">
+            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml1"/>
+        </wsdl:port>
+        <wsdl:port name="DoubleItSymmetricSAML2Port" binding="tns:DoubleItSymmetricSAML2Binding">
+            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml2"/>
+        </wsdl:port>
+        <wsdl:port name="DoubleItSymmetricSAML2EndorsingPort" binding="tns:DoubleItSymmetricSAML2EndorsingBinding">
+            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml2endorsing"/>
+        </wsdl:port>
+        <wsdl:port name="DoubleItSymmetricSAML2SupportingPort" binding="tns:DoubleItSymmetricSAML2SupportingBinding">
+            <soap:address location="http://localhost:8082/doubleit/services/doubleitsymmetricsaml2supporting"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML1Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <wsam:Addressing wsp:Optional="false">
+                    <wsp:Policy/>
+                </wsam:Addressing>
+                <sp:SymmetricBinding>
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <sp:RequestSecurityTokenTemplate>
+                                        <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</t:TokenType>
+                                        <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</t:KeyType>
+                                        <t:KeySize>128</t:KeySize>
+                                    </sp:RequestSecurityTokenTemplate>
+                                    <wsp:Policy>
+                                        <sp:RequireInternalReference/>
+                                    </wsp:Policy>
+                                    <sp:Issuer>
+                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
+                                                                                </wsaw:Address>
+                                        <wsaw:Metadata>
+                                            <wsx:Metadata>
+                                                <wsx:MetadataSection>
+                                                    <wsx:MetadataReference>
+                                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
+                                                                                                                </wsaw:Address>
+                                                    </wsx:MetadataReference>
+                                                </wsx:MetadataSection>
+                                            </wsx:Metadata>
+                                        </wsaw:Metadata>
+                                    </sp:Issuer>
+                                </sp:IssuedToken>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust13>
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust13>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML2Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <wsam:Addressing wsp:Optional="false">
+                    <wsp:Policy/>
+                </wsam:Addressing>
+                <sp:SymmetricBinding>
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <sp:RequestSecurityTokenTemplate>
+                                        <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+                                        <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</t:KeyType>
+                                        <t:KeySize>128</t:KeySize>
+                                    </sp:RequestSecurityTokenTemplate>
+                                    <wsp:Policy>
+                                        <sp:RequireInternalReference/>
+                                    </wsp:Policy>
+                                    <sp:Issuer>
+                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
+                                                                                </wsaw:Address>
+                                        <wsaw:Metadata>
+                                            <wsx:Metadata>
+                                                <wsx:MetadataSection>
+                                                    <wsx:MetadataReference>
+                                                        <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
+                                                                                                                </wsaw:Address>
+                                                    </wsx:MetadataReference>
+                                                </wsx:MetadataSection>
+                                            </wsx:Metadata>
+                                        </wsaw:Metadata>
+                                    </sp:Issuer>
+                                </sp:IssuedToken>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust13>
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust13>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML2EndorsingPolicy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <wsam:Addressing wsp:Optional="false">
+                    <wsp:Policy/>
+                </wsam:Addressing>
+                <sp:SymmetricBinding>
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+                                    <wsp:Policy>
+                                        <sp:RequireThumbprintReference/>
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                        <sp:EncryptSignature/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:EndorsingSupportingTokens>
+                    <wsp:Policy>
+                        <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <sp:RequestSecurityTokenTemplate>
+                                <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+                                <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/SymmetricKey</t:KeyType>
+                                <t:KeySize>128</t:KeySize>
+                            </sp:RequestSecurityTokenTemplate>
+                            <wsp:Policy>
+                                <sp:RequireInternalReference/>
+                            </wsp:Policy>
+                            <sp:Issuer>
+                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
+                                        </wsaw:Address>
+                                <wsaw:Metadata>
+                                    <wsx:Metadata>
+                                        <wsx:MetadataSection>
+                                            <wsx:MetadataReference>
+                                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
+                                                        </wsaw:Address>
+                                            </wsx:MetadataReference>
+                                        </wsx:MetadataSection>
+                                    </wsx:Metadata>
+                                </wsaw:Metadata>
+                            </sp:Issuer>
+                        </sp:IssuedToken>
+                    </wsp:Policy>
+                </sp:EndorsingSupportingTokens>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust13>
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust13>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItSymmetricBindingSAML2SupportingPolicy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <wsam:Addressing wsp:Optional="false">
+                    <wsp:Policy/>
+                </wsam:Addressing>
+                <sp:SymmetricBinding>
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+                                    <wsp:Policy>
+                                        <sp:RequireThumbprintReference/>
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:SignedEncryptedSupportingTokens>
+                    <wsp:Policy>
+                        <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <sp:RequestSecurityTokenTemplate>
+                                <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+                                <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
+                            </sp:RequestSecurityTokenTemplate>
+                            <wsp:Policy>
+                                <sp:RequireInternalReference/>
+                            </wsp:Policy>
+                            <sp:Issuer>
+                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT
+                                        </wsaw:Address>
+                                <wsaw:Metadata>
+                                    <wsx:Metadata>
+                                        <wsx:MetadataSection>
+                                            <wsx:MetadataReference>
+                                                <wsaw:Address>http://localhost:8080/SecurityTokenService/UT/mex
+                                                        </wsaw:Address>
+                                            </wsx:MetadataReference>
+                                        </wsx:MetadataSection>
+                                    </wsx:Metadata>
+                                </wsaw:Metadata>
+                            </sp:Issuer>
+                        </sp:IssuedToken>
+                    </wsp:Policy>
+                </sp:SignedEncryptedSupportingTokens>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust13>
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust13>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:EncryptedParts>
+                    <sp:Body/>
+                </sp:EncryptedParts>
+                <sp:SignedParts>
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="AckRequested" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="SequenceAcknowledgement" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="Sequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="CreateSequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                </sp:SignedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Output_Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:EncryptedParts>
+                    <sp:Body/>
+                </sp:EncryptedParts>
+                <sp:SignedParts>
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="AckRequested" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="SequenceAcknowledgement" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="Sequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="CreateSequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                </sp:SignedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+</wsdl:definitions>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
new file mode 100644
index 0000000..9afda0c
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
@@ -0,0 +1,66 @@
+<?xml version="1.0"?>
+<!--
+ 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:jaxws="http://cxf.apache.org/jaxws" xmlns:cxf="http://cxf.apache.org/core" xmlns:http="http://cxf.apache.org/transports/http/configuration" xmlns:sec="http://cxf.apache.org/configuration/security" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://cxf.apache.org/core http://cxf.apache.org/schemas/core.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/configuration/security http://cxf.apache.org/schemas/configuration/security.xsd">
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    <bean id="stsClient" class="org.apache.cxf.ws.security.trust.STSClient">
+        <constructor-arg ref="cxf"/>
+        <property name="wsdlLocation" value="http://localhost:8080/SecurityTokenService/X509?wsdl"/>
+        <property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
+        <property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port"/>
+        <property name="properties">
+            <map>
+                <entry key="security.signature.username" value="myclientkey"/>
+                <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                <entry key="security.signature.properties" value="clientKeystore.properties"/>
+                <entry key="security.encryption.properties" value="clientKeystore.properties"/>
+                <entry key="security.encryption.username" value="mystskey"/>
+            </map>
+        </property>
+    </bean>
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML1Port" createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="security.sts.client" value-ref="stsClient"/>
+        </jaxws:properties>
+    </jaxws:client>
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML2Port" createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="security.sts.client" value-ref="stsClient"/>
+        </jaxws:properties>
+    </jaxws:client>
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML2EndorsingPort" createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="security.encryption.properties" value="clientKeystore.properties"/>
+            <entry key="security.encryption.username" value="myservicekey"/>
+            <entry key="security.sts.client" value-ref="stsClient"/>
+        </jaxws:properties>
+    </jaxws:client>
+    
+    <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItSymmetricSAML2SupportingPort" createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="security.encryption.properties" value="clientKeystore.properties"/>
+            <entry key="security.encryption.username" value="myservicekey"/>
+            <entry key="security.sts.client" value-ref="stsClient"/>
+        </jaxws:properties>
+    </jaxws:client>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml
new file mode 100644
index 0000000..88ed6b8
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-service.xml
@@ -0,0 +1,85 @@
+<?xml version="1.0"?>
+<!--
+ 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"/>
+    
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <bean id="stsclient" class="org.apache.cxf.ws.security.trust.STSClient">
+        <constructor-arg ref="cxf"/>
+        <property name="wsdlLocation" value="http://localhost:${testutil.ports.STSServer.2}/SecurityTokenService/X509?wsdl"/>
+        <property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
+        <property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port"/>
+        <property name="properties">
+            <map>
+                <entry key="security.signature.username" value="myservicekey"/>
+                <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                <entry key="security.signature.properties" value="serviceKeystore.properties"/>
+                <entry key="security.encryption.properties" value="serviceKeystore.properties"/>
+                <entry key="security.encryption.username" value="mystskey"/>
+            </map>
+        </property>
+    </bean>
+    
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="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>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="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">
+                    <constructor-arg value="true"/>
+                </bean>
+            </entry>
+            <entry key="security.sts.client">
+                <ref bean="stsclient"/>
+            </entry>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="security.signature.properties" value="serviceKeystore.properties"/>
+            <entry key="ws-security.is-bsp-compliant" value="false"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.Server}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="security.signature.properties" value="serviceKeystore.properties"/>
+            <entry key="ws-security.is-bsp-compliant" value="false"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/fe9e4fbf/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml
new file mode 100644
index 0000000..215c25d
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-stax-service.xml
@@ -0,0 +1,89 @@
+<?xml version="1.0"?>
+<!--
+ 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"/>
+    
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <bean id="stsclient" class="org.apache.cxf.ws.security.trust.STSClient">
+        <constructor-arg ref="cxf"/>
+        <property name="wsdlLocation" value="http://localhost:${testutil.ports.StaxSTSServer.2}/SecurityTokenService/X509?wsdl"/>
+        <property name="serviceName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}SecurityTokenService"/>
+        <property name="endpointName" value="{http://docs.oasis-open.org/ws-sx/ws-trust/200512/}X509_Port"/>
+        <property name="properties">
+            <map>
+                <entry key="security.signature.username" value="myservicekey"/>
+                <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+                <entry key="security.signature.properties" value="serviceKeystore.properties"/>
+                <entry key="security.encryption.properties" value="serviceKeystore.properties"/>
+                <entry key="security.encryption.username" value="mystskey"/>
+            </map>
+        </property>
+    </bean>
+    
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml1" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML1Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml1" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="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.STSStaxTokenValidator">
+                    <constructor-arg value="true"/>
+                </bean>
+            </entry>
+            <entry key="security.sts.client">
+                <ref bean="stsclient"/>
+            </entry>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="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.STSStaxTokenValidator"/>
+            </entry>
+            <entry key="ws-security.enable.streaming" value="true"/>
+        </jaxws:properties>
+    </jaxws:endpoint>
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2endorsing" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2EndorsingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml2endorsing" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="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>
+    
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitsymmetricsaml2supporting" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItSymmetricSAML2SupportingPort" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.x509.StaxServer}/doubleit/services/doubleitsymmetricsaml2supporting" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleIt.wsdl">
+        <jaxws:properties>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="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>


[4/4] cxf git commit: Adding Asymmetric STS test

Posted by co...@apache.org.
Adding Asymmetric STS test


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

Branch: refs/heads/3.1.x-fixes
Commit: d1bb6c14ce0e9431adedc324bcf069209d9fe4d8
Parents: 710beae
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Mon Feb 15 16:20:45 2016 +0000
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Mon Feb 15 16:21:17 2016 +0000

----------------------------------------------------------------------
 .../cxf/systest/sts/x509/AsymmetricServer.java  |  50 ++++++
 .../sts/x509/X509AsymmetricBindingTest.java     | 103 ++++++++++++
 .../cxf/systest/sts/deployment/cxf-x509.xml     |   7 +
 .../systest/sts/x509/DoubleItAsymmetric.wsdl    | 159 +++++++++++++++++++
 .../systest/sts/x509/cxf-asymmetric-service.xml |  50 ++++++
 .../apache/cxf/systest/sts/x509/cxf-client.xml  |  12 ++
 .../test/resources/serviceKeystore2.properties  |  26 +++
 7 files changed, 407 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java
new file mode 100644
index 0000000..72d741f
--- /dev/null
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/AsymmetricServer.java
@@ -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;
+
+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 AsymmetricServer extends AbstractBusTestServerBase {
+
+    public AsymmetricServer() {
+
+    }
+
+    protected void run()  {
+        URL busFile = AsymmetricServer.class.getResource("cxf-asymmetric-service.xml");
+        Bus busLocal = new SpringBusFactory().createBus(busFile);
+        BusFactory.setDefaultBus(busLocal);
+        setBus(busLocal);
+
+        try {
+            new AsymmetricServer();
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+    }
+    
+    public static void main(String args[]) {
+        new AsymmetricServer().run();
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java
new file mode 100644
index 0000000..344819f
--- /dev/null
+++ b/services/sts/systests/basic/src/test/java/org/apache/cxf/systest/sts/x509/X509AsymmetricBindingTest.java
@@ -0,0 +1,103 @@
+/**
+ * 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;
+
+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;
+
+/**
+ * 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 asymmetric binding. The SAML Token contains a role, that is
+ * required by the endpoint to access the service correctly. Therefore, client authentication is done by the
+ * asymmetric signature, authorization is done by extracting roles from the SAML Token.
+ */
+public class X509AsymmetricBindingTest 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(AsymmetricServer.class);
+    
+    @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(AsymmetricServer.class, 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 testX509SAML2() throws Exception {
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = X509AsymmetricBindingTest.class.getResource("cxf-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        URL wsdl = X509AsymmetricBindingTest.class.getResource("DoubleItAsymmetric.wsdl");
+        Service service = Service.create(wsdl, SERVICE_QNAME);
+        QName portQName = new QName(NAMESPACE, "DoubleItAsymmetricSAML2Port");
+        DoubleItPortType port = 
+            service.getPort(portQName, DoubleItPortType.class);
+        updateAddressPort(port, PORT);
+        
+        TokenTestUtils.updateSTSPort((BindingProvider)port, STSPORT2);
+        
+        doubleIt(port, 30);
+        
+        ((java.io.Closeable)port).close();
+        bus.shutdown(true);
+    }
+    
+    private static void doubleIt(DoubleItPortType port, int numToDouble) {
+        int resp = port.doubleIt(numToDouble);
+        assertEquals(numToDouble * 2, resp);
+    }
+}

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
index ecfb467..3489adc 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/deployment/cxf-x509.xml
@@ -35,6 +35,7 @@
         <property name="services" ref="x509Service"/>
         <property name="stsProperties" ref="x509STSProperties"/>
         <property name="delegationHandlers" ref="utDelegationHandler"/>
+        <property name="claimsManager" ref="claimsManager"/>
     </bean>
     <bean id="x509ValidateDelegate" class="org.apache.cxf.sts.operation.TokenValidateOperation">
         <property name="tokenValidators" ref="x509SamlTokenValidator"/>
@@ -48,6 +49,12 @@
         <ref bean="x509SamlTokenValidator"/>
         <bean class="org.apache.cxf.systest.sts.username_onbehalfof.UsernameTokenValidator"/>
     </util:list>
+    <bean id="claimsManager" class="org.apache.cxf.sts.claims.ClaimsManager">
+        <property name="claimHandlers" ref="customClaimsHandler"/>
+    </bean>
+    <bean id="customClaimsHandler" class="org.apache.cxf.systest.sts.deployment.CustomClaimsHandler">
+    </bean>
+        
     <bean id="x509Service" class="org.apache.cxf.sts.service.StaticService">
         <property name="endpoints" ref="x509Endpoints"/>
     </bean>

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl
new file mode 100644
index 0000000..06c3ff6
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl
@@ -0,0 +1,159 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<wsdl:definitions xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:di="http://www.example.org/schema/DoubleIt" xmlns:tns="http://www.example.org/contract/DoubleIt" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702" xmlns:t="http://docs.oasis-open.org/ws-sx/ws-trust/200512" xmlns:wsaw="http://www.w3.org/2005/08/addressing" xmlns:wsx="http://schemas.xmlsoap.org/ws/2004/09/mex" name="DoubleIt" targetNamespace="http://www.example.org/contract/DoubleIt">
+    <wsdl:import location="src/test/resources/DoubleItLogical.wsdl" namespace="http://www.example.org/contract/DoubleIt"/>
+    <wsdl:binding name="DoubleItAsymmetricSAML2Binding" type="tns:DoubleItPortType">
+        <wsp:PolicyReference URI="#DoubleItBindingAsymmetricSAML2Policy"/>
+        <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:operation>
+    </wsdl:binding>
+    <wsdl:service name="DoubleItService">
+        <wsdl:port name="DoubleItAsymmetricSAML2Port" binding="tns:DoubleItAsymmetricSAML2Binding">
+            <soap:address location="http://localhost:8082/doubleit/services/doubleitasymmetricsaml2"/>
+        </wsdl:port>
+    </wsdl:service>
+    <wsp:Policy wsu:Id="DoubleItBindingAsymmetricSAML2Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:AsymmetricBinding>
+                    <wsp:Policy>
+                        <sp:InitiatorToken>
+                            <wsp:Policy>
+                                <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                                    <wsp:Policy>
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:InitiatorToken>
+                        <sp:RecipientToken>
+                            <wsp:Policy>
+                                <sp:X509Token sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/Never">
+                                    <wsp:Policy>
+                                        <sp:WssX509V3Token10/>
+                                        <sp:RequireIssuerSerialReference/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:RecipientToken>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Lax/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic128/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                    </wsp:Policy>
+                </sp:AsymmetricBinding>
+                <sp:SignedSupportingTokens>
+                    <wsp:Policy>
+                        <sp:IssuedToken sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                            <sp:RequestSecurityTokenTemplate>
+                                <t:TokenType>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV2.0</t:TokenType>
+                                <t:KeyType>http://docs.oasis-open.org/ws-sx/ws-trust/200512/Bearer</t:KeyType>
+                                <t:Claims xmlns:ic="http://schemas.xmlsoap.org/ws/2005/05/identity" Dialect="http://schemas.xmlsoap.org/ws/2005/05/identity">
+                                    <ic:ClaimType Uri="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role"/>
+                                </t:Claims>
+                            </sp:RequestSecurityTokenTemplate>
+                            <wsp:Policy>
+                                <sp:RequireInternalReference/>
+                            </wsp:Policy>
+                        </sp:IssuedToken>
+                    </wsp:Policy>
+                </sp:SignedSupportingTokens>
+                <sp:Wss11>
+                    <wsp:Policy>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                    </wsp:Policy>
+                </sp:Wss11>
+                <sp:Trust13>
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust13>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Input_Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:EncryptedParts>
+                    <sp:Body/>
+                </sp:EncryptedParts>
+                <sp:SignedParts>
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="AckRequested" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="SequenceAcknowledgement" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="Sequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="CreateSequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                </sp:SignedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+    <wsp:Policy wsu:Id="DoubleItBinding_DoubleIt_Output_Policy">
+        <wsp:ExactlyOne>
+            <wsp:All>
+                <sp:EncryptedParts>
+                    <sp:Body/>
+                </sp:EncryptedParts>
+                <sp:SignedParts>
+                    <sp:Body/>
+                    <sp:Header Name="To" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="From" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="FaultTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="ReplyTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="MessageID" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="RelatesTo" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="Action" Namespace="http://www.w3.org/2005/08/addressing"/>
+                    <sp:Header Name="AckRequested" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="SequenceAcknowledgement" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="Sequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                    <sp:Header Name="CreateSequence" Namespace="http://docs.oasis-open.org/ws-rx/wsrm/200702"/>
+                </sp:SignedParts>
+            </wsp:All>
+        </wsp:ExactlyOne>
+    </wsp:Policy>
+</wsdl:definitions>

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml
new file mode 100644
index 0000000..02d3158
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-asymmetric-service.xml
@@ -0,0 +1,50 @@
+<?xml version="1.0"?>
+<!--
+ 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"/>
+    
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+    
+    <bean id="authorizationInterceptor" 
+         class="org.apache.cxf.interceptor.security.SimpleAuthorizingInterceptor">
+       <property name="methodRolesMap">
+           <map>
+               <entry key="doubleIt" value="ordinary-user"/>
+           </map>
+       </property>
+    </bean>
+    
+    <jaxws:endpoint xmlns:s="http://www.example.org/contract/DoubleIt" id="doubleitasymmetricsaml2" implementor="org.apache.cxf.systest.sts.common.DoubleItPortTypeImpl" endpointName="s:DoubleItAsymmetricSAML2Port" serviceName="s:DoubleItService" address="http://localhost:${testutil.ports.AsymmetricServer}/doubleit/services/doubleitasymmetricsaml2" wsdlLocation="org/apache/cxf/systest/sts/x509/DoubleItAsymmetric.wsdl">
+        <jaxws:properties>
+            <entry key="security.signature.username" value="myservicekey"/>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="security.signature.properties" value="serviceKeystore2.properties"/>
+            <entry key="security.encryption.username" value="useReqSigCert"/>
+        </jaxws:properties>
+        <jaxws:inInterceptors>
+             <ref bean="authorizationInterceptor"/>
+        </jaxws:inInterceptors>
+    </jaxws:endpoint>
+    
+</beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
index 9afda0c..b3653f4 100644
--- a/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
+++ b/services/sts/systests/basic/src/test/resources/org/apache/cxf/systest/sts/x509/cxf-client.xml
@@ -63,4 +63,16 @@
             <entry key="security.sts.client" value-ref="stsClient"/>
         </jaxws:properties>
     </jaxws:client>
+    
+     <jaxws:client name="{http://www.example.org/contract/DoubleIt}DoubleItAsymmetricSAML2Port" createdFromAPI="true">
+        <jaxws:properties>
+            <entry key="security.signature.properties" value="clientKeystore.properties"/>
+            <entry key="security.signature.username" value="myclientkey"/>
+            <entry key="security.callback-handler" value="org.apache.cxf.systest.sts.common.CommonCallbackHandler"/>
+            <entry key="security.encryption.properties" value="clientKeystore.properties"/>
+            <entry key="security.encryption.username" value="myservicekey"/>
+            <entry key="security.sts.client" value-ref="stsClient"/>
+        </jaxws:properties>
+    </jaxws:client>
+    
 </beans>

http://git-wip-us.apache.org/repos/asf/cxf/blob/d1bb6c14/services/sts/systests/basic/src/test/resources/serviceKeystore2.properties
----------------------------------------------------------------------
diff --git a/services/sts/systests/basic/src/test/resources/serviceKeystore2.properties b/services/sts/systests/basic/src/test/resources/serviceKeystore2.properties
new file mode 100644
index 0000000..7cadde9
--- /dev/null
+++ b/services/sts/systests/basic/src/test/resources/serviceKeystore2.properties
@@ -0,0 +1,26 @@
+#
+# 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.ws.security.crypto.provider=org.apache.ws.security.components.crypto.Merlin
+org.apache.ws.security.crypto.merlin.keystore.type=jks
+org.apache.ws.security.crypto.merlin.keystore.password=sspass
+org.apache.ws.security.crypto.merlin.keystore.alias=myservicekey
+org.apache.ws.security.crypto.merlin.keystore.file=servicestore.jks
+org.apache.ws.security.crypto.merlin.truststore.password=stsspass
+org.apache.ws.security.crypto.merlin.truststore.file=stsstore.jks
+