Author: ruchithf
Date: Tue Oct 30 00:44:35 2007
New Revision: 589979

URL: http://svn.apache.org/viewvc?rev=589979&view=rev
Log:
Missed these files in my previous commit

Added:
    
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/policy/14.xml
    
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/services-14.xml
    
webservices/rampart/trunk/java/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java

Added: 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/policy/14.xml
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/policy/14.xml?rev=589979&view=auto
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/policy/14.xml
 (added)
+++ 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/policy/14.xml
 Tue Oct 30 00:44:35 2007
@@ -0,0 +1,92 @@
+<wsp:Policy wsu:Id="MutualCertificate11Sign_IPingService_policy"
+            
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";
+            xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
+    <wsp:ExactlyOne>
+        <wsp:All>
+                <sp:SymmetricBinding 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                    <wsp:Policy>
+                        <sp:ProtectionToken>
+                            <wsp:Policy>
+                                <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>
+                                    <wsp:Policy>
+                                        <sp:RequireThumbprintReference/> 
+                                        <sp:WssX509V3Token10/>
+                                    </wsp:Policy>
+                                </sp:X509Token>
+                            </wsp:Policy>
+                        </sp:ProtectionToken>
+                        <sp:AlgorithmSuite>
+                            <wsp:Policy>
+                                <sp:Basic256/>
+                            </wsp:Policy>
+                        </sp:AlgorithmSuite>
+                        <sp:Layout>
+                            <wsp:Policy>
+                                <sp:Strict/>
+                            </wsp:Policy>
+                        </sp:Layout>
+                        <sp:IncludeTimestamp/>
+                        <sp:OnlySignEntireHeadersAndBody/>
+                    </wsp:Policy>
+                </sp:SymmetricBinding>
+                <sp:EndorsingSupportingTokens 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                    <wsp:Policy>
+                        <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
+                            <wsp:Policy>
+                                <sp:RequireThumbprintReference/>
+                                <sp:WssX509V3Token10/>
+                            </wsp:Policy>
+                        </sp:X509Token>
+                    </wsp:Policy>
+                </sp:EndorsingSupportingTokens>
+                <sp:SignedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                    <sp:Body/>
+                    <sp:Header Name="To" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                    <sp:Header Name="From" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                    <sp:Header Name="FaultTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                    <sp:Header Name="ReplyTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                    <sp:Header Name="MessageID" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                    <sp:Header Name="RelatesTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                    <sp:Header Name="Action" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                </sp:SignedParts>
+               <sp:Wss11 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                    <wsp:Policy>
+                        <sp:MustSupportRefKeyIdentifier/>
+                        <sp:MustSupportRefIssuerSerial/>
+                        <sp:MustSupportRefThumbprint/>
+                        <sp:MustSupportRefEncryptedKey/>
+                        <sp:RequireSignatureConfirmation/>
+                    </wsp:Policy>
+                </sp:Wss11> 
+                <sp:Trust10 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                    <wsp:Policy>
+                        <sp:MustSupportIssuedTokens/>
+                        <sp:RequireClientEntropy/>
+                        <sp:RequireServerEntropy/>
+                    </wsp:Policy>
+                </sp:Trust10>
+                
+                       <ramp:RampartConfig 
xmlns:ramp="http://ws.apache.org/rampart/policy";> 
+                               <ramp:user>alice</ramp:user>
+                               <ramp:encryptionUser>bob</ramp:encryptionUser>
+                               
<ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+                               
+                               <ramp:signatureCrypto>
+                                       <ramp:crypto 
provider="org.apache.ws.security.components.crypto.Merlin">
+                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+                                       </ramp:crypto>
+                               </ramp:signatureCrypto>
+                               <ramp:encryptionCypto>
+                                       <ramp:crypto 
provider="org.apache.ws.security.components.crypto.Merlin">
+                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+                                       </ramp:crypto>
+                               </ramp:encryptionCypto>
+                       </ramp:RampartConfig>
+        </wsp:All>
+    </wsp:ExactlyOne>
+</wsp:Policy>
\ No newline at end of file

Added: 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/services-14.xml
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/services-14.xml?rev=589979&view=auto
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/services-14.xml
 (added)
+++ 
webservices/rampart/trunk/java/modules/rampart-integration/src/test/resources/rampart/services-14.xml
 Tue Oct 30 00:44:35 2007
