You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ru...@apache.org on 2006/03/26 19:02:38 UTC

svn commit: r388923 - in /webservices/axis2/trunk/java/modules/security: ./ src/org/apache/axis2/security/trust/ src/org/apache/axis2/security/trust/impl/ test-resources/trust/impl/ test/org/apache/axis2/security/trust/

Author: ruchithf
Date: Sun Mar 26 09:02:36 2006
New Revision: 388923

URL: http://svn.apache.org/viewcvs?rev=388923&view=rev
Log:
- Moved the SCTIssuerConfig to a separate class
- Changed the 'configuration files' as the default config mechanism in the sts-services.xml file
- Added room allow for component configuration information in the dispatcher-configuration. This will allow two types of config info: OMElement and file
- Updated the interfaces to provide configuration information


Added:
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java
    webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sct-issuer-config.xml
    webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/token-dispatcher-configuration.xml
Modified:
    webservices/axis2/trunk/java/modules/security/maven.xml
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenCanceler.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenIssuer.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenValidator.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenVerifier.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties
    webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java
    webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sts-services.xml
    webservices/axis2/trunk/java/modules/security/test/org/apache/axis2/security/trust/TempIssuer.java

Modified: webservices/axis2/trunk/java/modules/security/maven.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/maven.xml?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/security/maven.xml Sun Mar 26 09:02:36 2006
@@ -71,6 +71,8 @@
         <copy file="${maven.repo.local}/wss4j/jars/wss4j-${wss4j.version}.jar" todir="target/sts/lib"/>        
         
         <copy file="test-resources/trust/impl/sts-services.xml" toFile="target/sts/META-INF/services.xml"/>
