cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject svn commit: r1189820 - in /cxf/trunk/distribution/src/main/release/samples: ./ sts/ sts/keys/ sts/src/ sts/src/demo/ sts/src/demo/wssec/ sts/src/demo/wssec/client/ sts/src/demo/wssec/server/ sts/src/demo/wssec/sts/ sts/wsdl/ sts_issue_operation/ sts_is...
Date Thu, 27 Oct 2011 16:00:45 GMT
Author: coheigea
Date: Thu Oct 27 16:00:43 2011
New Revision: 1189820

URL: http://svn.apache.org/viewvc?rev=1189820&view=rev
Log:
Removed the sts_issue_operation sample and added a new "sts" sample that uses the new STS implementation

Added:
    cxf/trunk/distribution/src/main/release/samples/sts/
    cxf/trunk/distribution/src/main/release/samples/sts/README.txt
    cxf/trunk/distribution/src/main/release/samples/sts/keys/
    cxf/trunk/distribution/src/main/release/samples/sts/keys/clientKeystore.properties
    cxf/trunk/distribution/src/main/release/samples/sts/keys/clientstore.jks
      - copied, changed from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/test/java/demo/sts/provider/operation/stsstore.jks
    cxf/trunk/distribution/src/main/release/samples/sts/keys/serviceKeystore.properties
    cxf/trunk/distribution/src/main/release/samples/sts/keys/servicestore.jks
    cxf/trunk/distribution/src/main/release/samples/sts/keys/stsKeystore.properties
    cxf/trunk/distribution/src/main/release/samples/sts/keys/stsstore.jks
      - copied, changed from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/resources/stsstore.jks
    cxf/trunk/distribution/src/main/release/samples/sts/pom.xml
    cxf/trunk/distribution/src/main/release/samples/sts/src/
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/Client.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/ClientCallbackHandler.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/wssec-client.xml
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/GreeterImpl.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/Server.java
      - copied, changed from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerificationException.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/ServerCallbackHandler.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/wssec-server.xml
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/STSCallbackHandler.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/Server.java
      - copied, changed from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java
    cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/wssec-sts.xml
    cxf/trunk/distribution/src/main/release/samples/sts/wsdl/
    cxf/trunk/distribution/src/main/release/samples/sts/wsdl/hello_world.wsdl
    cxf/trunk/distribution/src/main/release/samples/sts/wsdl/ws-trust-1.4-service.wsdl
Removed:
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/README.txt
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/pom.xml
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CRLVerifier.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerificationException.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerificationResult.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerifier.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerifierConfig.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/operation/impl/SAMLTokenIssueOperation.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SAMLTokenIssueOperation.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/resources/stsstore.jks
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-trust-1.3.xsd
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4-service.wsdl
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-trust-1.4.wsdl
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/xmldsig-core-schema.xsd
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/test/java/demo/sts/provider/operation/IssueDelegateTest.java
    cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/test/java/demo/sts/provider/operation/stsstore.jks
Modified:
    cxf/trunk/distribution/src/main/release/samples/pom.xml

Modified: cxf/trunk/distribution/src/main/release/samples/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/pom.xml?rev=1189820&r1=1189819&r2=1189820&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/pom.xml (original)
+++ cxf/trunk/distribution/src/main/release/samples/pom.xml Thu Oct 27 16:00:43 2011
@@ -87,9 +87,9 @@
         <module>wsdl_first_rpclit</module>
         <module>jms_pubsub</module>
         <module>jax_rs/spring_security</module>
-        <module>sts_issue_operation</module>
         <module>logbrowser</module>
         <module>ws_notification</module>
+        <module>sts</module>
 
 
         <!--

