ws-axis-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r391922 - in /webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas: RahasConfiguration.java STSRequester.java Sender.java
Date Thu, 06 Apr 2006 07:47:07 GMT
Author: ruchithf
Date: Thu Apr  6 00:47:04 2006
New Revision: 391922

URL: http://svn.apache.org/viewcvs?rev=391922&view=rev
Log:
Don't hold on to the SCT instance in the rahas configuration

Modified:
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/STSRequester.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java?rev=391922&r1=391921&r2=391922&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java
Thu Apr  6 00:47:04 2006
@@ -131,6 +131,10 @@
     
     private SecurityContextToken sct;
     
+    private byte[] requesterEntropy;
+    
+    private byte[] issuerEntropy;
+    
     public static RahasConfiguration load(MessageContext msgCtx, boolean sender)
             throws Exception {
         Parameter param = msgCtx.getParameter(RAHAS_CONFIG);
@@ -448,14 +452,6 @@
         return contextIdentifier;
     }
 
-//    /**
-//     * @param contextIdentifier The contextIdentifier to set.
-//     */
-//    protected void setContextIdentifier(String contextIdentifier) throws RahasException
{
-//        this.contextIdentifier = contextIdentifier;
-//        this.resgisterContext(contextIdentifier);
-//    }
-
     /**
      * @return Returns the cryptoProperties.
      */
@@ -576,24 +572,38 @@
     }
 
     /**
-     * @return Returns the sct.
+     * @param passwordCallbackClass The passwordCallbackClass to set.
      */
-    protected SecurityContextToken getSecurityContextToken() {
-        return sct;
+    public void setPasswordCallbackClass(String passwordCallbackClass) {
+        this.passwordCallbackClass = passwordCallbackClass;
     }
 
     /**
-     * @param sct The sct to set.
+     * @return Returns the issuerEntropy.
      */
-    protected void setSecurityContextToken(SecurityContextToken sct) {
-        this.sct = sct;
+    protected byte[] getIssuerEntropy() {
+        return issuerEntropy;
     }
 
     /**
-     * @param passwordCallbackClass The passwordCallbackClass to set.
+     * @param issuerEntropy The issuerEntropy to set.
      */
-    public void setPasswordCallbackClass(String passwordCallbackClass) {
-        this.passwordCallbackClass = passwordCallbackClass;
+    protected void setIssuerEntropy(byte[] issuerEntropy) {
+        this.issuerEntropy = issuerEntropy;
+    }
+
+    /**
+     * @return Returns the requesterEntropy.
+     */
+    protected byte[] getRequesterEntropy() {
+        return requesterEntropy;
+    }
+
+    /**
+     * @param requesterEntropy The requesterEntropy to set.
+     */
+    protected void setRequesterEntropy(byte[] requesterEntropy) {
+        this.requesterEntropy = requesterEntropy;
     }
     
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/STSRequester.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/STSRequester.java?rev=391922&r1=391921&r2=391922&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/STSRequester.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/STSRequester.java
Thu Apr  6 00:47:04 2006
@@ -117,7 +117,6 @@
             if(sctElem != null) {
                 SecurityContextToken sct = new SecurityContextToken((Element)sctElem);
                 token = new Token(sct.getIdentifier(), sctElem.cloneOMElement());
-                config.setSecurityContextToken(sct);
                 config.resgisterContext(sct.getIdentifier());
             } else {
                 throw new RahasException("sctMissingInResponse");

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java?rev=391922&r1=391921&r2=391922&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java
(original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java
Thu Apr  6 00:47:04 2006
@@ -25,6 +25,7 @@
 import org.apache.axis2.engine.Handler;
 import org.apache.axis2.security.WSDoAllSender;
 import org.apache.axis2.security.trust.Constants;
+import org.apache.axis2.security.trust.Token;
 import org.apache.ws.security.WSConstants;
 import org.apache.ws.security.components.crypto.Crypto;
 import org.apache.ws.security.message.WSSecDKEncrypt;
@@ -32,6 +33,7 @@
 import org.apache.ws.security.message.token.SecurityContextToken;
 import org.apache.ws.security.util.WSSecurityUtil;
 import org.w3c.dom.Document;
+import org.w3c.dom.Element;
 
 import javax.xml.namespace.QName;
 
@@ -108,10 +110,12 @@
         WSSecHeader secHeader = new WSSecHeader();
         secHeader.insertSecurityHeader(doc);
         
-        byte[] tempSecret = config.getTokenStore().getToken(
-                config.getContextIdentifier()).getSecret();
+        Token tempToken = config.getTokenStore().getToken(
+                config.getContextIdentifier());
+        byte[] tempSecret = tempToken.getSecret();
 
-        SecurityContextToken sct = config.getSecurityContextToken();
+        SecurityContextToken sct = new SecurityContextToken((Element) doc
+                .importNode((Element) tempToken.getToken(), true));
         if(sct == null) {
             
         }



Mime
View raw message