+		<copy file="test-resources/trust/impl/sct-issuer-config.xml" toFile="target/sts/META-INF/sct-issuer-config.xml"/>
+		<copy file="test-resources/trust/impl/token-dispatcher-configuration.xml" toFile="target/sts/token-dispatcher-configuration.xml"/>
         <copy file="test-resources/trust/impl/sctIssuer.properties" toFile="target/sts/sctIssuer.properties"/>
         <copy file="test-resources/trust/impl/sts.jks" toFile="target/sts/sts.jks"/>
         

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/STSMessageReceiver.java Sun Mar 26 09:02:36 2006
@@ -45,7 +45,7 @@
                         .getParameterElement().getFirstChildWithName(
                                 new QName("token-dispatcher-configuration")));
             } else if (paramFile != null) {
-                dispatcher = new TokenRequestDispatcher((String) param
+                dispatcher = new TokenRequestDispatcher((String) paramFile
                         .getValue());
             } else {
                 dispatcher = new TokenRequestDispatcher(

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenCanceler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenCanceler.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenCanceler.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenCanceler.java Sun Mar 26 09:02:36 2006
@@ -24,4 +24,23 @@
     
     public SOAPEnvelope cancel(OMElement request, MessageContext msgCtx) throws TrustException;
     
+    /**
+     * Set the configuration file of this TokenCanceller.
+     * 
+     * This is the text value of the &lt;configuration-file&gt; element of the 
+     * token-dispatcher-configuration
+     * @param configFile
+     */
+    public void setConfigurationFile(String configFile);
+    
+    /**
+     * Set the configuration element of this TokenCanceller.
+     * 
+     * This is the &lt;configuration&gt; element of the 
+     * token-dispatcher-configuration
+     * 
+     * @param configElement <code>OMElement</code> representing the configuation
+     */
+    public void setConfigurationElement(String configElement);
+    
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenIssuer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenIssuer.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenIssuer.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenIssuer.java Sun Mar 26 09:02:36 2006
@@ -55,4 +55,23 @@
      */
     public String getResponseAction(OMElement request, MessageContext inMsgCtx)
             throws TrustException;
+    
+    /**
+     * Set the configuration file of this TokenIssuer.
+     * 
+     * This is the text value of the &lt;configuration-file&gt; element of the 
+     * token-dispatcher-configuration
+     * @param configFile
+     */
+    public void setConfigurationFile(String configFile);
+    
+    /**
+     * Set the configuration element of this TokenIssuer.
+     * 
+     * This is the &lt;configuration&gt; element of the 
+     * token-dispatcher-configuration
+     * 
+     * @param configElement <code>OMElement</code> representing the configuation
+     */
+    public void setConfigurationElement(OMElement configElement);
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenRequestDispatcherConfig.java Sun Mar 26 09:02:36 2006
@@ -30,21 +30,28 @@
     public final static String CONFIG_PARAM_KEY = "token-dispatcher-configuration";
     public final static String CONFIG_FILE_KEY = "token-dispatcher-configuration-file";
     
-    private final static QName CONFIG = new QName("token-dispatcher-configuration");
+    private final static QName DISPATCHER_CONFIG = new QName("token-dispatcher-configuration");
     public final static QName ISSUER = new QName("issuer");
     public final static QName TOKEN_TYPE = new QName("tokenType");
     public final static QName CLASS_ATTR = new QName("class");
     public final static QName DEFAULT_ATTR = new QName("default");
     
+    public final static QName CONFIGURATION_FILE = new QName("configuration-file");
+    public final static QName CONFIGURATION_ELEMENT = new QName("configuration");
+    
     private Hashtable issuers;
     
+    private Hashtable configFiles = new Hashtable();
+    
+    private Hashtable configElements = new Hashtable();
+    
     private String defaultIssuerClassName;
     
     
     public static TokenRequestDispatcherConfig load(OMElement configElem)
             throws TrustException {
         
-        if(!CONFIG.equals(configElem.getQName())) {
+        if(!DISPATCHER_CONFIG.equals(configElem.getQName())) {
             throw new TrustException("incorrectConfiguration");
         }
         
@@ -54,17 +61,31 @@
         while (issuerElems.hasNext()) {
             OMElement element = (OMElement) issuerElems.next();
             //get the class attr
-            String classAttr = element.getAttributeValue(CLASS_ATTR);
-            if(classAttr == null) {
+            String issuerClass = element.getAttributeValue(CLASS_ATTR);
+            if(issuerClass == null) {
                 throw new TrustException("missingClassName");
             }
             String isDefault = element.getAttributeValue(DEFAULT_ATTR);
             if(isDefault != null && "true".equalsIgnoreCase(isDefault)) {
                 //Use the first default issuer as the default isser
                 if(conf.defaultIssuerClassName == null) {
-                    conf.defaultIssuerClassName = classAttr;
+                    conf.defaultIssuerClassName = issuerClass;
                 }
             }
+            
+            //Process configuration file information
+            OMElement issuerConfigFileElement = element.getFirstChildWithName(CONFIGURATION_FILE);
+            String issuerConfigFile = (issuerConfigFileElement != null) ? issuerConfigFileElement.getText() : null;
+            if(issuerConfigFile != null) {
+                conf.configFiles.put(issuerClass, issuerConfigFile);
+            }
+            
+            //Process configuration element information
+            OMElement issuerConfigElement = element.getFirstChildWithName(CONFIGURATION_ELEMENT);
+            if(issuerConfigElement != null) {
+                conf.configElements.put(issuerClass, issuerConfigElement);    
+            }
+            
             //Process token types
             Iterator tokenTypes = element.getChildrenWithName(TOKEN_TYPE);
             while (tokenTypes.hasNext()) {
@@ -72,7 +93,7 @@
                 String value = type.getText();
                 if(value == null || "".equals(value)) {
                     throw new TrustException("invalidTokenTypeDefinition",
-                            new String[] { "Issuer", classAttr });
+                            new String[] { "Issuer", issuerClass });
                 }
                 if(conf.issuers == null) {
                     conf.issuers = new Hashtable();
@@ -80,7 +101,7 @@
                 //If the token type is not aleady declared then add it to the 
                 //table with the issuer classname
                 if(conf.issuers.keySet().size() > 0 && !conf.issuers.keySet().contains(value)) {
-                    conf.issuers.put(value, classAttr);
+                    conf.issuers.put(value, issuerClass);
                 }
             }
         }
@@ -101,7 +122,8 @@
             fis = new FileInputStream(configFilePath);
              builder = new StAXOMBuilder(fis);
         } catch (Exception e) {
-            throw new TrustException("errorLoadingConfigFile", new String[] {configFilePath});
+            throw new TrustException("errorLoadingConfigFile",
+                    new String[] { configFilePath });
         }
         
         return load(builder.getDocumentElement());
@@ -111,8 +133,7 @@
     public TokenIssuer getDefaultIssuerInstace() throws TrustException {
         if(this.defaultIssuerClassName != null) {
             try {
-                return (TokenIssuer) Loader.loadClass(
-                        this.defaultIssuerClassName).newInstance();
+                return createIssuer(this.defaultIssuerClassName);
             } catch (Exception e) {
                 throw new TrustException("cannotLoadClass",
                         new String[] { this.defaultIssuerClassName }, e);
@@ -138,12 +159,25 @@
             issuerClassName = this.defaultIssuerClassName;
         }
         try {
-            return (TokenIssuer) Loader.loadClass(
-                    this.defaultIssuerClassName).newInstance();
+            return createIssuer(issuerClassName);
         } catch (Exception e) {
             throw new TrustException("cannotLoadClass",
                     new String[] { this.defaultIssuerClassName }, e);
         }
         
+    }
+
+    /**
+     * @param issuerClassName
+     * @return
+     */
+    private TokenIssuer createIssuer(String issuerClassName) throws Exception {
+        TokenIssuer issuer = (TokenIssuer) Loader.loadClass(
+                issuerClassName).newInstance();
+        issuer.setConfigurationElement((OMElement) this.configElements
+                .get(issuerClassName));
+        issuer.setConfigurationFile((String) this.configFiles
+                .get(issuerClassName));
+        return issuer;
     }
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenValidator.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenValidator.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenValidator.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenValidator.java Sun Mar 26 09:02:36 2006
@@ -23,4 +23,24 @@
 public interface TokenValidator {
 
     public SOAPEnvelope validate(OMElement request, MessageContext msgCtx) throws TrustException;
+    
+    
+    /**
+     * Set the configuration file of this TokenValidator.
+     * 
+     * This is the text value of the &lt;configuration-file&gt; element of the 
+     * token-dispatcher-configuration
+     * @param configFile
+     */
+    public void setConfigurationFile(String configFile);
+    
+    /**
+     * Set the configuration element of this TokenValidator.
+     * 
+     * This is the &lt;configuration&gt; element of the 
+     * token-dispatcher-configuration
+     * 
+     * @param configElement <code>OMElement</code> representing the configuation
+     */
+    public void setConfigurationElement(String configElement);
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenVerifier.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenVerifier.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenVerifier.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/TokenVerifier.java Sun Mar 26 09:02:36 2006
@@ -23,4 +23,23 @@
 public interface TokenVerifier {
     
     public SOAPEnvelope veify(OMElement request, MessageContext msgCtx) throws TrustException;
+    
+    /**
+     * Set the configuration file of this TokenVerifier.
+     * 
+     * This is the text value of the &lt;configuration-file&gt; element of the 
+     * token-dispatcher-configuration
+     * @param configFile
+     */
+    public void setConfigurationFile(String configFile);
+    
+    /**
+     * Set the configuration element of this TokenVerifier.
+     * 
+     * This is the &lt;configuration&gt; element of the 
+     * token-dispatcher-configuration
+     * 
+     * @param configElement <code>OMElement</code> representing the configuation
+     */
+    public void setConfigurationElement(String configElement);
 }

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/errors.properties Sun Mar 26 09:02:36 2006
@@ -22,3 +22,4 @@
 errorInBuildingTheEncryptedKey = Error in building a xenc:EncyptedKey , encrypted for \"{0}\" 
 missingDispatcherConfiguration = Cannot find the token-dispatcher-configuration
 sctIssuerCryptoPropertiesMissing = When the tokenType is not \"BinarySecret\" the cryptoProperties MUST be specified
+missingConfiguration = Missing configuration: \"{0}\"
\ No newline at end of file

Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java Sun Mar 26 09:02:36 2006
@@ -33,7 +33,6 @@
 import org.apache.ws.security.handler.WSHandlerConstants;
 import org.apache.ws.security.handler.WSHandlerResult;
 import org.apache.ws.security.message.WSSecEncryptedKey;
-import org.apache.ws.security.message.WSSecHeader;
 import org.apache.ws.security.message.token.SecurityContextToken;
 import org.w3c.dom.Document;
 import org.w3c.dom.Element;
@@ -49,11 +48,14 @@
     public final static String ENCRYPTED_KEY = "EncryptedKey";
     public final static String COMPUTED_KEY = "ComputedKey";
     public final static String BINARY_SECRET = "BinarySecret";
-
-    public final static String SCT_ISSUER_CONFIG_PARAM = "sct-issuer-config";
+    
+    private String configFile;
+    
+    private OMElement configElement;
     
     /**
-     * Issue a SecuritycontextToken based on the wsse:Signature or wsse:UsernameToken
+     * Issue a SecuritycontextToken based on the wsse:Signature or 
+     * wsse:UsernameToken
      * 
      * This will support returning the SecurityContextToken with the following 
      * types of wst:RequestedProof tokens:
@@ -92,10 +94,21 @@
                 throw new TrustException(TrustException.REQUEST_FAILED);
             }
             
-            Parameter param = inMsgCtx.getParameter(SCT_ISSUER_CONFIG_PARAM);
-            SCTIssuerConfig config = new SCTIssuerConfig(param
-                    .getParameterElement().getFirstChildWithName(
-                            new QName(SCT_ISSUER_CONFIG_PARAM)));
+            SCTIssuerConfig config = null;
+            if(this.configElement != null) {
+                config = SCTIssuerConfig
+                        .load(configElement.getFirstChildWithName(SCTIssuerConfig.SCT_ISSUER_CONFIG));
+            } else {
+                //Look for the file
+                if(this.configFile != null) {
+                    config = SCTIssuerConfig.load(this.configFile);
+                } else {
+                    throw new TrustException(
+                            "missingConfiguration",
+                            new String[] { SCTIssuerConfig.SCT_ISSUER_CONFIG.getLocalPart()});
+                }
+            }
+            
             if(ENCRYPTED_KEY.equals(config.proofTokenType)) {
                 SOAPEnvelope responseEnv = this.doEncryptedKey(config,
                         inMsgCtx, cert);
@@ -181,37 +194,19 @@
     public String getResponseAction(OMElement request, MessageContext inMsgCtx) throws TrustException {
         return Constants.RSTR_ACTON_SCT;
     }
-    
-    
-    
-    
+
     /**
-     * SCTIssuer Configuration processor
-     *
+     * @see org.apache.axis2.security.trust.TokenIssuer#setConfigurationFile(java.lang.String)
      */
-    protected class SCTIssuerConfig {
-
-        protected String proofTokenType = SCTIssuer.ENCRYPTED_KEY;
-
-        protected String cryptoPropertiesFile = null;
-
-        public SCTIssuerConfig(OMElement elem) throws TrustException {
-            OMElement proofTokenElem = (OMElement) elem.getFirstChildWithName(
-                    new QName("proofToken"));
-            if (proofTokenElem != null) {
-                this.proofTokenType = proofTokenElem.getText();
-            }
-
-            OMElement cryptoPropertiesElem = (OMElement) elem
-                    .getFirstChildWithName(new QName("cryptoProperties"));
-
-            if (!SCTIssuer.BINARY_SECRET.equals(proofTokenType)
-                    && cryptoPropertiesElem == null) {
-                throw new TrustException("sctIssuerCryptoPropertiesMissing");
-            }
+    public void setConfigurationFile(String configFile) {
+        this.configFile = configFile;
+    }
 
-            this.cryptoPropertiesFile = cryptoPropertiesElem.getText();
-        }
+    /**
+     * @see org.apache.axis2.security.trust.TokenIssuer#setConfigurationElement(java.lang.String)
+     */
+    public void setConfigurationElement(OMElement configElement) {
+        this.configElement = configElement;
     }
     
 }

Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java?rev=388923&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java Sun Mar 26 09:02:36 2006
@@ -0,0 +1,74 @@
+/*
+ * 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.axis2.security.trust.impl;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axis2.security.trust.TrustException;
+
+import javax.xml.namespace.QName;
+
+import java.io.FileInputStream;
+
+/**
+ * SCTIssuer Configuration processor
+ */
+public class SCTIssuerConfig {
+
+    public final static QName SCT_ISSUER_CONFIG = new QName("sct-issuer-config");
+    
+    protected String proofTokenType = SCTIssuer.ENCRYPTED_KEY;
+
+    protected String cryptoPropertiesFile = null;
+
+    public static SCTIssuerConfig load(OMElement elem) throws TrustException {
+        return new SCTIssuerConfig(elem);
+    }
+    
+    public static SCTIssuerConfig load(String configFilePath)
+            throws TrustException {
+        FileInputStream fis = null;
+        StAXOMBuilder builder = null;
+        try {
+            fis = new FileInputStream(configFilePath);
+             builder = new StAXOMBuilder(fis);
+        } catch (Exception e) {
+            throw new TrustException("errorLoadingConfigFile",
+                    new String[] { configFilePath });
+        }
+        
+        return load(builder.getDocumentElement());
+    }
+
+    public SCTIssuerConfig(OMElement elem) throws TrustException {
+        OMElement proofTokenElem = (OMElement) elem.getFirstChildWithName(
+                new QName("proofToken"));
+        if (proofTokenElem != null) {
+            this.proofTokenType = proofTokenElem.getText();
+        }
+
+        OMElement cryptoPropertiesElem = (OMElement) elem
+                .getFirstChildWithName(new QName("cryptoProperties"));
+
+        if (!SCTIssuer.BINARY_SECRET.equals(proofTokenType)
+                && cryptoPropertiesElem == null) {
+            throw new TrustException("sctIssuerCryptoPropertiesMissing");
+        }
+
+        this.cryptoPropertiesFile = cryptoPropertiesElem.getText();
+    }
+}
\ No newline at end of file

Added: webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sct-issuer-config.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sct-issuer-config.xml?rev=388923&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sct-issuer-config.xml (added)
+++ webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sct-issuer-config.xml Sun Mar 26 09:02:36 2006
@@ -0,0 +1,4 @@
+<sct-issuer-config>
+	<proofToken>EncryptedKey</proofToken>
+	<cryptoProperties>sctIssuer.properties</cryptoProperties>
+</sct-issuer-config>

Modified: webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sts-services.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sts-services.xml?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sts-services.xml (original)
+++ webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/sts-services.xml Sun Mar 26 09:02:36 2006
@@ -10,27 +10,20 @@
 		<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</actionMapping>
 	</operation>
 	
-	<parameter name="token-dispatcher-configuration">
-		<token-dispatcher-configuration>
-			<issuer class="org.apache.axis2.security.trust.impl.SCTIssuer" default="true">
-				<tokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</tokenType>
-			</issuer>
-		</token-dispatcher-configuration>
-	</parameter>
-	
-	<!-- Configuration of org.apache.axis2.security.trust.impl.SCTIssuer -->
-	<parameter name="sct-issuer-config">
-		<sct-issuer-config>
-			<proofToken>EncryptedKey</proofToken>
-			<cryptoProperties>sctIssuer.properties</cryptoProperties>
-		</sct-issuer-config>
-	</parameter>
+	<!-- Using the config file -->
+	<parameter name="token-dispatcher-configuration-file">token-dispatcher-configuration.xml</parameter>
 	
 	<parameter name="InflowSecurity">
-        	<action>
-            		<items>Timestamp Signature</items>
-            		<!--<passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass> -->
-            		<signaturePropFile>sctIssuer.properties</signaturePropFile>
-        	</action>
-    	</parameter>
+		<action>
+            <items>Timestamp Signature</items>
+            <signaturePropFile>sctIssuer.properties</signaturePropFile>
+        </action>
+    </parameter>
+	
+	<parameter name="OutflowSecurity">
+      	<action>
+        	<items>Timestamp</items>
+		</action>
+    </parameter>
+	
 </service>

Added: webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/token-dispatcher-configuration.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/token-dispatcher-configuration.xml?rev=388923&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/token-dispatcher-configuration.xml (added)
+++ webservices/axis2/trunk/java/modules/security/test-resources/trust/impl/token-dispatcher-configuration.xml Sun Mar 26 09:02:36 2006
@@ -0,0 +1,6 @@
+<token-dispatcher-configuration>
+			<issuer class="org.apache.axis2.security.trust.impl.SCTIssuer" default="true">
+				<configuration-file>sct-issuer-config.xml</configuration-file>
+				<tokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</tokenType>
+			</issuer>
+</token-dispatcher-configuration>

Modified: webservices/axis2/trunk/java/modules/security/test/org/apache/axis2/security/trust/TempIssuer.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/test/org/apache/axis2/security/trust/TempIssuer.java?rev=388923&r1=388922&r2=388923&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/test/org/apache/axis2/security/trust/TempIssuer.java (original)
+++ webservices/axis2/trunk/java/modules/security/test/org/apache/axis2/security/trust/TempIssuer.java Sun Mar 26 09:02:36 2006
@@ -35,4 +35,16 @@
         throw new UnsupportedOperationException("TODO");
     }
 
+    /* (non-Javadoc)
+     * @see org.apache.axis2.security.trust.TokenIssuer#setConfigurationFile(java.lang.String)
+     */
+    public void setConfigurationFile(String configFile) {
+    }
+
+    /* (non-Javadoc)
+     * @see org.apache.axis2.security.trust.TokenIssuer#setConfigurationElement(org.apache.axiom.om.OMElement)
+     */
+    public void setConfigurationElement(OMElement configElement) {
+    }
+
 }