Author: nandana
Date: Mon Feb 25 22:18:36 2008
New Revision: 631102

URL: http://svn.apache.org/viewvc?rev=631102&view=rev
Log:
Changed the key type

Added:
    
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/SimpleService.java
   (with props)
Modified:
    
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/policy.xml
    
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/services.xml
    
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/Client.java

Modified: 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/policy.xml
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/policy.xml?rev=631102&r1=631101&r2=631102&view=diff
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/policy.xml
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/policy.xml
 Mon Feb 25 22:18:36 2008
@@ -35,10 +35,10 @@
                                        <wsp:Policy>
                                                <sp:IssuedToken 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
                                                        <Issuer 
xmlns="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
-                                                               <Address 
xmlns="http://www.w3.org/2005/08/addressing";>http://not.yet.used.info/</Address>
+                                                               <Address 
xmlns="http://www.w3.org/2005/08/addressing";>http://localhost:8080/axis2/services/STS</Address>
                                                        </Issuer>
                                                        
<sp:RequestSecurityTokenTemplate>
-                                                               <t:TokenType 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>
+                                                               <t:TokenType 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1</t:TokenType>
                                                                <t:KeyType 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey</t:KeyType>
                                                                <t:KeySize 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>256</t:KeySize>
                                                        
</sp:RequestSecurityTokenTemplate>

Modified: 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/services.xml
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/services.xml?rev=631102&r1=631101&r2=631102&view=diff
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/services.xml
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/services.xml
 Mon Feb 25 22:18:36 2008
@@ -15,7 +15,7 @@
  ! See the License for the specific language governing permissions and
  ! limitations under the License.
  !-->
-<!-- services.xml of sample-1 : UsernameToken-->
+<!-- services.xml of Sample05 : WS Trust -->
 <serviceGroup>
 <service name="STS">   
        <module ref="rampart" />
@@ -53,11 +53,11 @@
                Valid values are: EncryptedKey & BinarySecret
             -->
                        <proofKeyType>BinarySecret</proofKeyType>
-                       <trusted-services>
-                               <service 
alias="client">http://localhost:8080/axis2/services/SimpleService</service>
-                       </trusted-services>
+            <trusted-services>
+                               <service alias="service">*</service>
+            </trusted-services>
                </saml-issuer-config>
-               </parameter>
+    </parameter>
 
        <wsp:Policy wsu:Id="SigOnly" 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy";>
                <wsp:ExactlyOne>
@@ -178,7 +178,7 @@
                                                        </Issuer>
                                                        
<sp:RequestSecurityTokenTemplate>
                                                                <t:TokenType 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>urn:oasis:names:tc:SAML:1.0:assertion</t:TokenType>
-                                                               <t:KeyType 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/PublicKey</t:KeyType>
+                                                               <t:KeyType 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>http://schemas.xmlsoap.org/ws/2005/02/trust/SymmetricKey</t:KeyType>
                                                                <t:KeySize 
xmlns:t="http://schemas.xmlsoap.org/ws/2005/02/trust";>256</t:KeySize>
                                                        
</sp:RequestSecurityTokenTemplate>
                                                        <wsp:Policy>

Modified: 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/Client.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/Client.java?rev=631102&r1=631101&r2=631102&view=diff
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/Client.java
 (original)
+++ 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/Client.java
 Mon Feb 25 22:18:36 2008
@@ -21,6 +21,7 @@
 import org.apache.axiom.om.OMFactory;
 import org.apache.axiom.om.OMNamespace;
 import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.soap.SOAP12Constants;
 import org.apache.axis2.addressing.AddressingConstants;
 import org.apache.axis2.addressing.EndpointReference;
 import org.apache.axis2.client.Options;
@@ -50,10 +51,9 @@
                        System.out.println("Usage: $java Client 
endpoint_address client_repo_path policy_xml_path");
                }
 
-               ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], 
null);
-
+               ConfigurationContext ctx = 
ConfigurationContextFactory.createConfigurationContextFromFileSystem(args[1], 
null);         
                
-               STSClient stsClient = new STSClient(ctx);
+               STSClient stsClient = new STSClient(ctx);               
                
                stsClient.setRstTemplate(getRSTTemplate());
                String action = 
TrustUtil.getActionValue(RahasConstants.VERSION_05_02, 
RahasConstants.RST_ACTION_ISSUE);
@@ -116,7 +116,7 @@
        OMFactory fac = OMAbstractFactory.getOMFactory();
        OMElement elem = 
fac.createOMElement(SP11Constants.REQUEST_SECURITY_TOKEN_TEMPLATE);
        TrustUtil.createTokenTypeElement(RahasConstants.VERSION_05_02, 
elem).setText(RahasConstants.TOK_TYPE_SAML_10);
-       TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02, elem, 
RahasConstants.KEY_TYPE_PUBLIC_KEY);
+       TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02, elem, 
RahasConstants.KEY_TYPE_SYMM_KEY);
        TrustUtil.createKeySizeElement(RahasConstants.VERSION_05_02, elem, 256);
        return elem;
     }  

Added: 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/SimpleService.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/SimpleService.java?rev=631102&view=auto
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/SimpleService.java
 (added)
+++ 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/SimpleService.java
 Mon Feb 25 22:18:36 2008
@@ -0,0 +1,24 @@
+/*
+ * Copyright  2003-2005 The Apache Software Foundation.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ *
+ */
+package org.apache.rampart.samples.policy.sample05;
+
+public class SimpleService {
+    
+    public String echo(String arg) {
+        return arg;
+    }
+}

Propchange: 
webservices/rampart/trunk/java/modules/rampart-samples/policy/sample05/src/org/apache/rampart/samples/policy/sample05/SimpleService.java
------------------------------------------------------------------------------
    svn:executable = *


Reply via email to