You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2011/04/04 20:59:53 UTC

svn commit: r1088726 [2/5] - in /cxf/trunk: distribution/src/main/release/samples/ distribution/src/main/release/samples/sts_issue_operation/ distribution/src/main/release/samples/sts_issue_operation/src/ distribution/src/main/release/samples/sts_issue...

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java Mon Apr  4 18:59:51 2011
@@ -0,0 +1,175 @@
+/**
+ * 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;
+
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.w3c.dom.Element;
+import org.apache.cxf.common.logging.LogUtils;
+import org.joda.time.DateTime;
+import org.opensaml.DefaultBootstrap;
+import org.opensaml.common.SAMLVersion;
+import org.opensaml.common.impl.SecureRandomIdentifierGenerator;
+import org.opensaml.common.xml.SAMLConstants;
+import org.opensaml.xml.security.x509.BasicX509Credential;
+import org.opensaml.xml.security.x509.X509KeyInfoGeneratorFactory;
+import org.opensaml.xml.signature.KeyInfo;
+
+
+public class Saml1TokenProvider implements TokenProvider {
+
+    private static final Logger LOG = LogUtils.getL7dLogger(Saml1TokenProvider.class);
+
+    public String getTokenType() {
+        return SAMLConstants.SAML1_NS;
+    }
+
+    public Element createToken(X509Certificate certificate) {
+        try {
+            org.opensaml.saml1.core.Subject subject = createSubjectSAML1(certificate);
+            org.opensaml.saml1.core.Assertion samlAssertion = createAuthnAssertionSAML1(subject);
+            return SamlUtils.toDom(samlAssertion).getDocumentElement();
+        } catch (Exception e) {
+            throw new TokenException("Can't serialize SAML assertion", e);
+        }
+    }
+
+    public Element createToken(String username) {
+        try {
+            org.opensaml.saml1.core.Subject subject = createSubjectSAML1(username);
+            org.opensaml.saml1.core.Assertion samlAssertion = createAuthnAssertionSAML1(subject);
+            return SamlUtils.toDom(samlAssertion).getDocumentElement();
+        } catch (Exception e) {
+            throw new TokenException("Can't serialize SAML assertion", e);
+        }
+    }
+
+    public String getTokenId(Element token) {
+        return token
+                .getAttribute(org.opensaml.saml1.core.Assertion.ID_ATTRIB_NAME);
+    }
+
+    private org.opensaml.saml1.core.Subject createSubjectSAML1(String username) {
+        org.opensaml.saml1.core.NameIdentifier nameID = 
+            (new org.opensaml.saml1.core.impl.NameIdentifierBuilder())
+                .buildObject();
+        nameID.setNameIdentifier(username);
+        String format = "urn:oasis:names:tc:SAML:1.1:nameid-format:transient";
+
+        if (format != null) {
+            nameID.setFormat(format);
+        }
+
+        org.opensaml.saml1.core.Subject subject = (new org.opensaml.saml1.core.impl.SubjectBuilder())
+                .buildObject();
+        subject.setNameIdentifier(nameID);
+
+        String confirmationString = "urn:oasis:names:tc:SAML:1.0:cm:bearer";
+
+        if (confirmationString != null) {
+
+            org.opensaml.saml1.core.ConfirmationMethod confirmationMethod = 
+                (new org.opensaml.saml1.core.impl.ConfirmationMethodBuilder())
+                    .buildObject();
+            confirmationMethod.setConfirmationMethod(confirmationString);
+
+            org.opensaml.saml1.core.SubjectConfirmation confirmation = 
+                (new org.opensaml.saml1.core.impl.SubjectConfirmationBuilder())
+                    .buildObject();
+            confirmation.getConfirmationMethods().add(confirmationMethod);
+
+            subject.setSubjectConfirmation(confirmation);
+        }
+        return subject;
+    }
+
+    private org.opensaml.saml1.core.Subject createSubjectSAML1(
+            X509Certificate certificate) throws Exception {
+        DefaultBootstrap.bootstrap();
+        org.opensaml.saml1.core.NameIdentifier nameID = 
+            (new org.opensaml.saml1.core.impl.NameIdentifierBuilder())
+                .buildObject();
+        nameID.setNameIdentifier(certificate.getSubjectDN().getName());
+        nameID.setFormat("urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName");
+        org.opensaml.saml1.core.Subject subject = (new org.opensaml.saml1.core.impl.SubjectBuilder())
+                .buildObject();
+        subject.setNameIdentifier(nameID);
+        org.opensaml.saml1.core.ConfirmationMethod confirmationMethod = 
+            (new org.opensaml.saml1.core.impl.ConfirmationMethodBuilder())
+                .buildObject();
+        confirmationMethod
+                .setConfirmationMethod("Urn:oasis:names:tc:SAML:1.0:cm:holder-of-key");
+        org.opensaml.saml1.core.SubjectConfirmation confirmation = 
+            (new org.opensaml.saml1.core.impl.SubjectConfirmationBuilder())
+                .buildObject();
+        confirmation.getConfirmationMethods().add(confirmationMethod);
+        BasicX509Credential keyInfoCredential = new BasicX509Credential();
+        keyInfoCredential.setEntityCertificate(certificate);
+        X509KeyInfoGeneratorFactory kiFactory = new X509KeyInfoGeneratorFactory();
+        kiFactory.setEmitPublicKeyValue(true);
+        KeyInfo keyInfo = kiFactory.newInstance().generate(keyInfoCredential);
+        confirmation.setKeyInfo(keyInfo);
+        subject.setSubjectConfirmation(confirmation);
+        return subject;
+    }
+
+    private org.opensaml.saml1.core.Assertion createAuthnAssertionSAML1(
+            org.opensaml.saml1.core.Subject subject) {
+        org.opensaml.saml1.core.AuthenticationStatement authnStatement = 
+            (new org.opensaml.saml1.core.impl.AuthenticationStatementBuilder())
+                .buildObject();
+        authnStatement.setSubject(subject);
+        // authnStatement.setAuthenticationMethod(strAuthMethod);
+
+        DateTime now = new DateTime();
+
+        authnStatement.setAuthenticationInstant(now);
+
+        org.opensaml.saml1.core.Conditions conditions = (new org.opensaml.saml1.core.impl.ConditionsBuilder())
+                .buildObject();
+        conditions.setNotBefore(now.minusMillis(3600000));
+        conditions.setNotOnOrAfter(now.plusMillis(3600000));
+
+        String issuerURL = "http://www.sopera.de/SAML1";
+
+        org.opensaml.saml1.core.Assertion assertion = (new org.opensaml.saml1.core.impl.AssertionBuilder())
+                .buildObject();
+        try {
+            SecureRandomIdentifierGenerator generator = new SecureRandomIdentifierGenerator();
+            assertion.setID(generator.generateIdentifier());
+        } catch (NoSuchAlgorithmException e) {
+            LOG.log(Level.WARNING, e.getMessage(), e);
+        }
+
+        assertion.setIssuer(issuerURL);
+        assertion.setIssueInstant(now);
+        assertion.setVersion(SAMLVersion.VERSION_11);
+
+        assertion.getAuthenticationStatements().add(authnStatement);
+        // assertion.getAttributeStatements().add(attrStatement);
+        assertion.setConditions(conditions);
+
+        return assertion;
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml1TokenProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java Mon Apr  4 18:59:51 2011
@@ -0,0 +1,189 @@
+/**
+ * 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;
+
+import java.security.NoSuchAlgorithmException;
+import java.security.cert.X509Certificate;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.w3c.dom.Element;
+
+import org.apache.cxf.common.logging.LogUtils;
+import org.joda.time.DateTime;
+import org.opensaml.DefaultBootstrap;
+import org.opensaml.common.impl.SecureRandomIdentifierGenerator;
+import org.opensaml.common.xml.SAMLConstants;
+import org.opensaml.saml2.core.Assertion;
+import org.opensaml.saml2.core.AuthnContext;
+import org.opensaml.saml2.core.AuthnContextClassRef;
+import org.opensaml.saml2.core.AuthnStatement;
+import org.opensaml.saml2.core.Conditions;
+import org.opensaml.saml2.core.Issuer;
+import org.opensaml.saml2.core.KeyInfoConfirmationDataType;
+import org.opensaml.saml2.core.NameID;
+import org.opensaml.saml2.core.Subject;
+import org.opensaml.saml2.core.SubjectConfirmation;
+import org.opensaml.saml2.core.impl.AssertionBuilder;
+import org.opensaml.saml2.core.impl.AuthnContextBuilder;
+import org.opensaml.saml2.core.impl.AuthnContextClassRefBuilder;
+import org.opensaml.saml2.core.impl.AuthnStatementBuilder;
+import org.opensaml.saml2.core.impl.ConditionsBuilder;
+import org.opensaml.saml2.core.impl.IssuerBuilder;
+import org.opensaml.saml2.core.impl.KeyInfoConfirmationDataTypeBuilder;
+import org.opensaml.saml2.core.impl.NameIDBuilder;
+import org.opensaml.saml2.core.impl.SubjectBuilder;
+import org.opensaml.saml2.core.impl.SubjectConfirmationBuilder;
+import org.opensaml.xml.security.credential.BasicKeyInfoGeneratorFactory;
+import org.opensaml.xml.security.x509.BasicX509Credential;
+import org.opensaml.xml.signature.KeyInfo;
+
+public class Saml2TokenProvider implements TokenProvider {
+
+    private static final String SAML_AUTH_CONTEXT = "ac:classes:X509";
+    
+    private static final Logger LOG = LogUtils.getL7dLogger(Saml2TokenProvider.class);
+
+    public String getTokenType() {
+        return SAMLConstants.SAML20_NS;
+    }
+
+    public Element createToken(X509Certificate certificate) {
+        try {
+            Subject subject = createSubject(certificate);
+            Assertion samlAssertion = createAuthnAssertion(subject);
+            return SamlUtils.toDom(samlAssertion).getDocumentElement();
+        } catch (Exception e) {
+            throw new TokenException("Can't serialize SAML assertion", e);
+        }
+    }
+
+    public Element createToken(String username) {
+        Subject subject = createSubject(username);
+        Assertion samlAssertion = createAuthnAssertion(subject);
+
+        try {
+            return SamlUtils.toDom(samlAssertion).getDocumentElement();
+        } catch (Exception e) {
+            throw new TokenException("Can't serialize SAML assertion", e);
+        }
+    }
+
+    public String getTokenId(Element token) {
+        return token.getAttribute(Assertion.ID_ATTRIB_NAME);
+    }
+
+    private Subject createSubject(String username) {
+        NameID nameID = (new NameIDBuilder()).buildObject();
+        nameID.setValue(username);
+        String format = "urn:oasis:names:tc:SAML:1.1:nameid-format:transient";
+        if (format != null) {
+            nameID.setFormat(format);
+        }
+
+        Subject subject = (new SubjectBuilder()).buildObject();
+        subject.setNameID(nameID);
+
+        SubjectConfirmation confirmation = (new SubjectConfirmationBuilder())
+                .buildObject();
+        confirmation.setMethod(SubjectConfirmation.METHOD_BEARER);
+        subject.getSubjectConfirmations().add(confirmation);
+        return subject;
+    }
+
+    private Subject createSubject(X509Certificate certificate) throws Exception {
+        DefaultBootstrap.bootstrap();
+        NameID nameID = (new NameIDBuilder()).buildObject();
+        nameID.setValue(certificate.getSubjectDN().getName());
+        String format = "urn:oasis:names:tc:SAML:1.1:nameid-format:X509SubjectName";
+        if (format != null) {
+            nameID.setFormat(format);
+        }
+        Subject subject = (new SubjectBuilder()).buildObject();
+        subject.setNameID(nameID);
+        SubjectConfirmation confirmation = (new SubjectConfirmationBuilder())
+                .buildObject();
+        confirmation.setMethod(SubjectConfirmation.METHOD_HOLDER_OF_KEY);
+        KeyInfoConfirmationDataType keyInfoDataType = new KeyInfoConfirmationDataTypeBuilder()
+                .buildObject();
+        BasicX509Credential keyInfoCredential = new BasicX509Credential();
+        keyInfoCredential.setEntityCertificate(certificate);
+        keyInfoCredential.setPublicKey(certificate.getPublicKey());
+        BasicKeyInfoGeneratorFactory kiFactory = new BasicKeyInfoGeneratorFactory();
+        kiFactory.setEmitPublicKeyValue(true);
+        KeyInfo keyInfo = kiFactory.newInstance().generate(keyInfoCredential);
+        keyInfoDataType.getKeyInfos().add(keyInfo);
+        subject.getSubjectConfirmations().add(confirmation);
+        subject.getSubjectConfirmations().get(0)
+                .setSubjectConfirmationData(keyInfoDataType);
+        return subject;
+    }
+
+    private Assertion createAuthnAssertion(Subject subject) {
+        Assertion assertion = createAssertion(subject);
+
+        AuthnContextClassRef ref = (new AuthnContextClassRefBuilder())
+                .buildObject();
+        String authnCtx = SAML_AUTH_CONTEXT;
+        if (authnCtx != null) {
+            ref.setAuthnContextClassRef(authnCtx);
+        }
+        AuthnContext authnContext = (new AuthnContextBuilder()).buildObject();
+        authnContext.setAuthnContextClassRef(ref);
+
+        AuthnStatement authnStatement = (new AuthnStatementBuilder())
+                .buildObject();
+        authnStatement.setAuthnInstant(new DateTime());
+        authnStatement.setAuthnContext(authnContext);
+
+        assertion.getStatements().add(authnStatement);
+
+        return assertion;
+    }
+
+    private Assertion createAssertion(Subject subject) {
+        Assertion assertion = (new AssertionBuilder()).buildObject();
+        try {
+            SecureRandomIdentifierGenerator generator = new SecureRandomIdentifierGenerator();
+            assertion.setID(generator.generateIdentifier());
+        } catch (NoSuchAlgorithmException e) {
+            LOG.log(Level.WARNING, e.getMessage(), e);
+        }
+
+        DateTime now = new DateTime();
+        assertion.setIssueInstant(now);
+
+        String issuerURL = "http://www.sopera.de/SAML2";
+        if (issuerURL != null) {
+            Issuer issuer = (new IssuerBuilder()).buildObject();
+            issuer.setValue(issuerURL);
+            assertion.setIssuer(issuer);
+        }
+
+        assertion.setSubject(subject);
+
+        Conditions conditions = (new ConditionsBuilder()).buildObject();
+        conditions.setNotBefore(now.minusMillis(3600000));
+        conditions.setNotOnOrAfter(now.plusMillis(3600000));
+        assertion.setConditions(conditions);
+        return assertion;
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/Saml2TokenProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java Mon Apr  4 18:59:51 2011
@@ -0,0 +1,52 @@
+/**
+ * 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;
+
+import javax.xml.parsers.ParserConfigurationException;
+
+import org.w3c.dom.Document;
+
+import org.apache.cxf.helpers.DOMUtils;
+import org.opensaml.DefaultBootstrap;
+import org.opensaml.xml.Configuration;
+import org.opensaml.xml.ConfigurationException;
+import org.opensaml.xml.XMLObject;
+import org.opensaml.xml.io.Marshaller;
+import org.opensaml.xml.io.MarshallingException;
+
+public final class SamlUtils {
+
+    private SamlUtils() {
+        
+    }
+    
+    public static Document toDom(XMLObject object) throws MarshallingException,
+            ParserConfigurationException, ConfigurationException {
+        Document document = DOMUtils.createDocument();
+
+        DefaultBootstrap.bootstrap();
+
+        Marshaller out = Configuration.getMarshallerFactory().getMarshaller(
+                object);
+        out.marshall(object, document);
+        return document;
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/SamlUtils.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 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_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java Mon Apr  4 18:59:51 2011
@@ -0,0 +1,37 @@
+/**
+ * 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);
+    }
+
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenException.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java Mon Apr  4 18:59:51 2011
@@ -0,0 +1,35 @@
+/**
+ * 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;
+
+import java.security.cert.X509Certificate;
+
+import org.w3c.dom.Element;
+
+public interface TokenProvider {
+
+    String getTokenType();
+
+    Element createToken(String username);
+
+    Element createToken(X509Certificate certificate);
+
+    String getTokenId(Element token);
+}

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/java/demo/sts/provider/token/TokenProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 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_issue_operation/src/main/resources/stsstore.jks?rev=1088726&view=auto
==============================================================================
Files cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/resources/stsstore.jks (added) and cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/resources/stsstore.jks Mon Apr  4 18:59:51 2011 differ

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml Mon Apr  4 18:59:51 2011
@@ -0,0 +1,75 @@
+<?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:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xmlns:jaxws="http://cxf.apache.org/jaxws"
+	xmlns:util="http://www.springframework.org/schema/util"
+	xsi:schemaLocation="
+http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.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="classpath:META-INF/cxf/cxf.xml" />
+	<import resource="classpath:META-INF/cxf/cxf-servlet.xml" />
+
+	<bean id="securityTokenServiceProviderBean"
+		class="org.apache.cxf.ws.security.sts.provider.SecurityTokenServiceProvider">
+		<property name="issueOperation" ref="issueDelegate"/>
+	</bean>	
+
+	<bean id="issueDelegate"
+		class="demo.sts.provider.operation.impl.SAMLTokenIssueOperation">
+		<property name="tokenProviders" ref="tokenProviders"/>
+		<property name="certificateVerifierConfig" ref="certificateVerifierConfig"/>
+	</bean>
+
+	<jaxws:endpoint id="SecurityTokenService"
+		implementor="#securityTokenServiceProviderBean"
+		address="/SecurityTokenService" 
+        wsdlLocation="/WEB-INF/wsdl/ws-trust-1.4-service.wsdl"
+        xmlns:ns1="http://docs.oasis-open.org/ws-sx/ws-trust/200512/wsdl"
+        serviceName="ns1:SecurityTokenServiceProvider"
+        endpointName="ns1:SecurityTokenServiceSOAP">
+	</jaxws:endpoint>
+
+	<util:list id="tokenProviders">
+		<ref bean="saml1TokenProvider"/>
+		<ref bean="saml2TokenProvider"/>
+	</util:list>
+	
+	<bean id="saml1TokenProvider"
+		class="demo.sts.provider.token.Saml1TokenProvider"/>
+	<bean id="saml2TokenProvider"
+		class="demo.sts.provider.token.Saml2TokenProvider"/>
+	<bean id="certificateVerifierConfig"
+		class="demo.sts.provider.cert.CertificateVerifierConfig">
+		<property name="storePath" value="/stsstore.jks"/>
+		<property name="storePwd" value="stsspass"/>
+		<!-- if false exception for self-signed cert will be thrown -->
+		<property name="verifySelfSignedCert" value="true"/>
+		<property name="trustCertAliases">
+			<list>
+				<value>myclientkey</value>
+			</list>
+		</property>		
+		<property name="keySignAlias" value="mystskey"/>
+		<property name="keySignPwd" value="stskpass"/>
+	</bean>
+</beans>

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/beans.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml Mon Apr  4 18:59:51 2011
@@ -0,0 +1,42 @@
+<?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.
+-->
+<web-app>
+	<context-param>
+		<param-name>contextConfigLocation</param-name>
+		<param-value>WEB-INF/beans.xml</param-value>
+	</context-param>
+
+	<listener>
+		<listener-class>
+			org.springframework.web.context.ContextLoaderListener
+		</listener-class>
+	</listener>
+	<servlet>
+		<servlet-name>sts</servlet-name>
+		<display-name>CXF sts</display-name>
+		<servlet-class>org.apache.cxf.transport.servlet.CXFServlet</servlet-class>
+		<load-on-startup>1</load-on-startup>
+	</servlet>
+
+	<servlet-mapping>
+		<servlet-name>sts</servlet-name>
+		<url-pattern>/*</url-pattern>
+	</servlet-mapping>
+</web-app>

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/web.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd Mon Apr  4 18:59:51 2011
@@ -0,0 +1,194 @@
+<?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-2004. 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.
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" elementFormDefault="qualified" attributeFormDefault="unqualified" blockDefault="#all" version="0.2">
+	<xsd:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="./oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+	<xsd:import namespace="http://www.w3.org/2000/09/xmldsig#" schemaLocation="xmldsig-core-schema.xsd"/>
+	<xsd:complexType name="AttributedString">
+		<xsd:annotation>
+			<xsd:documentation>This type represents an element with arbitrary attributes.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attribute ref="wsu:Id"/>
+				<xsd:anyAttribute namespace="##other" processContents="lax"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="PasswordString">
+		<xsd:annotation>
+			<xsd:documentation>This type is used for password elements per Section 4.1.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:AttributedString">
+				<xsd:attribute name="Type" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="EncodedString">
+		<xsd:annotation>
+			<xsd:documentation>This type is used for elements containing stringified binary data.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:AttributedString">
+				<xsd:attribute name="EncodingType" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="UsernameTokenType">
+		<xsd:annotation>
+			<xsd:documentation>This type represents a username token per Section 4.1</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element name="Username" type="wsse:AttributedString"/>
+			<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute ref="wsu:Id"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="BinarySecurityTokenType">
+		<xsd:annotation>
+			<xsd:documentation>A security token that is encoded in binary</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:EncodedString">
+				<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="KeyIdentifierType">
+		<xsd:annotation>
+			<xsd:documentation>A security token key identifier</xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="wsse:EncodedString">
+				<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:simpleType name="tUsage">
+		<xsd:annotation>
+			<xsd:documentation>Typedef to allow a list of usages (as URIs).</xsd:documentation>
+		</xsd:annotation>
+		<xsd:list itemType="xsd:anyURI"/>
+	</xsd:simpleType>
+	<xsd:attribute name="Usage" type="tUsage">
+		<xsd:annotation>
+			<xsd:documentation>This global attribute is used to indicate the usage of a referenced or indicated token within the containing context</xsd:documentation>
+		</xsd:annotation>
+	</xsd:attribute>
+	<xsd:complexType name="ReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This type represents a reference to an external security token.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:attribute name="URI" type="xsd:anyURI"/>
+		<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="EmbeddedType">
+		<xsd:annotation>
+			<xsd:documentation>This type represents a reference to an embedded security token.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:any processContents="lax"/>
+		</xsd:choice>
+		<xsd:attribute name="ValueType" type="xsd:anyURI"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="SecurityTokenReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This type is used reference a security token.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:any processContents="lax"/>
+		</xsd:choice>
+		<xsd:attribute ref="wsu:Id"/>
+		<xsd:attribute ref="wsse:Usage"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="SecurityHeaderType">
+		<xsd:annotation>
+			<xsd:documentation>This complexType defines header block to use for security-relevant data directed at a specific SOAP actor.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				<xsd:annotation>
+					<xsd:documentation>The use of "any" is to allow extensibility and different forms of security data.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:any>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:complexType name="TransformationParametersType">
+		<xsd:annotation>
+			<xsd:documentation>This complexType defines a container for elements to be specified from any namespace as properties/parameters of a DSIG transformation.</xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:any processContents="lax" minOccurs="0" maxOccurs="unbounded">
+				<xsd:annotation>
+					<xsd:documentation>The use of "any" is to allow extensibility from any namespace.</xsd:documentation>
+				</xsd:annotation>
+			</xsd:any>
+		</xsd:sequence>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:complexType>
+	<xsd:element name="UsernameToken" type="wsse:UsernameTokenType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:UsernameToken element per Section 4.1.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="BinarySecurityToken" type="wsse:BinarySecurityTokenType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:BinarySecurityToken element per Section 4.2.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Reference" type="wsse:ReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines a security token reference</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Embedded" type="wsse:EmbeddedType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines a security token embedded reference</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="KeyIdentifier" type="wsse:KeyIdentifierType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines a key identifier reference</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="SecurityTokenReference" type="wsse:SecurityTokenReferenceType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:SecurityTokenReference per Section 4.3.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Security" type="wsse:SecurityHeaderType">
+		<xsd:annotation>
+			<xsd:documentation>This element defines the wsse:Security SOAP header element per Section 4.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="TransformationParameters" type="wsse:TransformationParametersType">
+		<xsd:annotation>
+			<xsd:documentation>This element contains properties for transformations from any namespace, including DSIG.</xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Password" type="wsse:PasswordString"/>
+	<xsd:element name="Nonce" type="wsse:EncodedString"/>
+	<xsd:simpleType name="FaultcodeEnum">
+		<xsd:restriction base="xsd:QName">
+			<xsd:enumeration value="wsse:UnsupportedSecurityToken"/>
+			<xsd:enumeration value="wsse:UnsupportedAlgorithm"/>
+			<xsd:enumeration value="wsse:InvalidSecurity"/>
+			<xsd:enumeration value="wsse:InvalidSecurityToken"/>
+			<xsd:enumeration value="wsse:FailedAuthentication"/>
+			<xsd:enumeration value="wsse:FailedCheck"/>
+			<xsd:enumeration value="wsse:SecurityTokenUnavailable"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+</xsd:schema>
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-secext-1.0.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd Mon Apr  4 18:59:51 2011
@@ -0,0 +1,103 @@
+<?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-2004. 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.
+-->
+<xsd:schema targetNamespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" elementFormDefault="qualified" attributeFormDefault="unqualified" version="0.1">
+	<!-- // Fault Codes /////////////////////////////////////////// -->
+	<xsd:simpleType name="tTimestampFault">
+		<xsd:annotation>
+			<xsd:documentation>
+This type defines the fault code value for Timestamp message expiration.
+          </xsd:documentation>
+		</xsd:annotation>
+		<xsd:restriction base="xsd:QName">
+			<xsd:enumeration value="wsu:MessageExpired"/>
+		</xsd:restriction>
+	</xsd:simpleType>
+	<!-- // Global attributes //////////////////////////////////// -->
+	<xsd:attribute name="Id" type="xsd:ID">
+		<xsd:annotation>
+			<xsd:documentation>
+This global attribute supports annotating arbitrary elements with an ID.
+          </xsd:documentation>
+		</xsd:annotation>
+	</xsd:attribute>
+	<xsd:attributeGroup name="commonAtts">
+		<xsd:annotation>
+			<xsd:documentation>
+Convenience attribute group used to simplify this schema.
+          </xsd:documentation>
+		</xsd:annotation>
+		<xsd:attribute ref="wsu:Id" use="optional"/>
+		<xsd:anyAttribute namespace="##other" processContents="lax"/>
+	</xsd:attributeGroup>
+	<!-- // Utility types //////////////////////////////////////// -->
+	<xsd:complexType name="AttributedDateTime">
+		<xsd:annotation>
+			<xsd:documentation>
+This type is for elements whose [children] is a psuedo-dateTime and can have arbitrary attributes. 
+      </xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attributeGroup ref="wsu:commonAtts"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<xsd:complexType name="AttributedURI">
+		<xsd:annotation>
+			<xsd:documentation>
+This type is for elements whose [children] is an anyURI and can have arbitrary attributes.
+      </xsd:documentation>
+		</xsd:annotation>
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:anyURI">
+				<xsd:attributeGroup ref="wsu:commonAtts"/>
+			</xsd:extension>
+		</xsd:simpleContent>
+	</xsd:complexType>
+	<!-- // Timestamp header components /////////////////////////// -->
+	<xsd:complexType name="TimestampType">
+		<xsd:annotation>
+			<xsd:documentation>
+This complex type ties together the timestamp related elements into a composite type.
+            </xsd:documentation>
+		</xsd:annotation>
+		<xsd:sequence>
+			<xsd:element ref="wsu:Created" minOccurs="0"/>
+			<xsd:element ref="wsu:Expires" minOccurs="0"/>
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:any namespace="##other" processContents="lax"/>
+			</xsd:choice>
+		</xsd:sequence>
+		<xsd:attributeGroup ref="wsu:commonAtts"/>
+	</xsd:complexType>
+	<xsd:element name="Timestamp" type="wsu:TimestampType">
+		<xsd:annotation>
+			<xsd:documentation>
+This element allows Timestamps to be applied anywhere element wildcards are present,
+including as a SOAP header.
+            </xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<!-- global element decls to allow individual elements to appear anywhere -->
+	<xsd:element name="Expires" type="wsu:AttributedDateTime">
+		<xsd:annotation>
+			<xsd:documentation>
+This element allows an expiration time to be applied anywhere element wildcards are present.
+            </xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+	<xsd:element name="Created" type="wsu:AttributedDateTime">
+		<xsd:annotation>
+			<xsd:documentation>
+This element allows a creation time to be applied anywhere element wildcards are present.
+            </xsd:documentation>
+		</xsd:annotation>
+	</xsd:element>
+</xsd:schema>
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/oasis-200401-wss-wssecurity-utility-1.0.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd Mon Apr  4 18:59:51 2011
@@ -0,0 +1,146 @@
+<?xml version='1.0' encoding='utf-8' ?>
+<!--
+    W3C XML Schema defined in the Web Services Addressing 1.0 specification
+    http://www.w3.org/TR/ws-addr-core
+
+   Copyright ?? 2005 World Wide Web Consortium,
+
+   (Massachusetts Institute of Technology, European Research Consortium for
+   Informatics and Mathematics, Keio University). All Rights Reserved. This
+   work is distributed under the W3C?? Software License [1] in the hope that
+   it will be useful, but WITHOUT ANY WARRANTY; without even the implied
+   warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+   [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
+-->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:tns="http://www.w3.org/2005/08/addressing"
+	targetNamespace="http://www.w3.org/2005/08/addressing" blockDefault="#all"
+	elementFormDefault="qualified">
+	
+	<!-- Constructs from the WS-Addressing Core -->
+
+	<xs:element name="EndpointReference" type="tns:EndpointReferenceType"/>
+	<xs:complexType name="EndpointReferenceType">
+		<xs:sequence>
+			<xs:element name="Address" type="tns:AttributedURIType"/>
+			<xs:element name="ReferenceParameters" type="tns:ReferenceParametersType" minOccurs="0"/>
+			<xs:element ref="tns:Metadata" minOccurs="0"/>
+			<xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:complexType name="ReferenceParametersType">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:element name="Metadata" type="tns:MetadataType"/>
+	<xs:complexType name="MetadataType">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:element name="MessageID" type="tns:AttributedURIType"/>
+	<xs:element name="RelatesTo" type="tns:RelatesToType"/>
+	<xs:complexType name="RelatesToType">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:attribute name="RelationshipType" type="tns:RelationshipTypeOpenEnum"
+					use="optional" default="http://www.w3.org/2005/08/addressing/reply"/>
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<xs:simpleType name="RelationshipTypeOpenEnum">
+		<xs:union memberTypes="tns:RelationshipType xs:anyURI"/>
+	</xs:simpleType>
+	
+	<xs:simpleType name="RelationshipType">
+		<xs:restriction base="xs:anyURI">
+			<xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:element name="ReplyTo" type="tns:EndpointReferenceType"/>
+	<xs:element name="From" type="tns:EndpointReferenceType"/>
+	<xs:element name="FaultTo" type="tns:EndpointReferenceType"/>
+	<xs:element name="To" type="tns:AttributedURIType"/>
+	<xs:element name="Action" type="tns:AttributedURIType"/>
+
+	<xs:complexType name="AttributedURIType">
+		<xs:simpleContent>
+			<xs:extension base="xs:anyURI">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<!-- Constructs from the WS-Addressing SOAP binding -->
+
+	<xs:attribute name="IsReferenceParameter" type="xs:boolean"/>
+	
+	<xs:simpleType name="FaultCodesOpenEnumType">
+		<xs:union memberTypes="tns:FaultCodesType xs:QName"/>
+	</xs:simpleType>
+	
+	<xs:simpleType name="FaultCodesType">
+		<xs:restriction base="xs:QName">
+			<xs:enumeration value="tns:InvalidAddressingHeader"/>
+			<xs:enumeration value="tns:InvalidAddress"/>
+			<xs:enumeration value="tns:InvalidEPR"/>
+			<xs:enumeration value="tns:InvalidCardinality"/>
+			<xs:enumeration value="tns:MissingAddressInEPR"/>
+			<xs:enumeration value="tns:DuplicateMessageID"/>
+			<xs:enumeration value="tns:ActionMismatch"/>
+			<xs:enumeration value="tns:MessageAddressingHeaderRequired"/>
+			<xs:enumeration value="tns:DestinationUnreachable"/>
+			<xs:enumeration value="tns:ActionNotSupported"/>
+			<xs:enumeration value="tns:EndpointUnavailable"/>
+		</xs:restriction>
+	</xs:simpleType>
+	
+	<xs:element name="RetryAfter" type="tns:AttributedUnsignedLongType"/>
+	<xs:complexType name="AttributedUnsignedLongType">
+		<xs:simpleContent>
+			<xs:extension base="xs:unsignedLong">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<xs:element name="ProblemHeaderQName" type="tns:AttributedQNameType"/>
+	<xs:complexType name="AttributedQNameType">
+		<xs:simpleContent>
+			<xs:extension base="xs:QName">
+				<xs:anyAttribute namespace="##other" processContents="lax"/>
+			</xs:extension>
+		</xs:simpleContent>
+	</xs:complexType>
+	
+	<xs:element name="ProblemHeader" type="tns:AttributedAnyType"/>
+	<xs:complexType name="AttributedAnyType">
+		<xs:sequence>
+			<xs:any namespace="##any" processContents="lax"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+	<xs:element name="ProblemIRI" type="tns:AttributedURIType"/>
+	
+	<xs:element name="ProblemAction" type="tns:ProblemActionType"/>
+	<xs:complexType name="ProblemActionType">
+		<xs:sequence>
+			<xs:element ref="tns:Action" minOccurs="0"/>
+			<xs:element name="SoapAction" minOccurs="0" type="xs:anyURI"/>
+		</xs:sequence>
+		<xs:anyAttribute namespace="##other" processContents="lax"/>
+	</xs:complexType>
+	
+</xs:schema>

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-addr.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd
URL: http://svn.apache.org/viewvc/cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd?rev=1088726&view=auto
==============================================================================
--- cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd (added)
+++ cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd Mon Apr  4 18:59:51 2011
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+(c) 2001-2006 BEA Systems Inc., International Business Machines Corporation, Microsoft Corporation, Inc., SAP AG, Sonic Software, and VeriSign, Inc. All rights reserved.
+
+Permission to copy and display the WS-Policy Specification (the "Specification", which includes WSDL and schema documents), in any medium without fee or royalty is hereby granted, provided that you include the following on ALL copies of the WS-Policy Specification, that you make:
+
+1.	A link or URL to the WS-Policy Specification at one of the Authors' websites
+2.	The copyright notice as shown in the WS-Policy Specification.
+
+BEA Systems, IBM, Microsoft, SAP, Sonic Software, and VeriSign (collectively, the "Authors") each agree to grant you a license, under royalty-free and otherwise reasonable, non-discriminatory terms and conditions, to their respective essential patent claims that they deem necessary to implement the WS-Policy Specification.
+
+THE WS-POLICY SPECIFICATION IS PROVIDED "AS IS," AND THE AUTHORS MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; THAT THE CONTENTS OF THE WS-POLICY SPECIFICATION ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+
+THE AUTHORS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATING TO ANY USE OR DISTRIBUTION OF THE WS-POLICY SPECIFICATION.
+
+The name and trademarks of the Authors may NOT be used in any manner, including advertising or publicity pertaining to the WS-Policy Specification or its contents without specific, written prior permission. Title to copyright in the WS-Policy Specification will at all times remain with the Authors.
+
+No other rights are granted by implication, estoppel or otherwise.
+-->
+<xs:schema targetNamespace="http://schemas.xmlsoap.org/ws/2004/09/policy"
+	xmlns:tns="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+	xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
+	xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
+	elementFormDefault="qualified" blockDefault="#all">
+
+  <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" schemaLocation="./oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
+
+  <xs:import namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" schemaLocation="./oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
+
+  <!-- ////////// WS-Policy ////////// -->
+
+  <xs:element name="Policy">
+    <xs:complexType>
+      <xs:complexContent>
+        <xs:extension base="tns:OperatorContentType">
+          <xs:attribute name="Name" type="xs:anyURI"/>
+          <xs:attribute ref="wsu:Id"/>
+          <xs:anyAttribute namespace="##any" processContents="lax"/>
+        </xs:extension>
+      </xs:complexContent>
+    </xs:complexType>
+  </xs:element>
+  <xs:element name="All" type="tns:OperatorContentType"/>
+  <xs:element name="ExactlyOne" type="tns:OperatorContentType"/>
+
+  <xs:complexType name="OperatorContentType">
+    <xs:sequence>
+      <xs:choice minOccurs="0" maxOccurs="unbounded">
+        <xs:element ref="tns:Policy"/>
+        <xs:element ref="tns:All"/>
+        <xs:element ref="tns:ExactlyOne"/>
+        <xs:element ref="tns:PolicyReference"/>
+        <xs:any namespace="##other" processContents="lax"/>
+      </xs:choice>
+    </xs:sequence>
+  </xs:complexType>
+
+  <xs:element name="PolicyReference">
+    <xs:complexType>
+      <xs:attribute name="URI" type="xs:anyURI" use="required"/>
+      <xs:attribute name="Digest" type="xs:base64Binary"/>
+      <xs:attribute name="DigestAlgorithm" type="xs:anyURI" default="http://schemas.xmlsoap.org/ws/2004/09/policy/Sha1Exc"/>
+      <xs:anyAttribute namespace="##any" processContents="lax"/>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:attribute name="Optional" type="xs:boolean" default="false"/>
+
+  <!-- ////////// WS-PolicyAttachment ////////// -->
+
+  <xs:attribute name="PolicyURIs">
+    <xs:simpleType>
+      <xs:list itemType="xs:anyURI"/>
+    </xs:simpleType>
+  </xs:attribute>
+
+  <xs:element name="PolicyAttachment">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:element ref="tns:AppliesTo"/>
+        <xs:choice maxOccurs="unbounded">
+          <xs:element ref="tns:Policy"/>
+          <xs:element ref="tns:PolicyReference"/>
+        </xs:choice>
+        <!-- omitted only because it causes the content model to be non-determistic
+        <xs:element ref="wsse:Security" minOccurs="0" />
+-->
+        <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="lax"/>
+    </xs:complexType>
+  </xs:element>
+
+  <xs:element name="AppliesTo">
+    <xs:complexType>
+      <xs:sequence>
+        <xs:any namespace="##any" processContents="lax" maxOccurs="unbounded"/>
+      </xs:sequence>
+      <xs:anyAttribute namespace="##any" processContents="lax"/>
+    </xs:complexType>
+  </xs:element>
+
+</xs:schema>
\ No newline at end of file

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: cxf/trunk/distribution/src/main/release/samples/sts_issue_operation/src/main/webapp/WEB-INF/wsdl/ws-policy.xsd
------------------------------------------------------------------------------
    svn:mime-type = text/xml