Added: cxf/trunk/distribution/src/main/release/samples/sts/README.txt
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/README.txt?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/README.txt (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/README.txt Thu Oct 27 16:00:43 2011
@@ -0,0 +1,55 @@
+SecurityTokenService (STS) Demo
+=================
+
+This demo shows how to use the SecurityTokenService (STS) implementation in
+Apache CXF.
+
+The policy of the service provider, as defined in hello_world.wsdl, requires a
+SAML 2.0 token issued by an STS. The client will authenticate itself to the
+STS using a UsernameToken over the symmetric binding, and the STS will issue
+it the desired SAML 2.0 token, which the client then forwards to the service
+provider. As the IssuedToken is defined as the InitiatorToken of the
+Asymmetric binding in the policy of the service provider, the client will use
+the associated secret key to sign various parts of the message.
+
+Please review the README in the samples directory before continuing.
+
+
+Prerequisite
+------------
+
+If your environment already includes cxf-manifest.jar on the CLASSPATH,
+and the JDK and ant bin directories on the PATH, it is not necessary to
+run the environment script described in the samples directory README.
+If your environment is not properly configured, or if you are planning
+on using wsdl2java, javac, and java to build and run the demos, you must
+set the environment by running the script.
+
+
+*** Requirements ***
+
+The samples in this directory use STRONG encryption.  The default encryption algorithms
+included in a JRE is not adequate for these samples.   The Java Cryptography Extension
+(JCE) Unlimited Strength Jurisdiction Policy Files available on Oracle's JDK download
+page[3] *must* be installed for the examples to work.   If you get errors about invalid
+key lengths, the Unlimited Strength files are not installed.
+
+[3] http://www.oracle.com/technetwork/java/javase/downloads/index.html
+
+
+Building and running the demo using Maven
+---------------------------------------
+
+From the base directory of this sample (i.e., where this README file is
+located), the maven pom.xml file can be used to build and run the demo.
+
+Using either UNIX or Windows:
+
+  mvn install (builds the demo)
+  mvn -Psts  (from one command line window)
+  mvn -Pserver  (from a second command line window)
+  mvn -Pclient  (from a third command line window)
+
+To remove the code generated from the WSDL file and the .class
+files, run "mvn clean".
+

Added: cxf/trunk/distribution/src/main/release/samples/sts/keys/clientKeystore.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/keys/clientKeystore.properties?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/keys/clientKeystore.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/keys/clientKeystore.properties Thu Oct 27 16:00:43 2011
@@ -0,0 +1,24 @@
+#
+# 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=cspass
+org.apache.ws.security.crypto.merlin.keystore.alias=myclientkey
+org.apache.ws.security.crypto.merlin.keystore.file=keys/clientstore.jks
+

Copied: cxf/trunk/distribution/src/main/release/samples/sts/keys/clientstore.jks (from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/test/java/demo/sts/provider/operation/stsstore.jks)
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/keys/clientstore.jks?p2=cxf/trunk/distribution/src/main/release/samples/sts/keys/clientstore.jks&p1=cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/test/java/demo/sts/provider/operation/stsstore.jks&r1=1189786&r2=1189820&rev=1189820&view=diff
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/test/java/demo/sts/provider/operation/stsstore.jks (original) and cxf/trunk/distribution/src/main/release/samples/sts/keys/clientstore.jks Thu Oct 27 16:00:43 2011 differ

Added: cxf/trunk/distribution/src/main/release/samples/sts/keys/serviceKeystore.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/keys/serviceKeystore.properties?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/keys/serviceKeystore.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/keys/serviceKeystore.properties Thu Oct 27 16:00:43 2011
@@ -0,0 +1,24 @@
+#
+# 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=keys/servicestore.jks
+

Added: cxf/trunk/distribution/src/main/release/samples/sts/keys/servicestore.jks
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/keys/servicestore.jks?rev=1189820&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/sts/keys/servicestore.jks (added) and cxf/trunk/distribution/src/main/release/samples/sts/keys/servicestore.jks Thu Oct 27 16:00:43 2011 differ

Added: cxf/trunk/distribution/src/main/release/samples/sts/keys/stsKeystore.properties
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/keys/stsKeystore.properties?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/keys/stsKeystore.properties (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/keys/stsKeystore.properties Thu Oct 27 16:00:43 2011
@@ -0,0 +1,23 @@
+#
+# 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=stsspass
+org.apache.ws.security.crypto.merlin.keystore.file=keys/stsstore.jks
+

Copied: cxf/trunk/distribution/src/main/release/samples/sts/keys/stsstore.jks (from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/resources/stsstore.jks)
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/keys/stsstore.jks?p2=cxf/trunk/distribution/src/main/release/samples/sts/keys/stsstore.jks&p1=cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/resources/stsstore.jks&r1=1189786&r2=1189820&rev=1189820&view=diff
==============================================================================
    (empty)

Added: cxf/trunk/distribution/src/main/release/samples/sts/pom.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/pom.xml?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/pom.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/pom.xml Thu Oct 27 16:00:43 2011
@@ -0,0 +1,212 @@
+<!--
+  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.
+-->
+<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>
+    <groupId>org.apache.cxf.samples</groupId>
+    <artifactId>sts</artifactId>
+    <name>CXF STS Demo</name>
+    <description>CXF STS Demo</description>
+    <version>2.5.0-SNAPSHOT</version>
+
+    <parent>
+        <groupId>org.apache.cxf.samples</groupId>
+        <artifactId>cxf-samples</artifactId>
+        <version>2.5.0-SNAPSHOT</version>
+        <relativePath>..</relativePath>
+    </parent>
+
+    <properties>
+        <cxf.version>${project.version}</cxf.version>
+    </properties>
+    <build>
+        <sourceDirectory>src</sourceDirectory>
+        <plugins>
+            <plugin>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <configuration>
+                    <source>1.5</source>
+                    <target>1.5</target>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.apache.cxf</groupId>
+                <artifactId>cxf-codegen-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <id>generate-sources</id>
+                        <phase>generate-sources</phase>
+                        <configuration>
+                            <wsdlOptions>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/wsdl/hello_world.wsdl</wsdl>
+                                </wsdlOption>
+                                <wsdlOption>
+                                    <wsdl>${basedir}/wsdl/ws-trust-1.4-service.wsdl</wsdl>
+                                </wsdlOption>
+                            </wsdlOptions>
+                        </configuration>
+                        <goals>
+                            <goal>wsdl2java</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <id>copyxmlfiles</id>
+                        <phase>generate-sources</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <copy file="${basedir}/src/demo/wssec/sts/wssec-sts.xml" todir="${basedir}/target/classes/demo/wssec/sts" />
+                                <copy file="${basedir}/src/demo/wssec/server/wssec-server.xml" todir="${basedir}/target/classes/demo/wssec/server" />
+                                <copy file="${basedir}/src/demo/wssec/client/wssec-client.xml" todir="${basedir}/target/classes/demo/wssec/client" />
+                                <copy todir="${basedir}/target/classes/keys">
+                                    <fileset dir="${basedir}/keys" />
+                                </copy>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+        </plugins>
+    </build>
+    <profiles>
+        <profile>
+            <id>sts</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>java</executable>
+                                    <arguments>
+                                        <argument>-classpath</argument>
+                                        <classpath />
+                                        <argument>demo.wssec.sts.Server</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>server</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                                <configuration>
+                                    <executable>java</executable>
+                                    <arguments>
+                                        <argument>-classpath</argument>
+                                        <classpath />
+                                        <argument>demo.wssec.server.Server</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+        <profile>
+            <id>client</id>
+            <build>
+                <defaultGoal>test</defaultGoal>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>test</phase>
+                                <goals>
+                                    <goal>java</goal>
+                                </goals>
+                                <configuration>
+                                    <mainClass>demo.wssec.client.Client</mainClass>
+                                    <arguments>
+                                        <argument>${basedir}/wsdl/hello_world.wsdl</argument>
+                                    </arguments>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-frontend-jaxws</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-transports-http-jetty</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-security</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf</groupId>
+            <artifactId>cxf-rt-ws-policy</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.apache.cxf.services.sts</groupId>
+            <artifactId>cxf-services-sts-core</artifactId>
+            <version>${project.version}</version>
+        </dependency>
+        
+    </dependencies>
+</project>

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/Client.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/Client.java?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/Client.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/Client.java Thu Oct 27 16:00:43 2011
@@ -0,0 +1,83 @@
+/**
+ * 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 demo.wssec.client;
+
+import java.io.File;
+import java.net.URL;
+
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+import org.apache.hello_world_soap_http.Greeter;
+
+public final class Client {
+
+    private static final QName SERVICE_NAME
+        = new QName("http://apache.org/hello_world_soap_http", "SOAPService");
+
+    private static final QName PORT_NAME =
+        new QName("http://apache.org/hello_world_soap_http", "SoapPort");
+
+
+    private Client() {
+    }
+
+    public static void main(String args[]) throws Exception {
+        
+        if (args.length == 0) {
+            System.out.println("please specify wsdl");
+            System.exit(1);
+        }
+        
+        URL wsdlURL;
+        File wsdlFile = new File(args[0]);
+        if (wsdlFile.exists()) {
+            wsdlURL = wsdlFile.toURI().toURL();
+        } else {
+            wsdlURL = new URL(args[0]);
+        }
+        
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Client.class.getResource("wssec-client.xml");
+
+        Bus bus = bf.createBus(busFile.toString());
+        SpringBusFactory.setDefaultBus(bus);
+        SpringBusFactory.setThreadDefaultBus(bus);
+
+        Service service = Service.create(wsdlURL, SERVICE_NAME);
+        Greeter port = service.getPort(PORT_NAME, Greeter.class);
+
+        System.out.println("Invoking greetMe...");
+        try {
+            String resp = port.greetMe(System.getProperty("user.name"));
+            System.out.println("Server responded with: " + resp);
+            System.out.println();
+
+        } catch (Exception e) {
+            System.out.println("Invocation failed with the following: " + e.getCause());
+            System.out.println();
+        }
+
+        System.exit(0);
+    }
+
+}

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/ClientCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/ClientCallbackHandler.java?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/ClientCallbackHandler.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/ClientCallbackHandler.java Thu Oct 27 16:00:43 2011
@@ -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 demo.wssec.client;
+
+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 ClientCallbackHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            if (callbacks[i] instanceof WSPasswordCallback) {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+                if ("myclientkey".equals(pc.getIdentifier())) {
+                    pc.setPassword("ckpass");
+                    break;
+                } else if ("alice".equals(pc.getIdentifier())) {
+                    pc.setPassword("clarinet");
+                    break;
+                } else if ("bob".equals(pc.getIdentifier())) {
+                    pc.setPassword("trombone");
+                    break;
+                } else if ("eve".equals(pc.getIdentifier())) {
+                    pc.setPassword("evekpass");
+                    break;
+                }
+            }
+        }
+    }
+}

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/wssec-client.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/wssec-client.xml?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/wssec-client.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/client/wssec-client.xml Thu Oct 27 16:00:43 2011
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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: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://www.springframework.org/schema/beans
+           http://www.springframework.org/schema/beans/spring-beans.xsd">
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <jaxws:client name="{http://apache.org/hello_world_soap_http}SoapPort" createdFromAPI="true">
+       <jaxws:properties>
+           <entry key="ws-security.signature.properties" value="keys/clientKeystore.properties"/>
+           <entry key="ws-security.signature.username" value="myclientkey"/>
+           <entry key="ws-security.callback-handler" 
+                  value="demo.wssec.client.ClientCallbackHandler"/>
+           <entry key="ws-security.encryption.properties" value="keys/clientKeystore.properties"/> 
+           <entry key="ws-security.encryption.username" value="myservicekey"/>
+           <entry key="ws-security.sts.client">
+               <bean class="org.apache.cxf.ws.security.trust.STSClient">
+                   <constructor-arg ref="cxf"/>
+                   <property name="wsdlLocation" 
+                             value="http://localhost:8080/SecurityTokenService/UT?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/}UT_Port"/>
+                   <property name="properties">
+                       <map>
+                           <entry key="ws-security.username" value="alice"/>
+                           <entry key="ws-security.callback-handler" 
+                                  value="demo.wssec.client.ClientCallbackHandler"/>
+                           <entry key="ws-security.encryption.properties" value="keys/clientKeystore.properties"/> 
+                           <entry key="ws-security.encryption.username" value="mystskey"/>
+                           <entry key="ws-security.sts.token.username" value="myclientkey"/>
+                           <entry key="ws-security.sts.token.properties" value="keys/clientKeystore.properties"/> 
+                           <entry key="ws-security.sts.token.usecert" value="true"/> 
+                       </map>
+                   </property>
+               </bean>            
+           </entry> 
+       </jaxws:properties>
+   </jaxws:client>
+
+</beans> 
+

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/GreeterImpl.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/GreeterImpl.java?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/GreeterImpl.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/GreeterImpl.java Thu Oct 27 16:00:43 2011
@@ -0,0 +1,43 @@
+/**
+ * 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 demo.wssec.server;
+
+import java.util.logging.Logger;
+import org.apache.hello_world_soap_http.Greeter;
+
+@javax.jws.WebService(name = "Greeter", serviceName = "SOAPService", 
+                      targetNamespace = "http://apache.org/hello_world_soap_http", 
+                      wsdlLocation = "file:./wsdl/hello_world.wsdl")
+                  
+public class GreeterImpl implements Greeter {
+
+    private static final Logger LOG = 
+        Logger.getLogger(GreeterImpl.class.getPackage().getName());
+    
+    /* (non-Javadoc)
+     * @see org.objectweb.hello_world_soap_http.Greeter#greetMe(java.lang.String)
+     */
+    public String greetMe(String me) {
+        LOG.info("Executing operation greetMe");
+        System.out.println("Executing operation greetMe");
+        System.out.println("Message received: " + me + "\n");
+        return "Hello " + me;
+    }
+}

Copied: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/Server.java (from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerificationException.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/Server.java?p2=cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/Server.java&p1=cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerificationException.java&r1=1189786&r2=1189820&rev=1189820&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/cert/CertificateVerificationException.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/Server.java Thu Oct 27 16:00:43 2011
@@ -1,32 +1,49 @@
-/**
- * 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 demo.sts.provider.cert;
-
-public class CertificateVerificationException extends Exception {
-    private static final long serialVersionUID = 1L;
-
-    public CertificateVerificationException(String message, Throwable cause) {
-        super(message, cause);
-    }
-
-    public CertificateVerificationException(String message) {
-        super(message);
-    }
-}
\ No newline at end of file
+/**
+ * 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 demo.wssec.server;
+
+import java.net.URL;
+
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting Server");
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Server.class.getResource("wssec-server.xml");
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+    }
+
+    public static void main(String args[]) throws Exception {
+        System.out.println();
+        new Server();
+        System.out.println("Server ready...");
+
+        Thread.sleep(5 * 60 * 1000);
+        System.out.println("Server exiting");
+        System.exit(0);
+    }
+}

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/ServerCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/ServerCallbackHandler.java?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/ServerCallbackHandler.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/ServerCallbackHandler.java Thu Oct 27 16:00:43 2011
@@ -0,0 +1,41 @@
+/**
+ * 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 demo.wssec.server;
+
+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 ServerCallbackHandler 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 ("myservicekey".equals(pc.getIdentifier())) {
+                    pc.setPassword("skpass");
+                    break;
+                }
+            }
+        }
+    }
+}

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/wssec-server.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/wssec-server.xml?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/wssec-server.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/server/wssec-server.xml Thu Oct 27 16:00:43 2011
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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">
+
+    <cxf:bus>
+        <cxf:features>
+            <cxf:logging/>
+        </cxf:features>
+    </cxf:bus>
+
+    <jaxws:endpoint id="server"
+      implementor="demo.wssec.server.GreeterImpl"
+      endpointName="s:SoapPort"
+      serviceName="s:SOAPService"
+      address="http://localhost:9001/SoapContext/SoapPort"
+      wsdlLocation="wsdl/hello_world.wsdl"
+      xmlns:s="http://apache.org/hello_world_soap_http">
+        
+      <jaxws:properties>
+         <entry key="ws-security.signature.username" value="myservicekey"/>
+         <entry key="ws-security.callback-handler" 
+                value="demo.wssec.server.ServerCallbackHandler"/>
+         <entry key="ws-security.signature.properties" value="keys/serviceKeystore.properties"/>
+         <entry key="ws-security.encryption.properties" value="keys/serviceKeystore.properties"/>
+      </jaxws:properties> 
+    </jaxws:endpoint>
+
+</beans>

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/STSCallbackHandler.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/STSCallbackHandler.java?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/STSCallbackHandler.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/STSCallbackHandler.java Thu Oct 27 16:00:43 2011
@@ -0,0 +1,44 @@
+/**
+ * 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 demo.wssec.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 STSCallbackHandler implements CallbackHandler {
+
+    public void handle(Callback[] callbacks) throws IOException,
+            UnsupportedCallbackException {
+        for (int i = 0; i < callbacks.length; i++) {
+            if (callbacks[i] instanceof WSPasswordCallback) {
+                WSPasswordCallback pc = (WSPasswordCallback) callbacks[i];
+                if ("mystskey".equals(pc.getIdentifier())) {
+                    pc.setPassword("stskpass");
+                    break;
+                } else if ("alice".equals(pc.getIdentifier())) {
+                    pc.setPassword("clarinet");
+                    break;
+                }
+            }
+        }
+    }
+}

Copied: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/Server.java (from r1189786, cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java)
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/Server.java?p2=cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/Server.java&p1=cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java&r1=1189786&r2=1189820&rev=1189820&view=diff
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java (original)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/Server.java Thu Oct 27 16:00:43 2011
@@ -1,37 +1,48 @@
-/**
- * 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 demo.sts.provider.token;
-
-/**
- *
- */
-public class TokenException extends RuntimeException {
-
-    private static final long serialVersionUID = 5745640698200387659L;
-
-    public TokenException(String message) {
-        super(message);
-    }
-
-    public TokenException(String message, Throwable e) {
-        super(message, e);
-    }
-
-}
+/**
+ * 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 demo.wssec.sts;
+
+import java.net.URL;
+
+import org.apache.cxf.Bus;
+import org.apache.cxf.BusFactory;
+import org.apache.cxf.bus.spring.SpringBusFactory;
+
+public class Server {
+
+    protected Server() throws Exception {
+        System.out.println("Starting STS");
+
+        SpringBusFactory bf = new SpringBusFactory();
+        URL busFile = Server.class.getResource("wssec-sts.xml");
+        Bus bus = bf.createBus(busFile.toString());
+        BusFactory.setDefaultBus(bus);
+    }
+
+    public static void main(String args[]) throws Exception {
+        System.out.println();
+        new Server();
+        System.out.println("Server ready...");
+
+        Thread.sleep(5 * 60 * 1000);
+        System.out.println("Server exiting");
+        System.exit(0);
+    }
+}

Added: cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/wssec-sts.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/wssec-sts.xml?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/wssec-sts.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/src/demo/wssec/sts/wssec-sts.xml Thu Oct 27 16:00:43 2011
@@ -0,0 +1,102 @@
+<!--
+  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: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">
+
+    <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"/>
+    </bean>
+    
+    <util:list id="utEndpoints">
+		<value>http://localhost:(\d)*/SoapContext/SoapPort</value>
+	</util:list>
+	
+	<bean id="utSTSProperties"
+	     class="org.apache.cxf.sts.StaticSTSProperties">
+	    <property name="signaturePropertiesFile" value="keys/stsKeystore.properties"/>
+		<property name="signatureUsername" value="mystskey"/>
+		<property name="callbackHandlerClass" value="demo.wssec.sts.STSCallbackHandler"/>
+		<property name="issuer" value="DoubleItSTSIssuer"/>
+    </bean>
+    
+	<jaxws:endpoint id="UTSTS"
+		implementor="#utSTSProviderBean"
+		address="http://localhost:8080/SecurityTokenService/UT" 
+        wsdlLocation="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="demo.wssec.sts.STSCallbackHandler"/>
+            <entry key="ws-security.signature.properties" value="keys/stsKeystore.properties"/>
+            <entry key="ws-security.signature.username" value="mystskey"/>
+        </jaxws:properties> 
+	</jaxws:endpoint>
+	
+
+</beans>
+

Added: cxf/trunk/distribution/src/main/release/samples/sts/wsdl/hello_world.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/wsdl/hello_world.wsdl?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/wsdl/hello_world.wsdl (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/wsdl/hello_world.wsdl Thu Oct 27 16:00:43 2011
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  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 name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http" 
+    xmlns="http://schemas.xmlsoap.org/wsdl/" 
+    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
+    xmlns:tns="http://apache.org/hello_world_soap_http"
+    xmlns:x1="http://apache.org/hello_world_soap_http/types"
+    xmlns:wsdl="http://schemas.xmlsoap.org/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"
+    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:xsd="http://www.w3.org/2001/XMLSchema">
+    <wsdl:types>
+        <schema targetNamespace="http://apache.org/hello_world_soap_http/types" 
+            xmlns="http://www.w3.org/2001/XMLSchema"
+	    xmlns:tns="http://apache.org/hello_world_soap_http/types"
+            elementFormDefault="qualified">
+
+	    <simpleType name="MyStringType">
+		<restriction base="string">
+		    <maxLength value="30" />
+		</restriction>
+	    </simpleType>
+
+            <element name="greetMe">
+                <complexType>
+                    <sequence>
+                        <element name="requestType" type="tns:MyStringType"/>
+                    </sequence>
+                </complexType>
+            </element>
+            <element name="greetMeResponse">
+                <complexType>
+                    <sequence>
+                        <element name="responseType" type="string"/>
+                    </sequence>
+                </complexType>
+            </element>
+        </schema>
+    </wsdl:types>
+    <wsdl:message name="greetMeRequest">
+        <wsdl:part element="x1:greetMe" name="in"/>
+    </wsdl:message>
+    <wsdl:message name="greetMeResponse">
+        <wsdl:part element="x1:greetMeResponse" name="out"/>
+    </wsdl:message>
+    
+    <wsdl:portType name="Greeter">
+        
+        <wsdl:operation name="greetMe">
+            <wsdl:input message="tns:greetMeRequest" name="greetMeRequest"/>
+            <wsdl:output message="tns:greetMeResponse" name="greetMeResponse"/>
+        </wsdl:operation>
+        
+    </wsdl:portType>
+    
+    <wsdl:binding name="Greeter_SOAPBinding" type="tns:Greeter">
+        <wsp:PolicyReference URI="#AsymmetricSAML2Policy" />
+        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
+        
+        <wsdl:operation name="greetMe">
+            <soap:operation soapAction="" style="document"/>
+            <wsdl:input name="greetMeRequest">
+                <soap:body use="literal"/>
+                <wsp:PolicyReference URI="#Input_Policy" />
+            </wsdl:input>
+            <wsdl:output name="greetMeResponse">
+                <soap:body use="literal"/>
+                <wsp:PolicyReference URI="#Output_Policy" />
+            </wsdl:output>
+        </wsdl:operation>
+        
+    </wsdl:binding>
+    
+    <wsdl:service name="SOAPService">
+        <wsdl:port binding="tns:Greeter_SOAPBinding" name="SoapPort">
+            <soap:address location="http://localhost:9001/SoapContext/SoapPort"/>
+        </wsdl:port>
+    </wsdl:service>
+    
+    <wsp:Policy wsu:Id="AsymmetricSAML2Policy">
+		<wsp:ExactlyOne>
+			<wsp:All>
+				<wsam:Addressing wsp:Optional="false">
+					<wsp:Policy />
+				</wsam:Addressing>
+				<sp:AsymmetricBinding>
+					<wsp:Policy>
+						<sp:InitiatorToken>
+							<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/PublicKey</t:KeyType>
+									</sp:RequestSecurityTokenTemplate>
+									<wsp:Policy>
+										<sp:RequireInternalReference />
+									</wsp:Policy>
+									<sp:Issuer>
+										<wsaw:Address>http://localhost:8080/SecurityTokenService/
+										</wsaw:Address>
+									</sp:Issuer>
+								</sp:IssuedToken>
+							</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: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="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="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>
+

Added: cxf/trunk/distribution/src/main/release/samples/sts/wsdl/ws-trust-1.4-service.wsdl
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts/wsdl/ws-trust-1.4-service.wsdl?rev=1189820&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts/wsdl/ws-trust-1.4-service.wsdl (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts/wsdl/ws-trust-1.4-service.wsdl Thu Oct 27 16:00:43 2011
@@ -0,0 +1,313 @@
+<?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"
+    xmlns:wst="http://docs.oasis-open.org/ws-sx/ws-trust/200512"
+    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: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:service name="SecurityTokenService">
+      <wsdl:port name="UT_Port" binding="tns:UT_Binding">
+         <soap:address location="http://localhost:8080/SecurityTokenService/UT" />
+      </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:Basic128 />
+                     </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="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>
\ No newline at end of file



Mime
View raw message