You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2006/03/28 18:04:53 UTC
svn commit: r389529 - in /webservices/axis2/trunk/java/modules/security: ./
src/META-INF/ src/org/apache/axis2/security/rahas/
src/org/apache/axis2/security/trust/
src/org/apache/axis2/security/trust/impl/
test/org/apache/axis2/security/trust/
Author: ruchithf
Date: Tue Mar 28 08:04:51 2006
New Revision: 389529
URL: http://svn.apache.org/viewcvs?rev=389529&view=rev
Log:
- Adding the initial classes of the WS-SecureConversation ("RAHAS" - meaning "secrets" in Sinhala)
- Allowing a configuration Parameter to be set in the dispatcher configuration for each component
Added:
webservices/axis2/trunk/java/modules/security/src/META-INF/rahas-module.xml
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/
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/RahasException.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasHandlerConstants.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Receiver.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/errors.properties
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/Token.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/errors.properties
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuer.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java
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=389529&r1=389528&r2=389529&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/maven.xml (original)
+++ webservices/axis2/trunk/java/modules/security/maven.xml Tue Mar 28 08:04:51 2006
@@ -21,13 +21,10 @@
<mkdir dir="target/temp-mar/META-INF"/>
<mkdir dir="target/temp-mar/lib"/>
- <copy file="src/META-INF/module.xml"
- tofile="target/temp-mar/META-INF/module.xml"/>
- <copy file="./test-resources/axis2.xml"
- tofile="target/axis2.xml"/>
<mkdir dir="target/modules"/>
<!-- Copy the required content for the mar into the temp dir-->
+
<copy todir="target/temp-mar">
<fileset dir="target/classes">
<include name="**/org/apache/axis2/*/**/*.class"/>
@@ -44,16 +41,40 @@
<copy file="${maven.repo.local}/xerces/jars/xercesImpl-${xerces.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/commons-codec/jars/commons-codec-${commons.codec.version}.jar" todir="target/temp-mar/lib"/>
+
+ <copy file="src/META-INF/rahas-module.xml"
+ tofile="target/temp-mar/META-INF/module.xml" overwrite="true"/>
+
+ <jar jarfile="target/rahas-${security_version}.mar" basedir="target/temp-mar/">
+ <include name="**/*"/>
+ </jar>
+
+ <copy file="target/rahas-${security_version}.mar" tofile="target/modules/rahas-${security_version}.mar"/>
+ <copy file="target/rahas-${security_version}.mar" tofile="${maven.repo.local}/axis2/mars/rahas-${security_version}.mar"/>
+
+ <!-- Replace the maven.xml remove unwanted classes and create the security module -->
+
+ <copy file="src/META-INF/module.xml"
+ tofile="target/temp-mar/META-INF/module.xml" overwrite="true"/>
+
+ <delete includeEmptyDirs="true">
+ <fileset dir="target/temp-mar/org/apache/axis2/security/rahas"/>
+ <fileset dir="target/temp-mar/org/apache/axis2/security/trust"/>
+ </delete>
+
<jar jarfile="target/security-${security_version}.mar" basedir="target/temp-mar/">
<include name="**/*"/>
</jar>
+
<copy file="target/security-${security_version}.mar" tofile="target/modules/security-${security_version}.mar"/>
<copy file="target/security-${security_version}.mar" tofile="${maven.repo.local}/axis2/mars/security-${security_version}.mar"/>
+
<delete includeEmptyDirs="true">
<fileset dir="target/temp-mar"/>
</delete>
-
- <!-- Create the sts.aar -->
+
+ <!-- Create the sts.aar : STATRT -->
+
<mkdir dir="target/sts"/>
<mkdir dir="target/METS-INF"/>
<mkdir dir="target/sts/lib"/>
@@ -79,10 +100,11 @@
<jar jarfile="target/SecurityTokenService.aar" basedir="target/sts/">
<include name="**/*"/>
</jar>
-
- <delete includeEmptyDirs="true">
+
+ <delete includeEmptyDirs="true">
<fileset dir="target/sts"/>
</delete>
+ <!-- Create the sts.aar : END -->
</postGoal>
Added: webservices/axis2/trunk/java/modules/security/src/META-INF/rahas-module.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/META-INF/rahas-module.xml?rev=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/META-INF/rahas-module.xml (added)
+++ webservices/axis2/trunk/java/modules/security/src/META-INF/rahas-module.xml Tue Mar 28 08:04:51 2006
@@ -0,0 +1,35 @@
+<module name="rahas" class="org.apache.axis2.security.SecurityModule">
+ <Description>RAHAS - Implementation of WS-SecureConversation specification</Description>
+ <inflow>
+ <handler name="inflowHandler" class="org.apache.axis2.security.rahas.Receiver">
+ <order phase="Dispatch" after="SOAPActionBasedDispatcher"/>
+ </handler>
+ </inflow>
+
+ <outflow>
+ <handler name="outflowHandler" class="org.apache.axis2.security.rahas.Sender">
+ <order phase="MessageOut"/>
+ </handler>
+ </outflow>
+
+ <operation name="RequestSecurityToken" mep="http://www.w3.org/2004/08/wsdl/in-out">
+ <messageReceiver class="org.apache.axis2.security.trust.STSMessageReceiver"/>
+
+ <!-- Action mapping to accept SCT requests -->
+ <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</actionMapping>
+
+ <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</actionMapping>
+ <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Renew</actionMapping>
+ <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Cancel</actionMapping>
+ <actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate</actionMapping>
+
+ <parameter name="token-dispatcher-configuration">
+ <issuer class="org.apache.axis2.security.trust.impl.SCTIssuer" default="true">
+ <configuration-param>sct-issuer-config</configuration-param>
+ <tokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</tokenType>
+ </issuer>
+ </parameter>
+
+ </operation>
+
+</module>
Added: 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=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasConfiguration.java Tue Mar 28 08:04:51 2006
@@ -0,0 +1,415 @@
+/*
+ * 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.rahas;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.security.trust.TokenStorage;
+import org.apache.wsdl.WSDLConstants;
+
+import javax.xml.namespace.QName;
+
+import java.util.Hashtable;
+import java.util.Properties;
+
+/**
+ * Configuration manager for Rahas
+ */
+public class RahasConfiguration {
+
+ public final static String RAHAS_CONFIG = "rahas-configuration";
+
+ public final static String SCOPE_SERVICE = "service";
+
+ public final static String SCOPE_OPERATION = "operation";
+
+ public final static QName SCOPE = new QName("scope");
+
+ public final static QName STS_EPR_ADDRESS = new QName("stsEprAddress");
+
+ public final static QName DERIVED_KEY_LENGTH = new QName("derivedKeyLength");
+
+ public final static QName KEY_DERIVATION_ALGORITHM_CLASS =
+ new QName("keyDerivationAlgorithmClass");
+
+ public final static QName TOKEN_STORE_CLASS = new QName("tokenStoreClass");
+
+ public final static QName CRYPTO_PROPERTIES_FILE = new QName(
+ "cryptoProperties");
+
+ private String scope = SCOPE_SERVICE;
+
+ private String stsEPRAddress;
+
+ private String derivedKeyLength;
+
+ private String keyDerivationAlgorithmClass;
+
+ private Hashtable contextMap;
+
+ private String tokenStoreClass;
+
+ private TokenStorage tokenStore;
+
+ private MessageContext msgCtx;
+
+ private String contextIdentifier;
+
+ /**
+ * This is the properties of a particular <code>Crypto</code> impl
+ *
+ * @see org.apache.ws.security.components.crypto.Crypto
+ */
+ private Properties cryptoProperties;
+
+ /**
+ * This is the <code>Crypto</code> impl class name.
+ *
+ * This will ONLY be set via the message context as a property using
+ * <code>org.apache.axis2.security.rahas.RahasHandlerConstants#CRYPTO_PROPERTIES_KEY<code>.
+ *
+ * @see org.apache.ws.security.components.crypto.Crypto
+ * @see org.apache.ws.security.components.crypto.Merlin
+ */
+ private String cryptoClassName;
+
+ /**
+ * This is the crypto properties file to be used
+ * In this case the <code>Crypto</code> impl and its properties
+ * MUST be listed in this
+ * @see org.apache.ws.security.components.crypto.CryptoFactory#getInstance(String)
+ */
+ private String cryptoPropertiesFile;
+
+ private boolean sender;
+
+ public static RahasConfiguration load(MessageContext msgCtx, boolean sender)
+ throws RahasException, AxisFault {
+ Parameter param = msgCtx.getParameter(RAHAS_CONFIG);
+ if(param != null) {
+ OMElement elem = param.getParameterElement();
+ if(elem != null && elem.getLocalName().equals(RAHAS_CONFIG)) {
+
+ RahasConfiguration config = new RahasConfiguration();
+
+ config.scope = getStringValue(elem.getFirstChildWithName(SCOPE));
+
+ config.stsEPRAddress = getStringValue(elem
+ .getFirstChildWithName(STS_EPR_ADDRESS));
+
+ config.keyDerivationAlgorithmClass = getStringValue(elem
+ .getFirstChildWithName(KEY_DERIVATION_ALGORITHM_CLASS));
+
+ config.tokenStoreClass = getStringValue(elem
+ .getFirstChildWithName(TOKEN_STORE_CLASS));
+
+ config.cryptoPropertiesFile = getStringValue(elem
+ .getFirstChildWithName(CRYPTO_PROPERTIES_FILE));
+
+ //Get the action<->ctx-identifier map
+ config.contextMap = (Hashtable) msgCtx
+ .getProperty(RahasHandlerConstants.CONTEXT_MAP_KEY);
+
+ //Token store
+ config.tokenStore = (TokenStorage) msgCtx
+ .getProperty(RahasHandlerConstants.TOKEN_STORE_KEY);
+
+ // Context identifier
+ if(sender) {
+ if(!msgCtx.isServerSide()) {
+ //Client side sender
+ if (config.scope.equals(RahasConfiguration.SCOPE_OPERATION)) {
+ // Operation scope
+ String action = msgCtx.getSoapAction();
+ config.contextIdentifier = (String) config.getContextMap()
+ .get(action);
+ } else {
+ // Service scope
+ String serviceAddress = msgCtx.getTo().getAddress();
+ config.contextIdentifier = (String) config.getContextMap()
+ .get(serviceAddress);
+ }
+ } else {
+ //Server side sender
+ OperationContext opCtx = msgCtx.getOperationContext();
+ MessageContext inMsgCtx;
+ RahasConfiguration inConfig = null;
+ if(opCtx != null && (inMsgCtx = opCtx.getMessageContext(WSDLConstants.MESSAGE_LABEL_IN_VALUE)) != null) {
+ inConfig = (RahasConfiguration)inMsgCtx.getProperty(RahasHandlerConstants.RAHAS_CONFIG_KEY);
+ }
+ if(inConfig != null && inConfig.contextIdentifier != null) {
+ config.contextIdentifier = inConfig.contextIdentifier;
+ } else {
+ throw new RahasException("canotFindContextIdentifier");
+ }
+ }
+ }
+
+ //Crypto properties
+ config.cryptoProperties = (Properties)msgCtx
+ .getProperty(RahasHandlerConstants.CRYPTO_PROPERTIES_KEY);
+
+ config.cryptoClassName = (String) msgCtx
+ .getProperty(RahasHandlerConstants.CRYPTO_CLASS_KEY);
+
+ config.sender = sender;
+ return config;
+ } else {
+ throw new RahasException("missingConfiguration",
+ new String[] { RAHAS_CONFIG });
+ }
+ } else {
+ throw new RahasException("expectedParameterMissing",
+ new String[] { RAHAS_CONFIG });
+ }
+
+ }
+
+ /**
+ * @param scopeElem
+ * @throws RahasException
+ */
+ private static String getStringValue(OMElement scopeElem) throws RahasException {
+ if(scopeElem != null) {
+ String tempScope = scopeElem.getText();
+ if(tempScope != null &&
+ (SCOPE_SERVICE.equals(tempScope) ||
+ SCOPE_OPERATION.equals(tempScope))) {
+ return tempScope;
+ } else {
+ throw new RahasException("missingScopeValue");
+ }
+ }
+ return null;
+ }
+
+ public OMElement getOMElement() {
+ OMFactory factory = OMAbstractFactory.getOMFactory();
+ OMElement elem = factory.createOMElement(RAHAS_CONFIG, null);
+ if (this.scope != null) {
+ factory.createOMElement(SCOPE, elem).setText(this.scope);
+ }
+ if (this.stsEPRAddress != null) {
+ factory.createOMElement(STS_EPR_ADDRESS, elem).setText(
+ this.stsEPRAddress);
+ }
+ if (this.derivedKeyLength != null) {
+ factory.createOMElement(DERIVED_KEY_LENGTH, elem).setText(
+ this.derivedKeyLength);
+ }
+ if (this.keyDerivationAlgorithmClass != null) {
+ factory.createOMElement(KEY_DERIVATION_ALGORITHM_CLASS, elem)
+ .setText(this.keyDerivationAlgorithmClass);
+ }
+ return elem;
+ }
+
+
+ protected void resgisterContext(String identifier) throws RahasException {
+ if(this.scope.equals(SCOPE_OPERATION)) {
+ String action = msgCtx.getSoapAction();
+ if(action != null) {
+ this.contextMap.put(action, identifier);
+ } else {
+ throw new RahasException("missingWSAAction");
+ }
+ } else {
+ String to = msgCtx.getTo().getAddress();
+ if(to != null) {
+ this.contextMap.put(to, identifier);
+ } else {
+ throw new RahasException("missingWSATo");
+ }
+ }
+ //TODO
+ //this.contextMap
+ }
+
+ /**
+ * @return Returns the scope.
+ */
+ public String getScope() {
+ return scope;
+ }
+
+ /**
+ * @return Returns the stsEPR.
+ */
+ public String getStsEPRAddress() {
+ return stsEPRAddress;
+ }
+
+ /**
+ * @return Returns the derivedKeyLength.
+ */
+ public String getDerivedKeyLength() {
+ return derivedKeyLength;
+ }
+
+ /**
+ * @return Returns the keyDerivationAlgorithmClass.
+ */
+ public String getKeyDerivationAlgorithmClass() {
+ return keyDerivationAlgorithmClass;
+ }
+
+ /**
+ * @param derivedKeyLength The derivedKeyLength to set.
+ */
+ public void setDerivedKeyLength(String derivedKeyLength) {
+ this.derivedKeyLength = derivedKeyLength;
+ }
+
+ /**
+ * @param keyDerivationAlgorithmClass The keyDerivationAlgorithmClass to set.
+ */
+ public void setKeyDerivationAlgorithmClass(String keyDerivationAlgorithmClass) {
+ this.keyDerivationAlgorithmClass = keyDerivationAlgorithmClass;
+ }
+
+ /**
+ * @param scope The scope to set.
+ */
+ public void setScope(String scope) {
+ this.scope = scope;
+ }
+
+ /**
+ * @param stsEPRAddress The stsEPRAddress to set.
+ */
+ public void setStsEPRAddress(String stsEPRAddress) {
+ this.stsEPRAddress = stsEPRAddress;
+ }
+
+ /**
+ * @return Returns the contextMap.
+ */
+ protected Hashtable getContextMap() {
+ if(contextMap == null) {
+ contextMap = new Hashtable();
+
+ //Context map should be global
+ this.msgCtx.getConfigurationContext().setProperty(
+ RahasHandlerConstants.CONTEXT_MAP_KEY, contextMap);
+ }
+
+ return contextMap;
+ }
+
+ /**
+ * @return Returns the tokenStore.
+ */
+ protected TokenStorage getTokenStore() throws Exception {
+ if(this.tokenStore == null && this.tokenStoreClass != null) {
+ this.tokenStore = (TokenStorage) Class
+ .forName(this.tokenStoreClass).newInstance();
+ this.msgCtx.getConfigurationContext().setProperty(
+ RahasHandlerConstants.TOKEN_STORE_KEY, this.tokenStore);
+ }
+ return tokenStore;
+ }
+
+ /**
+ * @return Returns the tokenStoreClass.
+ */
+ public String getTokenStoreClass() {
+ return tokenStoreClass;
+ }
+
+ /**
+ * @return Returns the contextIdentifier.
+ */
+ protected String getContextIdentifier() {
+ return contextIdentifier;
+ }
+
+ /**
+ * @param contextIdentifier The contextIdentifier to set.
+ */
+ protected void setContextIdentifier(String contextIdentifier) {
+ this.contextIdentifier = contextIdentifier;
+ }
+
+ /**
+ * @return Returns the cryptoProperties.
+ */
+ public Properties getCryptoProperties() {
+ return cryptoProperties;
+ }
+
+ /**
+ * @param cryptoProperties The cryptoProperties to set.
+ */
+ public void setCryptoProperties(Properties cryptoProperties) {
+ this.cryptoProperties = cryptoProperties;
+ }
+
+ /**
+ * @return Returns the msgCtx.
+ */
+ protected MessageContext getMsgCtx() {
+ return msgCtx;
+ }
+
+ /**
+ * @param tokenStoreClass The tokenStoreClass to set.
+ */
+ public void setTokenStoreClass(String tokenStoreClass) {
+ this.tokenStoreClass = tokenStoreClass;
+ }
+
+ /**
+ * @return Returns the cryptoPropertiesFile.
+ */
+ public String getCryptoPropertiesFile() {
+ return cryptoPropertiesFile;
+ }
+
+ /**
+ * @param cryptoPropertiesFile The cryptoPropertiesFile to set.
+ */
+ public void setCryptoPropertiesFile(String cryptoPropertiesFile) {
+ this.cryptoPropertiesFile = cryptoPropertiesFile;
+ }
+
+ /**
+ * @return Returns the cryptoClassName.
+ */
+ public String getCryptoClassName() {
+ return cryptoClassName;
+ }
+
+ /**
+ * @param cryptoClassName The cryptoClassName to set.
+ */
+ public void setCryptoClassName(String cryptoClassName) {
+ this.cryptoClassName = cryptoClassName;
+ }
+
+ /**
+ * @return Returns the sender.
+ */
+ protected boolean isSender() {
+ return sender;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasException.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasException.java?rev=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasException.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasException.java Tue Mar 28 08:04:51 2006
@@ -0,0 +1,101 @@
+/*
+ * 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.rahas;
+
+import java.text.MessageFormat;
+import java.util.MissingResourceException;
+import java.util.ResourceBundle;
+
+public class RahasException extends Exception {
+
+ private static final long serialVersionUID = 8674795537585339704L;
+
+ private static ResourceBundle resources;
+
+ private String faultCode;
+ private String faultString;
+
+ static {
+ try {
+ resources = ResourceBundle.getBundle("org.apache.axis2.security.rahas.errors");
+ } catch (MissingResourceException e) {
+ throw new RuntimeException(e.getMessage());
+ }
+ }
+
+ public RahasException(String faultCode, Object[] args) {
+ super(getMessage(faultCode, args));
+ this.faultCode = getFaultCode(faultCode);
+ this.faultString = getMessage(faultCode, args);
+ }
+
+ /**
+ * Construct the fault properly code for the standard faults
+ * @param faultCode2
+ * @return
+ */
+ private String getFaultCode(String code) {
+ //TODO check for spec specific error codes
+ return code;
+ }
+
+ public RahasException(String faultCode) {
+ this(faultCode, (Object[])null);
+ }
+
+ public RahasException(String faultCode, Object[] args, Throwable e) {
+ super(getMessage(faultCode, args),e);
+ this.faultCode = faultCode;
+ this.faultString = getMessage(faultCode, args);
+ }
+
+ public RahasException(String faultCode, Throwable e) {
+ this(faultCode, null, e);
+ }
+
+ /**
+ * get the message from resource bundle.
+ * <p/>
+ *
+ * @return the message translated from the property (message) file.
+ */
+ protected static String getMessage(String faultCode, Object[] args) {
+ String msg = null;
+ try {
+ msg = MessageFormat.format(resources.getString(faultCode), args);
+ } catch (MissingResourceException e) {
+ throw new RuntimeException("Undefined '" + faultCode + "' resource property");
+ }
+ return msg;
+ }
+
+ /**
+ * @return Returns the faultCode.
+ */
+ protected String getFaultCode() {
+ return faultCode;
+ }
+
+ /**
+ * @return Returns the faultString.
+ */
+ protected String getFaultString() {
+ return faultString;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasHandlerConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasHandlerConstants.java?rev=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasHandlerConstants.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/RahasHandlerConstants.java Tue Mar 28 08:04:51 2006
@@ -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.axis2.security.rahas;
+
+/**
+ * Constants of the Rahas handlers
+ */
+public interface RahasHandlerConstants {
+
+ /**
+ * Key to hold the <code>TokenStore</code> to store the
+ * <code>SecurityContextToken</code>s
+ *
+ * @see org.apache.axis2.security.trust.TokenStorage
+ */
+ public final static String TOKEN_STORE_KEY = "tokenStore";
+
+ /**
+ * Key to hod the map of security context identifiers against the
+ * service epr addresses (service scope) or wsa:Action values (operation
+ * scope).
+ */
+ public final static String CONTEXT_MAP_KEY = "contextMap";
+
+ /**
+ * The <code>java.util.Properties</code> object holding the properties
+ * of a <code>org.apache.ws.security.components.crypto.Crypto</code> impl.
+ *
+ * This should ONLY be used when the CRYPTO_CLASS_KEY is specified.
+ *
+ * @see org.apache.ws.security.components.crypto.Crypto
+ */
+ public final static String CRYPTO_PROPERTIES_KEY = "cryptoPropertiesRef";
+
+ /**
+ * The class that implements
+ * <code>org.apache.ws.security.components.crypto.Crypto</code>.
+ */
+ public final static String CRYPTO_CLASS_KEY = "cryptoClass";
+
+ /**
+ * Rahas Configuration of a certain message will be held in the message
+ * context using this key
+ * @see RahasConfiguration
+ */
+ public final static String RAHAS_CONFIG_KEY = "rahasConfiguration";
+
+}
Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Receiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Receiver.java?rev=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Receiver.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Receiver.java Tue Mar 28 08:04:51 2006
@@ -0,0 +1,60 @@
+/*
+ * 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.rahas;
+
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.Handler;
+
+import javax.xml.namespace.QName;
+
+/**
+ *
+ * @author Ruchith Fernando (ruchith.fernando@gmail.com)
+ */
+public class Receiver implements Handler {
+
+ private static final long serialVersionUID = 8450183308062119444L;
+
+ private HandlerDescription handlerDescription;
+
+ public void invoke(MessageContext msgContext) throws AxisFault {
+ // TODO TODO
+ throw new UnsupportedOperationException("TODO");
+ }
+
+ public void cleanup() throws AxisFault {
+ }
+
+ public void init(HandlerDescription handlerdesc) {
+ this.handlerDescription = handlerdesc;
+ }
+
+ public HandlerDescription getHandlerDesc() {
+ return this.handlerDescription;
+ }
+
+ public QName getName() {
+ return new QName("SecureConversation-Outflow handler");
+ }
+
+ public Parameter getParameter(String name) {
+ return this.handlerDescription.getParameter(name);
+ }
+}
Added: 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=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/Sender.java Tue Mar 28 08:04:51 2006
@@ -0,0 +1,154 @@
+/*
+ * 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.rahas;
+
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.impl.dom.jaxp.DocumentBuilderFactoryImpl;
+import org.apache.axis2.AxisFault;
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.HandlerDescription;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.engine.Handler;
+import org.apache.axis2.security.trust.Token;
+import org.apache.axis2.security.util.Axis2Util;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.components.crypto.Crypto;
+import org.apache.ws.security.components.crypto.CryptoFactory;
+import org.apache.ws.security.message.WSSecDKEncrypt;
+import org.apache.ws.security.message.WSSecHeader;
+import org.apache.ws.security.message.WSSecSecurityContextToken;
+import org.w3c.dom.Document;
+
+import javax.xml.namespace.QName;
+
+import java.security.SecureRandom;
+
+/**
+ * Rahas outflow handler
+ */
+public class Sender implements Handler {
+
+ private static final long serialVersionUID = 2041716475269157753L;
+
+ private HandlerDescription handlerDescription;
+
+ public void invoke(MessageContext msgContext) throws AxisFault {
+
+ try {
+ //Parse the configuration
+ RahasConfiguration config = RahasConfiguration.load(msgContext, true);
+
+
+ if(config.getContextIdentifier() != null) {
+
+ } else {
+ this.constructMessage(config);
+ }
+
+
+ String sts = config.getStsEPRAddress();
+
+ if(sts != null) { //Use a security token service
+
+ }
+
+
+
+ } catch (Exception e) {
+ if(e instanceof RahasException) {
+ RahasException re = (RahasException)e;
+ throw new AxisFault(re.getFaultString(), re.getFaultCode());
+ } else {
+ throw new AxisFault(e.getMessage());
+ }
+ } finally {
+ DocumentBuilderFactoryImpl.setDOOMRequired(false);
+ }
+
+ }
+
+ private void constructMessage(RahasConfiguration config) throws Exception {
+
+ DocumentBuilderFactoryImpl.setDOOMRequired(true);
+
+ Crypto crypto = null;
+ if (config.getCryptoClassName() != null) {
+ //we can let the crypto properties be null since there can be a
+ //crypto impl that doesn't use any expernal properties
+ crypto = CryptoFactory.getInstance(config.getCryptoClassName(),
+ config.getCryptoProperties());
+ } else if (config.getCryptoPropertiesFile() != null) {
+ crypto = CryptoFactory
+ .getInstance(config.getCryptoPropertiesFile());
+ }
+
+ //convert the envelope to DOOM
+ Document doc = Axis2Util.getDocumentFromSOAPEnvelope(config.getMsgCtx()
+ .getEnvelope(), false);
+
+ WSSecHeader secHeader = new WSSecHeader();
+ secHeader.insertSecurityHeader(doc);
+
+ WSSecSecurityContextToken sctBuilder = new WSSecSecurityContextToken();
+ sctBuilder.prepare(doc, crypto);
+
+ SecureRandom random = SecureRandom.getInstance("SHA1PRNG");
+ byte[] tempSecret = new byte[16];
+ random.nextBytes(tempSecret);
+
+ String tokenId = sctBuilder.getSctId();
+
+ // Derived key encryption
+ WSSecDKEncrypt encrBuilder = new WSSecDKEncrypt();
+ encrBuilder.setSymmetricEncAlgorithm(WSConstants.AES_128);
+ encrBuilder.setExternalKey(tempSecret, tokenId);
+ encrBuilder.build(doc, crypto, secHeader);
+
+ sctBuilder.prependSCTElementToHeader(doc, secHeader);
+
+ Token tok = new Token(sctBuilder.getIdentifier(), (OMElement) sctBuilder
+ .getSct().getElement());
+
+ tok.setSecret(tempSecret);
+
+ config.getTokenStore().add(tok);
+
+
+
+ }
+
+
+ public void cleanup() throws AxisFault {
+ }
+
+ public void init(HandlerDescription handlerdesc) {
+ this.handlerDescription = handlerdesc;
+ }
+
+ public HandlerDescription getHandlerDesc() {
+ return this.handlerDescription;
+ }
+
+ public QName getName() {
+ return new QName("SecureConversation-Outflow handler");
+ }
+
+ public Parameter getParameter(String name) {
+ return this.handlerDescription.getParameter(name);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/errors.properties
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/errors.properties?rev=389529&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/errors.properties (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/rahas/errors.properties Tue Mar 28 08:04:51 2006
@@ -0,0 +1,6 @@
+missingConfiguration = Missing or malformed configuration: \"{0}\"
+expectedParameterMissing = Expected parameter missing : \"{0}\"
+missingScopeValue = Missing or incorrect scope value
+canotFindContextIdentifier=Cannot find context identifier
+missingWSAAction=wsa:Action value missing
+missingWSATo=wsa:To address value missing
\ No newline at end of file
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=389529&r1=389528&r2=389529&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 Tue Mar 28 08:04:51 2006
@@ -60,7 +60,6 @@
throw new TrustException("missingDispatcherConfiguration");
}
} catch (TrustException e) {
- e.printStackTrace();
//Log the exception
log.error(e);
throw new AxisFault(e.getFaultString(), e.getFaultCode());
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/Token.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/Token.java?rev=389529&r1=389528&r2=389529&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/Token.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/Token.java Tue Mar 28 08:04:51 2006
@@ -79,19 +79,6 @@
*/
private byte[] secret;
- /**
- * @return Returns the chnaged.
- */
- protected boolean isChnaged() {
- return chnaged;
- }
-
- /**
- * @param chnaged The chnaged to set.
- */
- protected void setChnaged(boolean chnaged) {
- this.chnaged = chnaged;
- }
/**
* Create a new token
@@ -107,79 +94,93 @@
}
/**
+ * @return Returns the chnaged.
+ */
+ public boolean isChnaged() {
+ return chnaged;
+ }
+
+ /**
+ * @param chnaged The chnaged to set.
+ */
+ public void setChnaged(boolean chnaged) {
+ this.chnaged = chnaged;
+ }
+
+ /**
* @return Returns the properties.
*/
- protected HashMap getProperties() {
+ public HashMap getProperties() {
return properties;
}
/**
* @param properties The properties to set.
*/
- protected void setProperties(HashMap properties) {
+ public void setProperties(HashMap properties) {
this.properties = properties;
}
/**
* @return Returns the state.
*/
- protected int getState() {
+ public int getState() {
return state;
}
/**
* @param state The state to set.
*/
- protected void setState(int state) {
+ public void setState(int state) {
this.state = state;
}
/**
* @return Returns the token.
*/
- protected OMElement getToken() {
+ public OMElement getToken() {
return token;
}
/**
* @param token The token to set.
*/
- protected void setToken(OMElement token) {
+ public void setToken(OMElement token) {
this.token = token;
}
/**
* @return Returns the id.
*/
- protected String getId() {
+ public String getId() {
return id;
}
/**
* @return Returns the presivousToken.
*/
- protected OMElement getPresivousToken() {
+ public OMElement getPresivousToken() {
return presivousToken;
}
/**
* @param presivousToken The presivousToken to set.
*/
- protected void setPresivousToken(OMElement presivousToken) {
+ public void setPresivousToken(OMElement presivousToken) {
this.presivousToken = presivousToken;
}
/**
* @return Returns the secret.
*/
- protected byte[] getSecret() {
+ public byte[] getSecret() {
return secret;
}
/**
* @param secret The secret to set.
*/
- protected void setSecret(byte[] secret) {
+ public void setSecret(byte[] secret) {
this.secret = secret;
}
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=389529&r1=389528&r2=389529&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 Tue Mar 28 08:04:51 2006
@@ -74,4 +74,17 @@
* @param configElement <code>OMElement</code> representing the configuation
*/
public void setConfigurationElement(OMElement configElement);
+
+ /**
+ * Set the name of the configuration parameter.
+ *
+ * If this is used then there must be a
+ * <code>org.apache.axis2.description.Parameter</code> object available in
+ * the via the messageContext when the <code>TokenIssuer</code> is called.
+ *
+ * @see org.apache.axis2.description.Parameter
+ * @param configParamName
+ */
+ public void setConfigurationParamName(String configParamName);
+
}
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=389529&r1=389528&r2=389529&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 Tue Mar 28 08:04:51 2006
@@ -37,6 +37,7 @@
public final static QName DEFAULT_ATTR = new QName("default");
public final static QName CONFIGURATION_FILE = new QName("configuration-file");
+ public final static QName CONFIGURATION_PARAM = new QName("configuration-param");
public final static QName CONFIGURATION_ELEMENT = new QName("configuration");
private Hashtable issuers;
@@ -44,6 +45,8 @@
private Hashtable configFiles = new Hashtable();
private Hashtable configElements = new Hashtable();
+
+ private Hashtable configParamNames = new Hashtable();
private String defaultIssuerClassName;
@@ -85,6 +88,13 @@
if(issuerConfigElement != null) {
conf.configElements.put(issuerClass, issuerConfigElement);
}
+
+ //Process configuration parameter name information
+ OMElement issuerParamNameElem = element.getFirstChildWithName(CONFIGURATION_ELEMENT);
+ String issuerParamName = (issuerParamNameElem != null) ? issuerParamNameElem.getText() : null;
+ if(issuerConfigElement != null) {
+ conf.configParamNames.put(issuerClass, issuerParamName);
+ }
//Process token types
Iterator tokenTypes = element.getChildrenWithName(TOKEN_TYPE);
@@ -177,6 +187,8 @@
issuer.setConfigurationElement((OMElement) this.configElements
.get(issuerClassName));
issuer.setConfigurationFile((String) this.configFiles
+ .get(issuerClassName));
+ issuer.setConfigurationParamName((String) this.configParamNames
.get(issuerClassName));
return issuer;
}
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=389529&r1=389528&r2=389529&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 Tue Mar 28 08:04:51 2006
@@ -22,4 +22,5 @@
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
+missingConfiguration = Missing configuration: \"{0}\"
+expectedParameterMissing=Expected parameter missing : \"{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=389529&r1=389528&r2=389529&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 Tue Mar 28 08:04:51 2006
@@ -21,6 +21,7 @@
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.Parameter;
import org.apache.axis2.security.trust.Constants;
import org.apache.axis2.security.trust.SimpleTokenStore;
import org.apache.axis2.security.trust.Token;
@@ -55,6 +56,8 @@
private OMElement configElement;
+ private String configParamName;
+
/**
* Issue a SecuritycontextToken based on the wsse:Signature or
* wsse:UsernameToken
@@ -99,18 +102,33 @@
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);
+ .load(configElement
+ .getFirstChildWithName(SCTIssuerConfig.SCT_ISSUER_CONFIG));
+ }
+
+ //Look for the file
+ if(config == null && this.configFile != null) {
+ config = SCTIssuerConfig.load(this.configFile);
+ }
+
+ //Look for the file
+ if(config == null && this.configParamName != null) {
+ Parameter param = inMsgCtx
+ .getParameter(SCTIssuerConfig.SCT_ISSUER_CONFIG_PARAM);
+ if(param != null && param.getParameterElement() != null) {
+ config = SCTIssuerConfig.load(param.getParameterElement());
} else {
- throw new TrustException(
- "missingConfiguration",
- new String[] { SCTIssuerConfig.SCT_ISSUER_CONFIG.getLocalPart()});
+ throw new TrustException("expectedParameterMissing",
+ new String[] { this.configParamName });
}
}
+ if(config == null) {
+ throw new TrustException("missingConfiguration",
+ new String[] { SCTIssuerConfig.SCT_ISSUER_CONFIG
+ .getLocalPart() });
+ }
+
if(ENCRYPTED_KEY.equals(config.proofTokenType)) {
SOAPEnvelope responseEnv = this.doEncryptedKey(config,
inMsgCtx, cert);
@@ -152,8 +170,7 @@
}
SecurityContextToken sct = new SecurityContextToken(doc);
- String sctId = "sctId-" + sct.getElement().hashCode();
- sct.setID(sctId);
+ sct.setID("sctId-" + sct.getElement().hashCode());
OMElement rstrElem = env.getOMFactory().createOMElement(
new QName(Constants.WST_NS, "RequestSecurityTokenResponse",
@@ -181,7 +198,7 @@
reqProofTok.addChild((OMElement)encryptedKeyElem);
//Store the tokens
- Token sctToken = new Token(sctId, (OMElement)sct.getElement());
+ Token sctToken = new Token(sct.getIdentifier(), (OMElement)sct.getElement());
this.getTokenStore(msgCtx).add(sctToken);
return env;
@@ -233,6 +250,13 @@
TokenStorage.TOKEN_STORAGE_KEY, storage);
}
return storage;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.axis2.security.trust.TokenIssuer#setConfigurationParamName(java.lang.String)
+ */
+ public void setConfigurationParamName(String configParamName) {
+ this.configParamName = configParamName;
}
}
Modified: 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=389529&r1=389528&r2=389529&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/trust/impl/SCTIssuerConfig.java Tue Mar 28 08:04:51 2006
@@ -31,6 +31,9 @@
public final static QName SCT_ISSUER_CONFIG = new QName("sct-issuer-config");
+ public final static String SCT_ISSUER_CONFIG_PARAM =
+ "sct-issuer-config-param";
+
protected String proofTokenType = SCTIssuer.ENCRYPTED_KEY;
protected String cryptoPropertiesFile = null;
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=389529&r1=389528&r2=389529&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 Tue Mar 28 08:04:51 2006
@@ -47,4 +47,10 @@
public void setConfigurationElement(OMElement configElement) {
}
+ /* (non-Javadoc)
+ * @see org.apache.axis2.security.trust.TokenIssuer#setConfigurationParamName(java.lang.String)
+ */
+ public void setConfigurationParamName(String configParamName) {
+ }
+
}