You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by ow...@apache.org on 2011/12/21 22:54:04 UTC

svn commit: r1221896 [3/4] - in /cxf/sandbox/fediz: ./ fediz-core/ fediz-core/.settings/ fediz-core/src/ fediz-core/src/main/ fediz-core/src/main/java/ fediz-core/src/main/java/org/ fediz-core/src/main/java/org/apache/ fediz-core/src/main/java/org/apac...

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/PasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/PasswordCallbackHandler.java?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/PasswordCallbackHandler.java (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/PasswordCallbackHandler.java Wed Dec 21 21:53:59 2011
@@ -0,0 +1,42 @@
+/*
+ * 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.fediz.service.sts;
+
+import java.io.IOException;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class PasswordCallbackHandler implements CallbackHandler {
+
+	public void handle(Callback[] callbacks) throws IOException,
+			UnsupportedCallbackException {
+		for (int i = 0; i < callbacks.length; i++) {
+			if (callbacks[i] instanceof WSPasswordCallback) { // CXF
+				WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+				if ("mystskey".equals(pc.getIdentifier())) {
+					pc.setPassword("stskpass");
+					break;
+				}
+			}
+		}
+	}
+
+}

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/UsernamePasswordCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/UsernamePasswordCallbackHandler.java?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/UsernamePasswordCallbackHandler.java (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/java/org/apache/cxf/fediz/service/sts/UsernamePasswordCallbackHandler.java Wed Dec 21 21:53:59 2011
@@ -0,0 +1,57 @@
+/*
+ * 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.fediz.service.sts;
+
+import java.io.IOException;
+import java.util.Map;
+
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import org.apache.ws.security.WSPasswordCallback;
+
+public class UsernamePasswordCallbackHandler implements CallbackHandler {
+
+	private Map<String,String> passwords;
+	
+	public void setPasswords(Map<String,String> passwords) {
+		this.passwords = passwords;
+	}
+
+	public Map<String,String> getPasswords() {
+		return passwords;
+	}
+	
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+    	
+    	if (getPasswords() == null || getPasswords().size() == 0)
+    		return;
+    	
+        for (int i = 0; i < callbacks.length; i++) {
+            if (callbacks[i] instanceof WSPasswordCallback) { // CXF
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+                
+                String pw = getPasswords().get(pc.getIdentifier());
+                pc.setPassword(pw);
+            }
+        }
+    }
+	
+    
+}

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/log4j.properties?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/log4j.properties (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/log4j.properties Wed Dec 21 21:53:59 2011
@@ -0,0 +1,17 @@
+# Set root category priority to INFO and its only appender to CONSOLE.
+log4j.rootCategory=FATAL, CONSOLE
+#log4j.rootCategory=DEBUG, CONSOLE
+
+# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
+log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
+log4j.appender.CONSOLE.Threshold=DEBUG
+log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
+log4j.appender.CONSOLE.layout.ConversionPattern=- %m%n
+
+# LOGFILE is set to be a File appender using a PatternLayout.
+log4j.appender.LOGFILE=org.apache.log4j.FileAppender
+log4j.appender.LOGFILE.File=target/wss4j.log
+log4j.appender.LOGFILE.Append=false
+log4j.appender.LOGFILE.Threshold=DEBUG
+log4j.appender.LOGFILE.layout=org.apache.log4j.PatternLayout
+log4j.appender.LOGFILE.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/logging.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/logging.properties?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/logging.properties (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/logging.properties Wed Dec 21 21:53:59 2011
@@ -0,0 +1,52 @@
+############################################################
+#  	Default Logging Configuration File
+#
+# You can use a different file by specifying a filename
+# with the java.util.logging.config.file system property.  
+# For example java -Djava.util.logging.config.file=myfile
+############################################################
+
+############################################################
+#  	Global properties
+############################################################
+
+# "handlers" specifies a comma separated list of log Handler 
+# classes.  These handlers will be installed during VM startup.
+# Note that these classes must be on the system classpath.
+# By default we only configure a ConsoleHandler, which will only
+# show messages at the WARNING and above levels.
+handlers= java.util.logging.ConsoleHandler
+#handlers= java.util.logging.FileHandler, java.util.logging.ConsoleHandler
+
+# Default global logging level.
+# This specifies which kinds of events are logged across
+# all loggers.  For any given facility this global level
+# can be overridden by a facility specific level
+# Note that the ConsoleHandler also has a separate level
+# setting to limit messages printed to the console.
+.level= INFO
+
+############################################################
+# Handler specific properties.
+# Describes specific configuration info for Handlers.
+############################################################
+
+# default file output is in user's home directory.
+java.util.logging.FileHandler.pattern = %h/java%u.log
+java.util.logging.FileHandler.limit = 50000
+java.util.logging.FileHandler.count = 1
+java.util.logging.FileHandler.formatter = java.util.logging.XMLFormatter
+
+# Limit the message that are printed on the console to WARNING and above.
+java.util.logging.ConsoleHandler.level = INFO
+java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
+
+
+############################################################
+# Facility specific properties.
+# Provides extra control for each logger.
+############################################################
+
+# For example, set the com.xyz.foo logger to only log SEVERE
+# messages:
+#com.xyz.foo.level = SEVERE

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsKeystore.properties
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsKeystore.properties?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsKeystore.properties (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsKeystore.properties Wed Dec 21 21:53:59 2011
@@ -0,0 +1,6 @@
+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=stsspass
+org.apache.ws.security.crypto.merlin.keystore.alias=mystskey
+org.apache.ws.security.crypto.merlin.file=stsstore.jks
+

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsstore.jks
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsstore.jks?rev=1221896&view=auto
==============================================================================
Binary file - no diff available.

Propchange: cxf/sandbox/fediz/fediz-idp-sts/src/main/resources/stsstore.jks
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-encrypted-ut.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-encrypted-ut.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-encrypted-ut.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-encrypted-ut.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans 
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:cxf="http://cxf.apache.org/core"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:test="http://apache.org/hello_world_soap_http"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="
+        http://cxf.apache.org/core
+        http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://cxf.apache.org/jaxws                                     
+        http://cxf.apache.org/schemas/jaxws.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+    <import resource="cxf-transport.xml"/>    
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <bean id="encryptedUtSTSProviderBean"
+		class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+		<property name="issueOperation" ref="encryptedUtIssueDelegate"/>
+		<property name="validateOperation" ref="encryptedUtValidateDelegate"/>
+	</bean>	
+
+	<bean id="encryptedUtIssueDelegate"
+		class="org.apache.cxf.sts.operation.TokenIssueOperation">
+		<property name="tokenProviders" ref="encryptedUtSamlTokenProvider"/>
+		<property name="services" ref="encryptedUtService"/>
+		<property name="stsProperties" ref="encryptedUtSTSProperties"/>
+	</bean>
+	
+	<bean id="encryptedUtValidateDelegate"
+	    class="org.apache.cxf.sts.operation.TokenValidateOperation">
+	</bean>
+	
+	<bean id="encryptedUtSamlTokenProvider"
+		class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
+    </bean>
+    
+    <bean id="encryptedUtService"
+        class="org.apache.cxf.sts.service.StaticService">
+        <property name="endpoints" ref="encryptedUtEndpoints"/>
+        <property name="encryptionName" value="myservicekey"/>
+    </bean>
+    
+    <util:list id="encryptedUtEndpoints">
+		<value>http://localhost:8082/doubleit/services/doubleitasymmetricsaml1encrypted</value>
+	</util:list>
+	
+	<bean id="encryptedUtSTSProperties"
+	     class="org.apache.cxf.sts.StaticSTSProperties">
+	    <property name="signatureProperties" value="stsKeystore.properties"/>
+		<property name="signatureUsername" value="mystskey"/>
+		<property name="callbackHandlerClass" value="org.apache.cxf.sts.war.PasswordCallbackHandler"/>
+		<property name="encryptionProperties" value="stsKeystore.properties"/>
+		<property name="issuer" value="DoubleItSTSIssuer"/>
+    </bean>
+    
+	<jaxws:endpoint id="EncryptedUTSTS"
+		implementor="#encryptedUtSTSProviderBean"
+		address="/UTEncrypted" 
+        wsdlLocation="/WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
+        xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        serviceName="ns1:SecurityTokenService"
+        endpointName="ns1:UTEncrypted_Port">
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler" value="org.apache.cxf.sts.war.PasswordCallbackHandler"/>
+            <entry key="ws-security.signature.properties" value="stsKeystore.properties"/>
+            <entry key="ws-security.signature.username" value="mystskey"/>
+        </jaxws:properties> 
+	</jaxws:endpoint>
+	
+
+</beans>
+

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-servlet.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-servlet.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-servlet.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-servlet.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans 
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:cxf="http://cxf.apache.org/core"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:test="http://apache.org/hello_world_soap_http"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="
+        http://cxf.apache.org/core
+        http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://cxf.apache.org/jaxws                                     
+        http://cxf.apache.org/schemas/jaxws.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+    <import resource="cxf-transport.xml"/>  
+    <!--
+    <import resource="cxf-ut.xml"/>
+    <import resource="cxf-encrypted-ut.xml"/>   
+    <import resource="cxf-x509.xml"/>   
+    -->
+    
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+</beans>
+

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-transport.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-transport.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-transport.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-transport.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,142 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:cxf="http://cxf.apache.org/core" xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xmlns:test="http://apache.org/hello_world_soap_http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:util="http://www.springframework.org/schema/util" xmlns:http="http://cxf.apache.org/transports/http/configuration"
+	xmlns:sec="http://cxf.apache.org/configuration/security"
+	xsi:schemaLocation="
+        http://cxf.apache.org/core
+        http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://cxf.apache.org/jaxws                                     
+        http://cxf.apache.org/schemas/jaxws.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.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">
+        
+	<import resource="classpath:META-INF/cxf/cxf.xml" />
+
+	<cxf:bus>
+		<cxf:features>
+			<cxf:logging />
+		</cxf:features>
+	</cxf:bus>
+
+    <bean id="transportSTSProviderBean"
+		class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+		<property name="issueOperation" ref="transportIssueDelegate"/>
+		<property name="validateOperation" ref="transportValidateDelegate"/>
+	</bean>	
+
+	<bean id="transportIssueDelegate"
+		class="org.apache.cxf.sts.operation.TokenIssueOperation">
+		<property name="tokenProviders" ref="transportTokenProviders"/>
+		<property name="services" ref="transportService"/>
+		<property name="stsProperties" ref="transportSTSProperties"/>
+		<property name="claimsManager" ref="claimsManager"/>
+	</bean>
+	
+	<bean id="transportValidateDelegate"
+	    class="org.apache.cxf.sts.operation.TokenValidateOperation">
+	    <property name="tokenValidators" ref="transportTokenValidators"/>
+		<property name="stsProperties" ref="transportSTSProperties"/>
+	</bean>
+
+	<util:list id="transportTokenProviders">
+		<ref bean="transportSamlTokenProvider" />
+	</util:list>
+
+	<util:list id="transportTokenValidators">
+		<ref bean="transportSamlTokenValidator" />
+	</util:list>
+
+	<bean id="transportSamlTokenProvider" class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
+	    <property name="attributeStatementProviders" ref="attributeStatementProvidersList" />
+	</bean>
+
+	<bean id="transportSamlTokenValidator" class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
+	</bean>
+	
+	<bean id="transportX509TokenValidator"
+		class="org.apache.cxf.sts.token.validator.X509TokenValidator">
+    </bean>
+    
+    <bean id="transportUsernameTokenValidator"
+		class="org.apache.cxf.sts.token.validator.UsernameTokenValidator">
+    </bean>
+
+    <util:list id="attributeStatementProvidersList">
+		<ref bean="claimsAttributeProvider"/>
+	</util:list>
+    
+    <bean id="defaultAttributeProvider"
+		class="org.apache.cxf.sts.token.provider.DefaultAttributeStatementProvider">
+    </bean>
+    
+    <bean id="claimsAttributeProvider"
+		class="org.apache.cxf.sts.claims.ClaimsAttributeStatementProvider">
+    </bean>
+    
+    <import resource="userClaims.xml" />
+    
+    <bean id="claimsManager"
+		class="org.apache.cxf.sts.claims.ClaimsManager">
+		<property name="claimHandlers" ref="claimHandlerList" />
+    </bean>
+    
+    <util:list id="claimHandlerList">
+		<ref bean="fileClaimsHandler"/>
+	</util:list>
+    
+    <bean id="fileClaimsHandler"
+		class="org.apache.cxf.fediz.service.sts.FileClaimsHandler">
+		
+		<property name="userClaims" ref="userClaims" />
+    </bean>
+    
+    <import resource="passwords.xml" />
+    
+    <bean id="upCallBackHandler"
+		class="org.apache.cxf.fediz.service.sts.UsernamePasswordCallbackHandler">
+		<property name="passwords" ref="passwords" />
+    </bean>
+    
+    
+    <bean id="transportService"
+        class="org.apache.cxf.sts.service.StaticService">
+        <property name="endpoints" ref="transportEndpoints"/>
+    </bean>
+    
+    <util:list id="transportEndpoints">
+        <value>.*</value>
+		<value>https://localhost:(8081|8083)/doubleit/services/doubleittransport.*</value>
+	</util:list>
+	
+	<bean id="transportSTSProperties"
+	     class="org.apache.cxf.sts.StaticSTSProperties">
+	    <property name="signaturePropertiesFile" value="stsKeystore.properties"/>
+		<property name="signatureUsername" value="mystskey"/>
+		<property name="callbackHandlerClass" value="org.apache.cxf.fediz.service.sts.PasswordCallbackHandler"/>
+		<property name="encryptionPropertiesFile" value="stsKeystore.properties"/>
+		<property name="issuer" value="DoubleItSTSIssuer"/>
+		<property name="encryptionUsername" value="myservicekey"/>
+    </bean>
+     
+	<jaxws:endpoint id="transportSTS1"
+		implementor="#transportSTSProviderBean"
+		address="/STSService" 
+        wsdlLocation="/WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
+        xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        serviceName="ns1:SecurityTokenService"
+        endpointName="ns1:TransportUT_Port">
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler" value-ref="upCallBackHandler"/>
+        </jaxws:properties> 
+	</jaxws:endpoint>
+
+</beans>
+

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-ut.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-ut.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-ut.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-ut.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans 
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:cxf="http://cxf.apache.org/core"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:test="http://apache.org/hello_world_soap_http"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="
+        http://cxf.apache.org/core
+        http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://cxf.apache.org/jaxws                                     
+        http://cxf.apache.org/schemas/jaxws.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+    <import resource="cxf-transport.xml"/>    
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <bean id="utSTSProviderBean"
+		class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+		<property name="issueOperation" ref="utIssueDelegate"/>
+		<property name="validateOperation" ref="utValidateDelegate"/>
+	</bean>	
+
+	<bean id="utIssueDelegate"
+		class="org.apache.cxf.sts.operation.TokenIssueOperation">
+		<property name="tokenProviders" ref="utSamlTokenProvider"/>
+		<property name="services" ref="utService"/>
+		<property name="stsProperties" ref="utSTSProperties"/>
+	</bean>
+	
+	<bean id="utValidateDelegate"
+	    class="org.apache.cxf.sts.operation.TokenValidateOperation">
+	    <property name="tokenValidators" ref="utSamlTokenValidator"/>
+		<property name="stsProperties" ref="utSTSProperties"/>
+	</bean>
+	
+	<bean id="utSamlTokenProvider"
+		class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
+    </bean>
+    
+    <bean id="utSamlTokenValidator"
+		class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
+    </bean>
+    
+    <bean id="utService"
+        class="org.apache.cxf.sts.service.StaticService">
+        <property name="endpoints" ref="utEndpoints"/>
+        <property name="encryptionName" value="myservicekey"/>
+    </bean>
+    
+    <util:list id="utEndpoints">
+		<value>http://localhost:(8080|8082)/doubleit/services/doubleit(UT|.*symmetric.*)</value>
+	</util:list>
+	
+	<bean id="utSTSProperties"
+	     class="org.apache.cxf.sts.StaticSTSProperties">
+	    <property name="signatureProperties" value="stsKeystore.properties"/>
+		<property name="signatureUsername" value="mystskey"/>
+		<property name="callbackHandlerClass" value="org.apache.cxf.sts.war.PasswordCallbackHandler"/>
+		<property name="encryptionProperties" value="stsKeystore.properties"/>
+		<property name="issuer" value="DoubleItSTSIssuer"/>
+    </bean>
+    
+	<jaxws:endpoint id="UTSTS"
+		implementor="#utSTSProviderBean"
+		address="/UT" 
+        wsdlLocation="/WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
+        xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        serviceName="ns1:SecurityTokenService"
+        endpointName="ns1:UT_Port">
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler" value="org.apache.cxf.sts.war.PasswordCallbackHandler"/>
+            <entry key="ws-security.signature.properties" value="stsKeystore.properties"/>
+            <entry key="ws-security.signature.username" value="mystskey"/>
+        </jaxws:properties> 
+	</jaxws:endpoint>
+	
+
+</beans>
+

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-x509.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-x509.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-x509.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/cxf-x509.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,90 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans 
+    xmlns="http://www.springframework.org/schema/beans"
+    xmlns:cxf="http://cxf.apache.org/core"
+    xmlns:jaxws="http://cxf.apache.org/jaxws"
+    xmlns:test="http://apache.org/hello_world_soap_http"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:util="http://www.springframework.org/schema/util"
+    xsi:schemaLocation="
+        http://cxf.apache.org/core
+        http://cxf.apache.org/schemas/core.xsd
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://cxf.apache.org/jaxws                                     
+        http://cxf.apache.org/schemas/jaxws.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+    <import resource="cxf-transport.xml"/>    
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <bean id="x509STSProviderBean"
+		class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+		<property name="issueOperation" ref="x509IssueDelegate"/>
+		<property name="validateOperation" ref="x509ValidateDelegate"/>
+	</bean>	
+
+	<bean id="x509IssueDelegate"
+		class="org.apache.cxf.sts.operation.TokenIssueOperation">
+		<property name="tokenProviders" ref="x509SamlTokenProvider"/>
+		<property name="services" ref="x509Service"/>
+		<property name="stsProperties" ref="x509STSProperties"/>
+	</bean>
+	
+	<bean id="x509ValidateDelegate"
+	    class="org.apache.cxf.sts.operation.TokenValidateOperation">
+	    <property name="tokenValidators" ref="x509SamlTokenValidator"/>
+		<property name="stsProperties" ref="x509STSProperties"/>
+	</bean>
+	
+	<bean id="x509SamlTokenProvider"
+		class="org.apache.cxf.sts.token.provider.SAMLTokenProvider">
+    </bean>
+    
+    <bean id="x509SamlTokenValidator"
+		class="org.apache.cxf.sts.token.validator.SAMLTokenValidator">
+    </bean>
+    
+    <bean id="x509Service"
+        class="org.apache.cxf.sts.service.StaticService">
+        <property name="endpoints" ref="x509Endpoints"/>
+        <property name="encryptionName" value="myservicekey"/>
+    </bean>
+    
+    <util:list id="x509Endpoints">
+		<value>http://localhost:8082/doubleit/services/doubleitsymmetric.*</value>
+		<value>http://localhost:8082/doubleit/services/doubleitasymmetric.*</value>
+	</util:list>
+	
+	<bean id="x509STSProperties"
+	     class="org.apache.cxf.sts.StaticSTSProperties">
+	    <property name="signatureProperties" value="stsKeystore.properties"/>
+		<property name="signatureUsername" value="mystskey"/>
+		<property name="callbackHandlerClass" value="org.apache.cxf.sts.war.PasswordCallbackHandler"/>
+		<property name="encryptionProperties" value="stsKeystore.properties"/>
+		<property name="issuer" value="DoubleItSTSIssuer"/>
+    </bean>
+    
+	<jaxws:endpoint id="X509STS"
+		implementor="#x509STSProviderBean"
+		address="/X509" 
+        wsdlLocation="/WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
+        xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        serviceName="ns1:SecurityTokenService"
+        endpointName="ns1:X509_Port">
+        <jaxws:properties>
+            <entry key="ws-security.callback-handler" value="org.apache.cxf.sts.war.PasswordCallbackHandler"/>
+            <entry key="ws-security.signature.properties" value="stsKeystore.properties"/>
+            <entry key="ws-security.signature.username" value="mystskey"/>
+            <entry key="ws-security.encryption.username" value="useReqSigCert"/>
+        </jaxws:properties> 
+	</jaxws:endpoint>
+	
+
+</beans>
+

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/passwords.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/passwords.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/passwords.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/passwords.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+
+	<util:map id="passwords">
+		<entry key="alice"
+			value="ecila" />
+		<entry key="bob"
+			value="bob" />
+		<entry key="ted"
+			value="det" />
+	</util:map>
+
+</beans>
\ No newline at end of file

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/userClaims.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/userClaims.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/userClaims.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/userClaims.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="
+        http://www.springframework.org/schema/beans
+        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+        http://www.springframework.org/schema/util
+        http://www.springframework.org/schema/util/spring-util-2.0.xsd">
+
+	<util:map id="userClaims">
+		<entry key="alice"
+			value-ref="aliceClaims" />
+		<entry key="bob"
+			value-ref="bobClaims" />
+		<entry key="ted"
+			value-ref="tedClaims" />
+	</util:map>
+	
+	<util:map id="aliceClaims">
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
+			value="Alice" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
+			value="Smith" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
+			value="alice@mycompany.org" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role"
+			value="User" />
+			
+	</util:map>
+	
+	<util:map id="bobClaims">
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
+			value="Bob" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
+			value="Windsor" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
+			value="bobwindsor@idp.org" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role"
+			value="User,Manager,Admin" />
+	</util:map>
+	
+	<util:map id="tedClaims">
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname"
+			value="Ted" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"
+			value="Cooper" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress"
+			value="tcooper@hereiam.org" />
+		<entry key="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/role"
+			value="" />			
+	</util:map>
+
+</beans>
\ No newline at end of file

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/web.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/web.xml (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/web.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
+	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
+         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+	<display-name>CXF STS</display-name>
+	<servlet>
+		<servlet-name>sts</servlet-name>
+		<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+		<!-- <load-on-startup>1</load-on-startup> -->
+		<init-param>
+			<param-name>config-location</param-name>
+			<param-value>WEB-INF/cxf-servlet.xml</param-value>
+		</init-param>
+	</servlet>
+	<servlet-mapping>
+		<servlet-name>sts</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+	<session-config>
+		<session-timeout>60</session-timeout>
+	</session-config>
+	
+</web-app>

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4-service.wsdl
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4-service.wsdl?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4-service.wsdl (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4-service.wsdl Wed Dec 21 21:53:59 2011
@@ -0,0 +1,846 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<wsdl:definitions
+        targetNamespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        xmlns:tns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        xmlns:wstrust="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
+        xmlns:wsap10="http://www.w3.org/2006/05/addressing/wsdl"
+        xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+        xmlns:wsp="http://www.w3.org/ns/ws-policy">
+
+  <wsdl:import namespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/" location="ws-trust-1.4.wsdl"/>
+
+  <wsdl:binding name="UT_Binding" type="wstrust:STS">
+    <wsp:PolicyReference URI="#UT_policy" />
+  	<soap:binding style="document"
+  		transport="http://schemas.xmlsoap.org/soap/http" />
+  	<wsdl:operation name="Issue">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Validate">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Cancel">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Renew">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="KeyExchangeToken">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="RequestCollection">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  </wsdl:binding>
+  
+  <wsdl:binding name="UTEncrypted_Binding" type="wstrust:STS">
+    <wsp:PolicyReference URI="#UTEncrypted_policy" />
+  	<soap:binding style="document"
+  		transport="http://schemas.xmlsoap.org/soap/http" />
+  	<wsdl:operation name="Issue">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Validate">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Cancel">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Renew">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="KeyExchangeToken">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="RequestCollection">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  </wsdl:binding>
+  
+  <wsdl:binding name="X509_Binding" type="wstrust:STS">
+    <wsp:PolicyReference URI="#X509_policy" />
+  	<soap:binding style="document"
+  		transport="http://schemas.xmlsoap.org/soap/http" />
+  	<wsdl:operation name="Issue">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Validate">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Cancel">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Renew">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="KeyExchangeToken">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="RequestCollection">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  </wsdl:binding>
+  
+  <wsdl:binding name="Transport_Binding" type="wstrust:STS">
+    <wsp:PolicyReference URI="#Transport_policy" />
+  	<soap:binding style="document"
+  		transport="http://schemas.xmlsoap.org/soap/http" />
+  	<wsdl:operation name="Issue">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Validate">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Cancel">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Renew">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="KeyExchangeToken">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="RequestCollection">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="TransportUT_Binding" type="wstrust:STS">
+    <wsp:PolicyReference URI="#TransportUT_policy" />
+  	<soap:binding style="document"
+  		transport="http://schemas.xmlsoap.org/soap/http" />
+  	<wsdl:operation name="Issue">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Validate">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Cancel">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Renew">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="KeyExchangeToken">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="RequestCollection">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  </wsdl:binding>
+  <wsdl:binding name="TransportKerberos_Binding" type="wstrust:STS">
+    <wsp:PolicyReference URI="#TransportKerberos_policy" />
+  	<soap:binding style="document"
+  		transport="http://schemas.xmlsoap.org/soap/http" />
+  	<wsdl:operation name="Issue">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Validate">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" />
+  		<wsdl:input>
+  		    <wsp:PolicyReference
+               URI="#Input_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  		    <wsp:PolicyReference
+               URI="#Output_policy" />
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Cancel">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="Renew">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="KeyExchangeToken">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KeyExchangeToken" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  	<wsdl:operation name="RequestCollection">
+  		<soap:operation
+  			soapAction="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/RequestCollection" />
+  		<wsdl:input>
+  			<soap:body use="literal" />
+  		</wsdl:input>
+  		<wsdl:output>
+  			<soap:body use="literal" />
+  		</wsdl:output>
+  	</wsdl:operation>
+  </wsdl:binding>  
+  <wsdl:service name="SecurityTokenService">
+      <wsdl:port name="UT_Port" binding="tns:UT_Binding">
+         <soap:address location="http://localhost:8080/jaxws-sts/sts" />
+      </wsdl:port>
+      <wsdl:port name="X509_Port" binding="tns:X509_Binding">
+         <soap:address location="http://localhost:8080/jaxws-sts/sts" />
+      </wsdl:port>
+      <wsdl:port name="Transport_Port" binding="tns:Transport_Binding">
+         <soap:address location="http://localhost:8080/jaxws-sts/sts" />
+      </wsdl:port>
+       <wsdl:port name="UTEncrypted_Port" binding="tns:UTEncrypted_Binding">
+         <soap:address location="http://localhost:8080/jaxws-sts/sts" />
+      </wsdl:port>
+       <wsdl:port name="TransportUT_Port" binding="tns:TransportUT_Binding">
+         <soap:address location="http://localhost:8080/jaxws-sts/sts" />
+      </wsdl:port>      
+      <wsdl:port name="TransportKerberos_Port" binding="tns:TransportKerberos_Binding">
+         <soap:address location="http://localhost:8080/jaxws-sts/sts" />
+      </wsdl:port>        
+  </wsdl:service>
+  
+  <wsp:Policy wsu:Id="UT_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <wsap10:UsingAddressing/>
+            <sp:SymmetricBinding
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <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:RequireDerivedKeys />
+                              <sp:RequireThumbprintReference />
+                              <sp:WssX509V3Token10 />
+                           </wsp:Policy>
+                        </sp:X509Token>
+                     </wsp:Policy>
+                  </sp:ProtectionToken>
+                  <sp:AlgorithmSuite>
+                     <wsp:Policy>
+                        <sp:Basic256 />
+                     </wsp:Policy>
+                  </sp:AlgorithmSuite>
+                  <sp:Layout>
+                     <wsp:Policy>
+                        <sp:Lax />
+                     </wsp:Policy>
+                  </sp:Layout>
+                  <sp:IncludeTimestamp />
+                  <sp:EncryptSignature />
+                  <sp:OnlySignEntireHeadersAndBody />
+               </wsp:Policy>
+            </sp:SymmetricBinding>
+            <sp:SignedSupportingTokens
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:UsernameToken
+                     sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                     <wsp:Policy>
+                        <sp:WssUsernameToken10 />
+                     </wsp:Policy>
+                  </sp:UsernameToken>
+               </wsp:Policy>
+            </sp:SignedSupportingTokens>
+            <sp:Wss11
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportRefKeyIdentifier />
+                  <sp:MustSupportRefIssuerSerial />
+                  <sp:MustSupportRefThumbprint />
+                  <sp:MustSupportRefEncryptedKey />
+               </wsp:Policy>
+            </sp:Wss11>
+            <sp:Trust13
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportIssuedTokens />
+                  <sp:RequireClientEntropy />
+                  <sp:RequireServerEntropy />
+               </wsp:Policy>
+            </sp:Trust13>
+         </wsp:All>
+      </wsp:ExactlyOne>
+   </wsp:Policy>
+   
+   <wsp:Policy wsu:Id="UTEncrypted_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <wsap10:UsingAddressing/>
+            <sp:SymmetricBinding
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <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:RequireDerivedKeys />
+                              <sp:RequireThumbprintReference />
+                              <sp:WssX509V3Token10 />
+                           </wsp:Policy>
+                        </sp:X509Token>
+                     </wsp:Policy>
+                  </sp:ProtectionToken>
+                  <sp:AlgorithmSuite>
+                     <wsp:Policy>
+                        <sp:Basic256 />
+                     </wsp:Policy>
+                  </sp:AlgorithmSuite>
+                  <sp:Layout>
+                     <wsp:Policy>
+                        <sp:Lax />
+                     </wsp:Policy>
+                  </sp:Layout>
+                  <sp:IncludeTimestamp />
+                  <sp:EncryptSignature />
+                  <sp:OnlySignEntireHeadersAndBody />
+               </wsp:Policy>
+            </sp:SymmetricBinding>
+            <sp:SignedSupportingTokens
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:UsernameToken
+                     sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                     <wsp:Policy>
+                        <sp:WssUsernameToken10 />
+                     </wsp:Policy>
+                  </sp:UsernameToken>
+               </wsp:Policy>
+            </sp:SignedSupportingTokens>
+            <sp:Wss11
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportRefKeyIdentifier />
+                  <sp:MustSupportRefIssuerSerial />
+                  <sp:MustSupportRefThumbprint />
+                  <sp:MustSupportRefEncryptedKey />
+               </wsp:Policy>
+            </sp:Wss11>
+            <sp:Trust13
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportIssuedTokens />
+                  <sp:RequireClientEntropy />
+                  <sp:RequireServerEntropy />
+               </wsp:Policy>
+            </sp:Trust13>
+         </wsp:All>
+      </wsp:ExactlyOne>
+   </wsp:Policy>
+   
+   <wsp:Policy wsu:Id="X509_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <wsap10:UsingAddressing/>
+            <sp:AsymmetricBinding
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <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:AlgorithmSuite>
+                     <wsp:Policy>
+                        <sp:TripleDesRsa15 />
+                     </wsp:Policy>
+                  </sp:AlgorithmSuite>
+                  <sp:Layout>
+                     <wsp:Policy>
+                        <sp:Lax />
+                     </wsp:Policy>
+                  </sp:Layout>
+                  <sp:IncludeTimestamp />
+                  <sp:EncryptSignature />
+                  <sp:OnlySignEntireHeadersAndBody />
+               </wsp:Policy>
+            </sp:AsymmetricBinding>
+            <sp:Wss11
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportRefKeyIdentifier />
+                  <sp:MustSupportRefIssuerSerial />
+                  <sp:MustSupportRefThumbprint />
+                  <sp:MustSupportRefEncryptedKey />
+               </wsp:Policy>
+            </sp:Wss11>
+            <sp:Trust13
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportIssuedTokens />
+                  <sp:RequireClientEntropy />
+                  <sp:RequireServerEntropy />
+               </wsp:Policy>
+            </sp:Trust13>
+         </wsp:All>
+      </wsp:ExactlyOne>
+    </wsp:Policy>
+    
+    <wsp:Policy wsu:Id="TransportUT_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <!--<wsap10:UsingAddressing/>-->
+            <sp:TransportBinding
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:TransportToken>
+                     <wsp:Policy>
+                        <sp:HttpsToken RequireClientCertificate="false"/>
+                     </wsp:Policy>
+                  </sp:TransportToken>
+                  <sp:AlgorithmSuite>
+                     <wsp:Policy>
+                        <sp:TripleDesRsa15 />
+                     </wsp:Policy>
+                  </sp:AlgorithmSuite>
+                  <sp:Layout>
+                     <wsp:Policy>
+                        <sp:Lax />
+                     </wsp:Policy>
+                  </sp:Layout>
+                  <!--<sp:IncludeTimestamp />-->
+               </wsp:Policy>
+            </sp:TransportBinding>
+            <sp:SignedSupportingTokens
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:UsernameToken
+                     sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                     <wsp:Policy>
+                        <sp:WssUsernameToken10 />
+                     </wsp:Policy>
+                  </sp:UsernameToken>
+               </wsp:Policy>
+            </sp:SignedSupportingTokens>
+            <sp:Wss11
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportRefKeyIdentifier />
+                  <sp:MustSupportRefIssuerSerial />
+                  <sp:MustSupportRefThumbprint />
+                  <sp:MustSupportRefEncryptedKey />
+               </wsp:Policy>
+            </sp:Wss11>
+            <sp:Trust13
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportIssuedTokens />
+                  <sp:RequireClientEntropy />
+                  <sp:RequireServerEntropy />
+               </wsp:Policy>
+            </sp:Trust13>
+         </wsp:All>
+      </wsp:ExactlyOne>
+   </wsp:Policy>
+
+    <wsp:Policy wsu:Id="TransportKerberos_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <!--<wsap10:UsingAddressing/>-->
+            <sp:TransportBinding
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:TransportToken>
+                     <wsp:Policy>
+                        <sp:HttpsToken RequireClientCertificate="false"/>
+                     </wsp:Policy>
+                  </sp:TransportToken>
+                  <sp:AlgorithmSuite>
+                     <wsp:Policy>
+                        <sp:TripleDesRsa15 />
+                     </wsp:Policy>
+                  </sp:AlgorithmSuite>
+                  <sp:Layout>
+                     <wsp:Policy>
+                        <sp:Lax />
+                     </wsp:Policy>
+                  </sp:Layout>
+                  <!--<sp:IncludeTimestamp />-->
+               </wsp:Policy>
+            </sp:TransportBinding>
+            <sp:SupportingTokens
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:KerberosToken
+                      sp:IncludeToken="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702/IncludeToken/AlwaysToRecipient">
+                      <wsp:Policy>
+                          <!--<sp:WssKerberosV5ApReqToken11/>-->
+                          <sp:WssGssKerberosV5ApReqToken11/>
+                      </wsp:Policy>
+                  </sp:KerberosToken>                  
+               </wsp:Policy>
+            </sp:SupportingTokens>
+            <sp:Wss11
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportRefKeyIdentifier />
+                  <sp:MustSupportRefIssuerSerial />
+                  <sp:MustSupportRefThumbprint />
+                  <sp:MustSupportRefEncryptedKey />
+               </wsp:Policy>
+            </sp:Wss11>
+            <sp:Trust13
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <wsp:Policy>
+                  <sp:MustSupportIssuedTokens />
+                  <sp:RequireClientEntropy />
+                  <sp:RequireServerEntropy />
+               </wsp:Policy>
+            </sp:Trust13>
+         </wsp:All>
+      </wsp:ExactlyOne>
+   </wsp:Policy>
+   
+   
+   <wsp:Policy wsu:Id="Input_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <sp:SignedParts
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <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:SignedParts>
+            <sp:EncryptedParts
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <sp:Body />
+            </sp:EncryptedParts>
+         </wsp:All>
+      </wsp:ExactlyOne>
+   </wsp:Policy>
+   
+   <wsp:Policy wsu:Id="Output_policy">
+      <wsp:ExactlyOne>
+         <wsp:All>
+            <sp:SignedParts
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <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:SignedParts>
+            <sp:EncryptedParts
+               xmlns:sp="http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702">
+               <sp:Body />
+            </sp:EncryptedParts>
+         </wsp:All>
+      </wsp:ExactlyOne>
+   </wsp:Policy>
+
+</wsdl:definitions>

Added: cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4.wsdl
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4.wsdl?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4.wsdl (added)
+++ cxf/sandbox/fediz/fediz-idp-sts/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4.wsdl Wed Dec 21 21:53:59 2011
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+OASIS takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on OASIS's procedures with respect to rights in OASIS specifications can be found at the OASIS website. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification, can be obtained from the OASIS Executive Director.
+OASIS invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to implement this specification. Please address the information to the OASIS Executive Director.
+Copyright © OASIS Open 2002-2006. All Rights Reserved.
+This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself does not be modified in any way, such as by removing the copyright notice or references to OASIS, except as needed for the purpose of developing OASIS specifications, in which case the procedures for copyrights defined in the OASIS Intellectual Property Rights document must be followed, or as required to translate it into languages other than English.
+The limited permissions granted above are perpetual and will not be revoked by OASIS or its successors or assigns.
+This document and the information contained herein is provided on an AS IS basis and OASIS DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
+-->
+<wsdl:definitions
+        targetNamespace="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        xmlns:tns="http://docs.oasis-open.org/ws-sx/ws-trust/200512/"
+        xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+        xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
+        xmlns:xs="http://www.w3.org/2001/XMLSchema"
+        xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata">
+  <wsdl:types>
+    <xs:schema elementFormDefault="qualified" targetNamespace='http://docs.oasis-open.org/ws-sx/ws-trust/200512'>
+      
+      <xs:element name='RequestSecurityToken' type='wst:AbstractRequestSecurityTokenType' />
+      <xs:element name='RequestSecurityTokenResponse' type='wst:AbstractRequestSecurityTokenType' />
+     
+      <xs:complexType name='AbstractRequestSecurityTokenType' >
+        <xs:sequence>
+          <xs:any namespace='##any' processContents='lax' minOccurs='0' maxOccurs='unbounded' />
+        </xs:sequence>
+        <xs:attribute name='Context' type='xs:anyURI' use='optional' />
+        <xs:anyAttribute namespace='##other' processContents='lax' />
+      </xs:complexType>
+      <xs:element name='RequestSecurityTokenCollection' type='wst:RequestSecurityTokenCollectionType' />
+      <xs:complexType name='RequestSecurityTokenCollectionType' >
+        <xs:sequence>
+          <xs:element name='RequestSecurityToken' type='wst:AbstractRequestSecurityTokenType' minOccurs='2' maxOccurs='unbounded'/>
+        </xs:sequence>
+      </xs:complexType>
+
+      <xs:element name='RequestSecurityTokenResponseCollection' type='wst:RequestSecurityTokenResponseCollectionType' />
+      <xs:complexType name='RequestSecurityTokenResponseCollectionType' >
+        <xs:sequence>
+          <xs:element ref='wst:RequestSecurityTokenResponse' minOccurs='1' maxOccurs='unbounded' />
+        </xs:sequence>
+        <xs:anyAttribute namespace='##other' processContents='lax' />
+      </xs:complexType>
+      
+    </xs:schema>
+  </wsdl:types>
+
+  <!-- WS-Trust defines the following GEDs -->
+  <wsdl:message name="RequestSecurityTokenMsg">
+    <wsdl:part name="request" element="wst:RequestSecurityToken" />
+  </wsdl:message>
+  <wsdl:message name="RequestSecurityTokenResponseMsg">
+    <wsdl:part name="response"
+            element="wst:RequestSecurityTokenResponse" />
+  </wsdl:message>
+  <wsdl:message name="RequestSecurityTokenCollectionMsg">
+    <wsdl:part name="requestCollection"
+            element="wst:RequestSecurityTokenCollection"/>
+  </wsdl:message>
+  <wsdl:message name="RequestSecurityTokenResponseCollectionMsg">
+    <wsdl:part name="responseCollection"
+            element="wst:RequestSecurityTokenResponseCollection"/>
+  </wsdl:message>
+
+  <!-- This portType an example of a Requestor (or other) endpoint that 
+         Accepts SOAP-based challenges from a Security Token Service -->
+  <wsdl:portType name="WSSecurityRequestor">
+    <wsdl:operation name="Challenge">
+      <wsdl:input message="tns:RequestSecurityTokenResponseMsg"/>
+      <wsdl:output message="tns:RequestSecurityTokenResponseMsg"/>
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <!-- This portType is an example of an STS supporting full protocol -->
+  <wsdl:portType name="STS">
+    <wsdl:operation name="Cancel">
+      <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel" message="tns:RequestSecurityTokenMsg"/>
+      <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/CancelFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+    </wsdl:operation>
+    <wsdl:operation name="Issue">
+      <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue" message="tns:RequestSecurityTokenMsg"/>
+      <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTRC/IssueFinal" message="tns:RequestSecurityTokenResponseCollectionMsg"/>
+    </wsdl:operation>
+    <wsdl:operation name="Renew">
+      <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew" message="tns:RequestSecurityTokenMsg"/>
+      <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/RenewFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+    </wsdl:operation>
+    <wsdl:operation name="Validate">
+      <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate" message="tns:RequestSecurityTokenMsg"/>
+      <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/ValidateFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+    </wsdl:operation>
+    <wsdl:operation name="KeyExchangeToken">
+      <wsdl:input wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/KET" message="tns:RequestSecurityTokenMsg"/>
+      <wsdl:output wsam:Action="http://docs.oasis-open.org/ws-sx/ws-trust/200512/RSTR/KETFinal" message="tns:RequestSecurityTokenResponseMsg"/>
+    </wsdl:operation>
+    <wsdl:operation name="RequestCollection">
+      <wsdl:input message="tns:RequestSecurityTokenCollectionMsg"/>
+      <wsdl:output message="tns:RequestSecurityTokenResponseCollectionMsg"/>
+    </wsdl:operation>
+  </wsdl:portType>
+
+  <!-- This portType is an example of an endpoint that accepts 
+         Unsolicited RequestSecurityTokenResponse messages -->
+  <wsdl:portType name="SecurityTokenResponseService">
+    <wsdl:operation name="RequestSecurityTokenResponse">
+      <wsdl:input message="tns:RequestSecurityTokenResponseMsg"/>
+    </wsdl:operation>
+  </wsdl:portType>
+
+</wsdl:definitions>

Added: cxf/sandbox/fediz/fediz-idp/pom.xml
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp/pom.xml?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp/pom.xml (added)
+++ cxf/sandbox/fediz/fediz-idp/pom.xml Wed Dec 21 21:53:59 2011
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+       <groupId>org.apache.cxf.fediz</groupId>
+       <artifactId>fediz</artifactId>
+       <version>0.6-SNAPSHOT</version>
+    </parent>
+    <artifactId>fediz-idp</artifactId>
+    <name>WS Federation IDP</name>
+    <packaging>war</packaging>
+
+    <dependencyManagement>
+    	<dependencies>
+    	</dependencies>
+    </dependencyManagement>
+    
+    <properties>
+    <cxf.version>2.5.1</cxf.version>
+    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>  
+
+    <dependencies>
+
+        <dependency>
+            <groupId>javax.servlet</groupId>
+            <artifactId>servlet-api</artifactId>
+            <version>2.5</version>
+            <scope>provided</scope>
+        </dependency>
+        <dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-api</artifactId>
+			<version>1.6.1</version>
+		</dependency>
+		<dependency>
+			<groupId>org.slf4j</groupId>
+			<artifactId>slf4j-jdk14</artifactId>
+			<version>1.6.1</version>
+		</dependency>
+        <dependency>
+			<groupId>org.apache.cxf</groupId>
+			<artifactId>cxf-rt-ws-security</artifactId>
+			<version>${cxf.version}</version>
+        </dependency>
+		<dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${cxf.version}</version>
+        </dependency>
+        <dependency>
+        	<groupId>org.apache.commons</groupId>
+        	<artifactId>commons-lang3</artifactId>
+        	<version>3.0.1</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin><!--for mvn tomcat:deploy/:undeploy/:redeploy -->
+				<groupId>org.codehaus.mojo</groupId>
+				<artifactId>tomcat-maven-plugin</artifactId>
+				<version>1.1</version>
+				<configuration>
+					<server>myTomcat</server>
+					<url>http://localhost:9080/manager/text</url>
+					<path>/${project.build.finalName}</path>
+				</configuration>
+			</plugin>
+        </plugins>
+        <!-- Name of the generated WAR file -->
+        <finalName>fedizidp</finalName>
+    </build>
+
+</project>

Added: cxf/sandbox/fediz/fediz-idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java
URL: http://svn.apache.org/viewvc/cxf/sandbox/fediz/fediz-idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java?rev=1221896&view=auto
==============================================================================
--- cxf/sandbox/fediz/fediz-idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java (added)
+++ cxf/sandbox/fediz/fediz-idp/src/main/java/org/apache/cxf/fediz/service/idp/IdpSTSClient.java Wed Dec 21 21:53:59 2011
@@ -0,0 +1,170 @@
+package org.apache.cxf.fediz.service.idp;
+
+import java.io.StringWriter;
+import java.security.cert.X509Certificate;
+
+import javax.xml.transform.OutputKeys;
+import javax.xml.transform.Transformer;
+import javax.xml.transform.TransformerException;
+import javax.xml.transform.TransformerFactory;
+import javax.xml.transform.dom.DOMSource;
+import javax.xml.transform.stream.StreamResult;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.binding.soap.SoapBindingConstants;
+import org.apache.cxf.helpers.DOMUtils;
+import org.apache.cxf.service.model.BindingOperationInfo;
+import org.apache.cxf.staxutils.StaxUtils;
+import org.apache.cxf.staxutils.W3CDOMStreamWriter;
+import org.apache.cxf.ws.security.tokenstore.SecurityToken;
+import org.apache.cxf.ws.security.trust.STSClient;
+import org.apache.cxf.ws.security.trust.STSUtils;
+import org.apache.ws.security.components.crypto.Crypto;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Element;
+
+public class IdpSTSClient extends STSClient {
+
+	private static Logger LOG = LoggerFactory.getLogger(IdpSTSClient.class);
+	
+	public IdpSTSClient(Bus b) {
+		super(b);
+	}
+
+	
+    public String requestSecurityTokenResponse() throws Exception {
+        return requestSecurityTokenResponse(null);
+    }
+
+    public String requestSecurityTokenResponse(String appliesTo) throws Exception {
+        String action = null;
+        if (isSecureConv) {
+            action = namespace + "/RST/SCT";
+        }
+        return requestSecurityTokenResponse(appliesTo, action, "/Issue", null);
+    }
+	
+	public String requestSecurityTokenResponse(String appliesTo, String action,
+			String requestType, SecurityToken target) throws Exception {
+        createClient();
+        BindingOperationInfo boi = findOperation("/RST/Issue");
+
+        client.getRequestContext().putAll(ctx);
+        if (action != null) {
+            client.getRequestContext().put(SoapBindingConstants.SOAP_ACTION, action);
+        } else {
+            client.getRequestContext().put(SoapBindingConstants.SOAP_ACTION, 
+                                           namespace + "/RST/Issue");
+        }
+
+        W3CDOMStreamWriter writer = new W3CDOMStreamWriter();
+        writer.writeStartElement("wst", "RequestSecurityToken", namespace);
+        writer.writeNamespace("wst", namespace);
+        if (context != null) {
+            writer.writeAttribute(null, "Context", context);
+        }
+        
+        boolean wroteKeySize = false;
+        String keyTypeTemplate = null;
+        String sptt = null;
+        
+        if (template != null) {
+            if (this.useSecondaryParameters()) {
+                writer.writeStartElement("wst", "SecondaryParameters", namespace);
+            }
+            
+            Element tl = DOMUtils.getFirstElement(template);
+            while (tl != null) {
+                StaxUtils.copy(tl, writer);
+                if ("KeyType".equals(tl.getLocalName())) {
+                    keyTypeTemplate = DOMUtils.getContent(tl);
+                } else if ("KeySize".equals(tl.getLocalName())) {
+                    wroteKeySize = true;
+                    keySize = Integer.parseInt(DOMUtils.getContent(tl));
+                } else if ("TokenType".equals(tl.getLocalName())) {
+                    sptt = DOMUtils.getContent(tl);
+                }
+                tl = DOMUtils.getNextElement(tl);
+            }
+            
+            if (this.useSecondaryParameters()) {
+                writer.writeEndElement();
+            }
+        }
+
+        addRequestType(requestType, writer);
+        if (enableAppliesTo) {
+            addAppliesTo(writer, appliesTo);
+        }
+        
+        addClaims(writer);
+        
+        Element onBehalfOfToken = getOnBehalfOfToken();
+        if (onBehalfOfToken != null) {
+            writer.writeStartElement("wst", "OnBehalfOf", namespace);
+            StaxUtils.copy(onBehalfOfToken, writer);
+            writer.writeEndElement();
+        }
+        if (sptt == null) {
+            addTokenType(writer);
+        }
+        if (isSecureConv || enableLifetime) {
+            addLifetime(writer);
+        }
+        if (keyTypeTemplate == null) {
+            keyTypeTemplate = writeKeyType(writer, keyType);
+        }
+
+        byte[] requestorEntropy = null;
+        X509Certificate cert = null;
+        Crypto crypto = null;
+
+        if (keySize <= 0) {
+            keySize = 256;
+        }
+        if (keyTypeTemplate != null && keyTypeTemplate.endsWith("SymmetricKey")) {
+            requestorEntropy = writeElementsForRSTSymmetricKey(writer, wroteKeySize);
+        } else if (keyTypeTemplate != null && keyTypeTemplate.endsWith("PublicKey")) {
+            crypto = createCrypto(false);
+            cert = getCert(crypto);
+            writeElementsForRSTPublicKey(writer, cert);
+        }
+        
+        if (target != null) {
+            writer.writeStartElement("wst", "RenewTarget", namespace);
+            Element el = target.getUnattachedReference();
+            if (el == null) {
+                el = target.getAttachedReference();
+            }
+            StaxUtils.copy(el, writer);
+            writer.writeEndElement();
+        }
+
+        Element actAsSecurityToken = getActAsToken();
+        if (actAsSecurityToken != null) {
+            writer.writeStartElement(STSUtils.WST_NS_08_02, "ActAs");
+            StaxUtils.copy(actAsSecurityToken, writer);
+            writer.writeEndElement();
+        }
+        
+        writer.writeEndElement();
+
+		Object obj[] = client.invoke(boi, new DOMSource(writer.getDocument()
+				.getDocumentElement()));
+
+		DOMSource rstr = (DOMSource) obj[0];
+
+		StringWriter sw = new StringWriter();
+		try {
+			Transformer t = TransformerFactory.newInstance().newTransformer();
+			t.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
+			t.transform(rstr, new StreamResult(sw));
+		} catch (TransformerException te) {
+			LOG.warn("nodeToString Transformer Exception");
+		}
+		return sw.toString();
+
+	}
+
+}