@@ -0,0 +1,105 @@
+<service name="SecureService14">
+
+       <module ref="addressing"/>
+       <module ref="rampart"/>
+
+       <parameter locked="false" 
name="ServiceClass">org.apache.rampart.Service</parameter>
+
+       <operation name="echo">
+               <messageReceiver 
class="org.apache.axis2.receivers.RawXMLINOutMessageReceiver"/>
+               <actionMapping>urn:echo</actionMapping>
+       </operation>
+
+       <wsp:Policy wsu:Id="MutualCertificate11Sign_IPingService_policy"
+                   
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";
+                   
xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing";>
+           <wsp:ExactlyOne>
+               <wsp:All>
+                       <sp:SymmetricBinding 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                           <wsp:Policy>
+                               <sp:ProtectionToken>
+                                   <wsp:Policy>
+                                       <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/Never";>
+                                           <wsp:Policy>
+                                               
<sp:RequireThumbprintReference/> 
+                                               <sp:WssX509V3Token10/>
+                                           </wsp:Policy>
+                                       </sp:X509Token>
+                                   </wsp:Policy>
+                               </sp:ProtectionToken>
+                               <sp:AlgorithmSuite>
+                                   <wsp:Policy>
+                                       <sp:Basic256/>
+                                   </wsp:Policy>
+                               </sp:AlgorithmSuite>
+                               <sp:Layout>
+                                   <wsp:Policy>
+                                       <sp:Strict/>
+                                   </wsp:Policy>
+                               </sp:Layout>
+                               <sp:IncludeTimestamp/>
+                               <sp:OnlySignEntireHeadersAndBody/>
+                           </wsp:Policy>
+                       </sp:SymmetricBinding>
+                       <sp:EndorsingSupportingTokens 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                           <wsp:Policy>
+                               <sp:X509Token 
sp:IncludeToken="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy/IncludeToken/AlwaysToRecipient";>
+                                   <wsp:Policy>
+                                       <sp:RequireThumbprintReference/>
+                                       <sp:WssX509V3Token10/>
+                                   </wsp:Policy>
+                               </sp:X509Token>
+                           </wsp:Policy>
+                       </sp:EndorsingSupportingTokens>
+                       <sp:SignedParts 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                           <sp:Body/>
+                           <sp:Header Name="To" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                           <sp:Header Name="From" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                           <sp:Header Name="FaultTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                           <sp:Header Name="ReplyTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                           <sp:Header Name="MessageID" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                           <sp:Header Name="RelatesTo" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                           <sp:Header Name="Action" 
Namespace="http://schemas.xmlsoap.org/ws/2004/08/addressing"/>
+                       </sp:SignedParts>
+                      <sp:Wss11 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                           <wsp:Policy>
+                               <sp:MustSupportRefKeyIdentifier/>
+                               <sp:MustSupportRefIssuerSerial/>
+                               <sp:MustSupportRefThumbprint/>
+                               <sp:MustSupportRefEncryptedKey/>
+                               <sp:RequireSignatureConfirmation/>
+                           </wsp:Policy>
+                       </sp:Wss11> 
+                       <sp:Trust10 
xmlns:sp="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";>
+                           <wsp:Policy>
+                               <sp:MustSupportIssuedTokens/>
+                               <sp:RequireClientEntropy/>
+                               <sp:RequireServerEntropy/>
+                           </wsp:Policy>
+                       </sp:Trust10>
+                                       <ramp:RampartConfig 
xmlns:ramp="http://ws.apache.org/rampart/policy";> 
+                                               <ramp:user>alice</ramp:user>
+                                               
<ramp:encryptionUser>bob</ramp:encryptionUser>
+                                               
<ramp:passwordCallbackClass>org.apache.rampart.PWCallback</ramp:passwordCallbackClass>
+                                               
+                                               <ramp:signatureCrypto>
+                                                       <ramp:crypto 
provider="org.apache.ws.security.components.crypto.Merlin">
+                                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+                                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+                                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+                                                       </ramp:crypto>
+                                               </ramp:signatureCrypto>
+                                               <ramp:encryptionCypto>
+                                                       <ramp:crypto 
provider="org.apache.ws.security.components.crypto.Merlin">
+                                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</ramp:property>
+                                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.file">rampart/store.jks</ramp:property>
+                                                               <ramp:property 
name="org.apache.ws.security.crypto.merlin.keystore.password">password</ramp:property>
+                                                       </ramp:crypto>
+                                               </ramp:encryptionCypto>
+                                       </ramp:RampartConfig>
+               </wsp:All>
+           </wsp:ExactlyOne>
+       </wsp:Policy>
+
+</service>

Added: 
webservices/rampart/trunk/java/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java
URL: 
http://svn.apache.org/viewvc/webservices/rampart/trunk/java/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java?rev=589979&view=auto
==============================================================================
--- 
webservices/rampart/trunk/java/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java
 (added)
+++ 
webservices/rampart/trunk/java/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java
 Tue Oct 30 00:44:35 2007
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2004,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.rahas;
+
+import java.util.Date;
+
+import org.apache.axiom.om.OMElement;
+
+/**
+ * This token is used store Encrypted Key Tokens. This token contains the
+ * SHA1 value of the Encrypted Key.
+ *
+ * These tokens are stored using the storage mechanism provided via the 
+ * <code>TokenStorage</code> interface.
+ * @see org.apache.rahas.TokenStorage
+ *
+ */
+public class EncryptedKeyToken extends Token {
+       
+    /**
+     * SHA1 value of the encrypted key
+     */
+    private String sha;
+       
+       public EncryptedKeyToken (String id,Date created, Date expires) {
+               super(id,created,expires);
+       }
+       
+       public EncryptedKeyToken (String id, OMElement tokenElem, 
+                                           Date created, Date expires)throws 
TrustException{
+               super(id,tokenElem,created,expires);
+       }
+       
+       /**
+        * @param sha SHA1 of the encrypted key
+        */
+       public void setSHA1(String sha) {
+               this.sha = sha;
+       }
+       
+       /** 
+        * @return SHA1 value of the encrypted key 
+        */
+       public String getSHA1() {
+               return sha;
+       }
+
+}


Reply via email to