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 2005/10/20 21:32:52 UTC
svn commit: r326985 - in /webservices/axis2/trunk/java/modules:
core/src/org/apache/axis2/ integration/test-resources/security/
security/src/org/apache/axis2/security/
security/src/org/apache/axis2/security/handler/
security/src/org/apache/axis2/securi...
Author: ruchithf
Date: Thu Oct 20 12:32:00 2005
New Revision: 326985
URL: http://svn.apache.org/viewcvs?rev=326985&view=rev
Log:
- Changed the way we configure the security module. Now the parameter names are similar to those that we use with Axis 1.x/WSS4J
- Removed the mapping of parameter pairs, and will remove the WSHandlerConstantsMapper
- There are only two main axis2 config parameters 'InflowSecurity' and 'OutflowSecurity' and the revelent configurations are included within them. For a sample, please have a look at http://people.apache.org/~ruchithf/new.config.xml
Added:
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java
Modified:
webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.service.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml
webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.service.xml
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSSHandlerConstants.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java
webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/WSHandlerConstantsMapper.java
Modified: webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java (original)
+++ webservices/axis2/trunk/java/modules/core/src/org/apache/axis2/Constants.java Thu Oct 20 12:32:00 2005
@@ -203,7 +203,7 @@
public static final String TESTING_PATH = "target/test-resources/";
-
+
public static final String TESTING_REPOSITORY = TESTING_PATH + "samples";
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -11,27 +11,24 @@
<!-- Test with addressing and MTOM: Client's Configuration:START-->
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Timestamp Signature Encrypt</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionUser>bob</encryptionUser>
+ <signatureParts>{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>
- <parameter name="OutAction" locked="false">Timestamp Signature Encrypt</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#aes128-cbc</parameter>
- <parameter name="OutSignatureParts" locked="false">{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</parameter>
+ <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+ </parameter>
-
- <parameter name="optimizeParts" locked="false">//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</parameter>
-
- <parameter name="InAction" locked="false">Timestamp Signature Encrypt</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
+ <parameter name="InflowSecurity">
+ <action>Timestamp Signature Encrypt</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
<!-- Test with addressing and MTOM: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/complete.service.xml Thu Oct 20 12:32:00 2005
@@ -5,24 +5,23 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="InflowSecurity">
+ <action>Timestamp Signature Encrypt</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
- <parameter name="InAction" locked="false">Timestamp Signature Encrypt</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="OutAction" locked="false">Timestamp Signature Encrypt</parameter>
- <parameter name="user" locked="false">bob</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionUser" locked="false">alice</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#aes128-cbc</parameter>
- <parameter name="OutSignatureParts" locked="false">{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}From;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}RelatesTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</parameter>
-
- <parameter name="optimizeParts" locked="false">//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Timestamp Signature Encrypt</action>
+ <user>bob</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionUser>alice</encryptionUser>
+ <signatureParts>{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts>
+ <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -8,14 +8,12 @@
<module ref="security"/>
<!-- Scenario 1: Client's Configuration:START-->
- <parameter name="InflowSecurity">off</parameter>
- <parameter name="OutflowSecurity">on</parameter>
-
- <parameter name="OutAction" locked="false">UsernameToken</parameter>
- <parameter name="user" locked="false">Chris</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="passwordType" locked="false">PasswordText</parameter>
-
+ <parameter name="OutflowSecurity">
+ <action>UsernameToken</action>
+ <user>Chris</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <passwordType>PasswordText</passwordType>
+ </parameter>
<!-- Scenario 1: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s1.service.xml Thu Oct 20 12:32:00 2005
@@ -5,10 +5,9 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">off</parameter>
-
- <parameter name="InAction" locked="false">UsernameToken</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
+ <parameter name="InflowSecurity">
+ <action>UsernameToken</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,19 +9,18 @@
<!-- Scenario 2: Client's Configuration:START-->
- <parameter name="OutflowSecurity">on</parameter>
- <parameter name="InflowSecurity">off</parameter>
-
- <parameter name="OutAction" locked="false">UsernameToken Encrypt</parameter>
- <parameter name="user" locked="false">Chris</parameter>
- <parameter name="addUTElements" locked="false">Nonce Created</parameter>
- <parameter name="encryptionParts" locked="false">{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
- <parameter name="encryptionPropFile" locked="false">interop.properties</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="passwordType" locked="false">PasswordText</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
+ <parameter name="OutflowSecurity">
+ <action>UsernameToken Encrypt</action>
+ <user>Chris</user>
+ <addUTElements>Nonce Created</addUTElements>
+ <encryptionParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken</encryptionParts>
+ <encryptionUser>bob</encryptionUser>
+ <encryptionPropFile>interop.properties</encryptionPropFile>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <passwordType>PasswordText</passwordType>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ </parameter>
<!-- Scenario 2: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s2.service.xml Thu Oct 20 12:32:00 2005
@@ -3,13 +3,12 @@
<!--Mounting the method Ping-->
<operation name="Ping">
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
- </operation>
+ </operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">off</parameter>
-
- <parameter name="InAction" locked="false">UsernameToken Encrypt</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="decryptionPropFile" locked="false">interop.properties</parameter>
+ <parameter name="InflowSecurity">
+ <action>UsernameToken Encrypt</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <decryptionPropFile>interop.properties</decryptionPropFile>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,17 +9,16 @@
<!-- Scenario 2: Client's Configuration:START-->
- <parameter name="OutflowSecurity">on</parameter>
- <parameter name="InflowSecurity">off</parameter>
-
- <parameter name="OutAction" locked="false">UsernameTokenSignature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">Chris</parameter>
- <parameter name="encryptionParts" locked="false">{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
- <parameter name="encryptionPropFile" locked="false">interop.properties</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
+ <parameter name="OutflowSecurity">
+ <action>UsernameTokenSignature Encrypt Timestamp</action>
+ <user>Chris</user>
+ <encryptionParts>{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd}UsernameToken</encryptionParts>
+ <encryptionUser>bob</encryptionUser>
+ <encryptionPropFile>interop.properties</encryptionPropFile>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ </parameter>
<!-- Scenario 2: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s2a.service.xml Thu Oct 20 12:32:00 2005
@@ -5,11 +5,10 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">off</parameter>
-
- <parameter name="InAction" locked="false">UsernameTokenSignature UsernameToken Encrypt Timestamp</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="decryptionPropFile" locked="false">interop.properties</parameter>
+ <parameter name="InflowSecurity">
+ <action>UsernameTokenSignature UsernameToken Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <decryptionPropFile>interop.properties</decryptionPropFile>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,24 +9,22 @@
<!-- Scenario 3: Client's Configuration:START-->
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <encryptionUser>bob</encryptionUser>
+ </parameter>
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
-
-
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
<!-- Scenario 3: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s3.service.xml Thu Oct 20 12:32:00 2005
@@ -5,20 +5,21 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">bob</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="encryptionUser" locked="false">alice</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>bob</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <encryptionUser>alice</encryptionUser>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,22 +9,23 @@
<!-- Scenario 4: Client's Configuration:START-->
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>EmbeddedKeyName</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <EmbeddedKeyCallbackClass>org.apache.axis2.security.PWCallback</EmbeddedKeyCallbackClass>
+ <EmbeddedKeyName>SessionKey</EmbeddedKeyName>
+ </parameter>
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">EmbeddedKeyName</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="EmbeddedKeyCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="EmbeddedKeyName" locked="false">SessionKey</parameter>
-
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
<!-- Scenario 4: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s4.service.xml Thu Oct 20 12:32:00 2005
@@ -5,21 +5,22 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
-
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">bob</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">EmbeddedKeyName</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="EmbeddedKeyCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="EmbeddedKeyName" locked="false">SessionKey</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>bob</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>EmbeddedKeyName</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <EmbeddedKeyCallbackClass>org.apache.axis2.security.PWCallback</EmbeddedKeyCallbackClass>
+ <EmbeddedKeyName>SessionKey</EmbeddedKeyName>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,24 +9,22 @@
<!-- Scenario 5: Client's Configuration:START-->
- <parameter name="OutflowSecurity">on</parameter>
- <parameter name="InflowSecurity">off</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature NoSerialization</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <signatureParts>{}{http://xmlsoap.org/Ping}ticket</signatureParts>
+ <signaturePropFile>interop.properties</signaturePropFile>
- <parameter name="OutAction" locked="false">Signature NoSerialization</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="signatureParts" locked="false">{}{http://xmlsoap.org/Ping}ticket</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
+ <repetition count="1">
+ <user>alice</user>
+ <action>Signature Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </repetition>
- <!-- Repeat the WSDoAllSender -->
- <parameter name="senderRepeteCount" locked="false">1</parameter>
-
- <!-- Parameters for repetition #1 -->
- <parameter name="user1" locked="false">alice</parameter>
- <parameter name="OutAction1" locked="false">Signature Timestamp</parameter>
- <parameter name="OutPasswordCallbackClass1" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile1" locked="false">interop.properties</parameter>
+ </parameter>
<!-- Scenario 5: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s5.service.xml Thu Oct 20 12:32:00 2005
@@ -5,11 +5,10 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">off</parameter>
-
- <parameter name="InAction" locked="false">Signature Signature Timestamp</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Signature Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,21 +9,22 @@
<!-- Scenario 6: Client's Configuration:START-->
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Encrypt Signature Timestamp</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <encryptionUser>bob</encryptionUser>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
- <parameter name="OutAction" locked="false">Encrypt Signature Timestamp</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="InAction" locked="false">Encrypt Signature Timestamp</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
+ <parameter name="InflowSecurity">
+ <action>Encrypt Signature Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
<!-- Scenario 6: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s6.service.xml Thu Oct 20 12:32:00 2005
@@ -5,20 +5,21 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="InflowSecurity">
+ <action>Encrypt Signature Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
- <parameter name="InAction" locked="false">Encrypt Signature Timestamp</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
-
- <parameter name="OutAction" locked="false">Encrypt Signature Timestamp</parameter>
- <parameter name="user" locked="false">bob</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="encryptionUser" locked="false">alice</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Encrypt Signature Timestamp</action>
+ <user>bob</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <encryptionKeyIdentifier>DirectReference</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <encryptionUser>alice</encryptionUser>
+ <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,24 +9,25 @@
<!-- Scenario 7: Client's Configuration:START-->
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <encryptionUser>bob</encryptionUser>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <encryptionPropFile>interop.properties</encryptionPropFile>
+ <signatureParts>{}{http://schemas.xmlsoap.org/soap/envelope/}Body;STRTransform</signatureParts>
+ </parameter>
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="encryptionPropFile" locked="false">interop.properties</parameter>
- <parameter name="signatureParts" locked="false">{}{http://schemas.xmlsoap.org/soap/envelope/}Body;STRTransform</parameter>
-
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="decryptionPropFile" locked="false">interop.properties</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <decryptionPropFile>interop.properties</decryptionPropFile>
+ </parameter>
<!-- Scenario 7: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/s7.service.xml Thu Oct 20 12:32:00 2005
@@ -5,22 +5,23 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <decryptionPropFile>interop.properties</decryptionPropFile>
+ </parameter>
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="decryptionPropFile" locked="false">interop.properties</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
-
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">bob</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionSymAlgorithm" locked="false">http://www.w3.org/2001/04/xmlenc#tripledes-cbc</parameter>
- <parameter name="encryptionUser" locked="false">alice</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="encryptionPropFile" locked="false">interop.properties</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>bob</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <encryptionKeyIdentifier>DirectReference</encryptionKeyIdentifier>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#tripledes-cbc</encryptionSymAlgorithm>
+ <encryptionUser>alice</encryptionUser>
+ <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <encryptionPropFile>interop.properties</encryptionPropFile>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,13 +9,10 @@
<!-- Scenario ST1: Client's Configuration:START-->
-
- <parameter name="OutflowSecurity">on</parameter>
- <parameter name="InflowSecurity">off</parameter>
-
- <parameter name="OutAction" locked="false">Timestamp SAMLTokenUnsigned</parameter>
- <parameter name="samlPropFile" locked="false">axis2.saml.properties</parameter>
-
+ <parameter name="OutflowSecurity">
+ <action>Timestamp SAMLTokenUnsigned</action>
+ <samlPropFile>axis2.saml.properties</samlPropFile>
+ </parameter>
<!-- Scenario ST1: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/sST1.service.xml Thu Oct 20 12:32:00 2005
@@ -5,10 +5,8 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">off</parameter>
-
- <parameter name="InAction" locked="false">Timestamp SAMLTokenUnsigned</parameter>
-
+ <parameter name="InflowSecurity">
+ <action>Timestamp SAMLTokenUnsigned</action>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.client.axis2.xml Thu Oct 20 12:32:00 2005
@@ -9,25 +9,23 @@
<!-- Scenario 3 with MTOM: Client's Configuration:START-->
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>alice</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionUser>bob</encryptionUser>
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">alice</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionUser" locked="false">bob</parameter>
+ <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+ </parameter>
-
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
-
- <parameter name="optimizeParts" locked="false">//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
<!-- Scenario 3 with MTOM: Client's Configuration:END-->
Modified: webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.service.xml
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.service.xml?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.service.xml (original)
+++ webservices/axis2/trunk/java/modules/integration/test-resources/security/secMtom.service.xml Thu Oct 20 12:32:00 2005
@@ -5,21 +5,23 @@
<messageReceiver class="org.apache.axis2.oasis.ping.PingPortMessageReceiver"/>
</operation>
- <parameter name="InflowSecurity">on</parameter>
- <parameter name="OutflowSecurity">on</parameter>
- <parameter name="InAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="InPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="InSignaturePropFile" locked="false">interop.properties</parameter>
+ <parameter name="InflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ </parameter>
- <parameter name="OutAction" locked="false">Signature Encrypt Timestamp</parameter>
- <parameter name="user" locked="false">bob</parameter>
- <parameter name="OutPasswordCallbackClass" locked="false">org.apache.axis2.security.PWCallback</parameter>
- <parameter name="OutSignaturePropFile" locked="false">interop.properties</parameter>
- <parameter name="OutSignatureKeyIdentifier" locked="false">DirectReference</parameter>
- <parameter name="encryptionKeyIdentifier" locked="false">SKIKeyIdentifier</parameter>
- <parameter name="encryptionUser" locked="false">alice</parameter>
+ <parameter name="OutflowSecurity">
+ <action>Signature Encrypt Timestamp</action>
+ <user>bob</user>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass>
+ <signaturePropFile>interop.properties</signaturePropFile>
+ <signatureKeyIdentifier>DirectReference</signatureKeyIdentifier>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier>
+ <encryptionUser>alice</encryptionUser>
- <parameter name="optimizeParts" locked="false">//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</parameter>
+ <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts>
+ </parameter>
</service>
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllReceiver.java Thu Oct 20 12:32:00 2005
@@ -19,10 +19,12 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.om.OMElement;
import org.apache.axis2.om.OMException;
import org.apache.axis2.security.handler.WSDoAllHandler;
import org.apache.axis2.security.handler.WSSHandlerConstants;
import org.apache.axis2.security.util.Axis2Util;
+import org.apache.axis2.security.util.HandlerParameterDecoder;
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.axis2.soap.SOAPHeader;
import org.apache.axis2.soap.SOAPHeaderBlock;
@@ -59,6 +61,12 @@
public void invoke(MessageContext msgContext) throws AxisFault {
boolean doDebug = log.isDebugEnabled();
+ //populate the properties
+ try {
+ HandlerParameterDecoder.processParameters(msgContext,true);
+ } catch (Exception e) {
+ throw new AxisFault("Configureation error", e);
+ }
/**
* Cannot do the following right now since we cannot access the req
* mc when this handler runs in the client side.
@@ -81,13 +89,13 @@
reqData.setMsgContext(msgContext);
//Figureout if the handler should run
- String inFlowSecurity = null;
- if((inFlowSecurity = (String) getOption(WSSHandlerConstants.INFLOW_SECURITY)) == null) {
- inFlowSecurity = (String) getProperty(msgContext, WSSHandlerConstants.INFLOW_SECURITY);
+ OMElement inFlowSecurity = null;
+ if((inFlowSecurity = (OMElement) getOption(WSSHandlerConstants.INFLOW_SECURITY)) == null) {
+ inFlowSecurity = (OMElement) getProperty(msgContext, WSSHandlerConstants.INFLOW_SECURITY);
}
- //If the option is not specified or if it is set to false do not do
- //any security processing
- if(inFlowSecurity == null || inFlowSecurity.equals(WSSHandlerConstants.OFF_OPTION)) {
+
+
+ if(inFlowSecurity == null) {
return;
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/WSDoAllSender.java Thu Oct 20 12:32:00 2005
@@ -19,9 +19,11 @@
import org.apache.axis2.AxisFault;
import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.OperationContext;
+import org.apache.axis2.om.OMElement;
import org.apache.axis2.security.handler.WSDoAllHandler;
import org.apache.axis2.security.handler.WSSHandlerConstants;
import org.apache.axis2.security.util.Axis2Util;
+import org.apache.axis2.security.util.HandlerParameterDecoder;
import org.apache.axis2.security.util.MessageOptimizer;
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.commons.logging.Log;
@@ -63,6 +65,11 @@
boolean doDebug = log.isDebugEnabled();
+ try {
+ HandlerParameterDecoder.processParameters(msgContext,false);
+ } catch (Exception e) {
+ throw new AxisFault("Configureation error", e);
+ }
if (doDebug) {
log.debug("WSDoAllSender: enter invoke()");
@@ -86,13 +93,12 @@
reqData.setMsgContext(msgContext);
//Figureout if the handler should run
- String outFlowSecurity;
- if((outFlowSecurity = (String) getOption(WSSHandlerConstants.OUTFLOW_SECURITY)) == null) {
- outFlowSecurity = (String) getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY);
+ OMElement outFlowSecurity;
+ if((outFlowSecurity = (OMElement) getOption(WSSHandlerConstants.OUTFLOW_SECURITY)) == null) {
+ outFlowSecurity = (OMElement) getProperty(msgContext, WSSHandlerConstants.OUTFLOW_SECURITY);
}
- //If the option is not specified or if it is set to false do not do
- //any security processing
- if(outFlowSecurity == null || outFlowSecurity.equals(WSSHandlerConstants.OFF_OPTION)) {
+
+ if(outFlowSecurity == null) {
return;
}
@@ -100,8 +106,7 @@
Vector actions = new Vector();
String action = null;
if ((action = (String) getOption(WSHandlerConstants.ACTION)) == null) {
- action = (String) ((MessageContext)reqData.getMsgContext())
- .getProperty(WSHandlerConstants.ACTION);
+ action = (String) getProperty(reqData.getMsgContext(),WSHandlerConstants.ACTION);
}
if (action == null) {
throw new AxisFault("WSDoAllSender: No action defined");
@@ -210,9 +215,9 @@
*/
String optimizeParts;
- if((optimizeParts = (String) getOption(WSSHandlerConstants.Out.OPTIMIZE_PARTS)) == null) {
+ if((optimizeParts = (String) getOption(WSSHandlerConstants.OPTIMIZE_PARTS)) == null) {
optimizeParts = (String)
- getProperty(reqData.getMsgContext(), WSSHandlerConstants.Out.OPTIMIZE_PARTS);
+ getProperty(reqData.getMsgContext(), WSSHandlerConstants.OPTIMIZE_PARTS);
}
if(optimizeParts != null) {
// Optimize the Envelope
@@ -220,39 +225,36 @@
}
//Enable handler repetition
- String repeat;
+ Integer repeat;
int repeatCount;
- if ((repeat = (String) getOption(WSSHandlerConstants.Out.SENDER_REPEAT_COUNT)) == null) {
- repeat = (String)
- getProperty(reqData.getMsgContext(), WSSHandlerConstants.Out.SENDER_REPEAT_COUNT);
+ if ((repeat = (Integer)getOption(WSSHandlerConstants.SENDER_REPEAT_COUNT)) == null) {
+ repeat = (Integer)
+ getProperty(reqData.getMsgContext(), WSSHandlerConstants.SENDER_REPEAT_COUNT);
}
- if(repeat != null) {
- try {
- repeatCount = Integer.parseInt(repeat);
- } catch (NumberFormatException nfex) {
- throw new AxisFault("Repetition count of WSDoAllSender should be an integer");
- }
-
- //Get the current repetition from message context
- int repetition = this.getRepetition(msgContext);
+ repeatCount = repeat.intValue();
+
+ //Get the current repetition from message context
+ int repetition = this.getCurrentRepetition(msgContext);
+
+ if(repeatCount > 0 && repetition < repeatCount) {
- if(repeatCount > 0 && repetition < repeatCount) {
- reqData.clear();
- reqData = null;
-
- //Increment the repetition to indicate the next repetition
- //of the same handler
- repetition++;
- msgContext.setProperty(WSSHandlerConstants.Out.REPETITON,new Integer(repetition));
- msgContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,outFlowSecurity);
- /**
- * Preserving the OM stuff doesn't work for the repeting case
- */
- this.preserveOriginalEnvelope = false;
-
- this.invoke(msgContext);
- }
+ reqData.clear();
+ reqData = null;
+
+ // Increment the repetition to indicate the next repetition
+ // of the same handler
+ repetition++;
+ msgContext.setProperty(WSSHandlerConstants.CURRENT_REPETITON,
+ new Integer(repetition));
+ msgContext.setProperty(WSSHandlerConstants.OUTFLOW_SECURITY,
+ outFlowSecurity);
+ /**
+ * Preserving the OM stuff doesn't work for the repeting case
+ */
+ this.preserveOriginalEnvelope = false;
+
+ this.invoke(msgContext);
}
if (doDebug) {
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSDoAllHandler.java Thu Oct 20 12:32:00 2005
@@ -21,7 +21,7 @@
import org.apache.axis2.description.HandlerDescription;
import org.apache.axis2.description.Parameter;
import org.apache.axis2.engine.Handler;
-import org.apache.axis2.security.util.WSHandlerConstantsMapper;
+import org.apache.axis2.security.util.Axis2Util;
import org.apache.ws.security.handler.RequestData;
import org.apache.ws.security.handler.WSHandler;
@@ -135,9 +135,9 @@
public Object getProperty(Object msgContext, String axisKey) {
- int repetition = getRepetition(msgContext);
+ int repetition = getCurrentRepetition(msgContext);
- String key = WSHandlerConstantsMapper.getMapping(axisKey,inHandler, repetition);
+ String key = Axis2Util.getKey(axisKey,inHandler, repetition);
log.debug("wss4j key: " + axisKey + " Key : " + key);
return ((MessageContext)msgContext).getProperty(key);
}
@@ -147,11 +147,11 @@
* @param msgContext
* @return
*/
- protected int getRepetition(Object msgContext) {
+ protected int getCurrentRepetition(Object msgContext) {
//get the repetition from the message context
int repetition = 0;
if(!inHandler) {//We only need to repete the out handler
- Integer count = (Integer)((MessageContext)msgContext).getProperty(WSSHandlerConstants.Out.REPETITON);
+ Integer count = (Integer)((MessageContext)msgContext).getProperty(WSSHandlerConstants.CURRENT_REPETITON);
if(count != null) { //When we are repeting the handler
repetition = count.intValue();
}
@@ -185,9 +185,9 @@
MessageContext msgContext = (MessageContext)this.reqData.getMsgContext();
- int repetition = this.getRepetition(msgContext);
+ int repetition = this.getCurrentRepetition(msgContext);
- String key = WSHandlerConstantsMapper.getMapping(axisKey,inHandler, repetition);
+ String key = Axis2Util.getKey(axisKey,inHandler, repetition);
Object value = null;
@@ -210,4 +210,5 @@
public void setProperty(Object msgContext, String key, Object value) {
((MessageContext)msgContext).setProperty(key, value);
}
+
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSSHandlerConstants.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSSHandlerConstants.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSSHandlerConstants.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/handler/WSSHandlerConstants.java Thu Oct 20 12:32:00 2005
@@ -16,66 +16,39 @@
package org.apache.axis2.security.handler;
+/**
+ * Constants specific to the Axis2 security module
+ *
+ * @author Ruchith Fernando (ruchith.fernando@gmail.com)
+ */
public interface WSSHandlerConstants {
- public static final String ENFORCE_ACTION_ORDER = "EnforceActionOrder";
-
/**
- * A service that requires the security module to be activated in the
- * inflow, can use this option by specifying (in services.xml):
- * <parameter name="InflowSecurity">on</parameter>
- * And if a certain service does NOT require security module to be
- * activated in the inflow the it should include (in services.xml):
- * <parameter name="InflowSecurity">off</parameter>
+ * Inflow security parameter
*/
public static final String INFLOW_SECURITY = "InflowSecurity";
/**
- * A service that requires the security module to be activated in the
- * outflow, can use this option by specifying (in services.xml):
- * <parameter name="OutflowSecurity">on</parameter>
- * And if a certain service does NOT require security module to be
- * activated in the outflow the it should include (in services.xml):
- * <parameter name="OutflowSecurity">off</parameter>
+ * Outflow security parameter
*/
public static final String OUTFLOW_SECURITY = "OutflowSecurity";
- public static final String ON_OPTION = "on";
- public static final String OFF_OPTION = "off";
-
+
/**
- * The following two seot the constants are used to introduce new
- * parameter names for the two handlers since wss4j expects
- * the same param name irrespective of the param name.
- *
- * It should be noted that we should only introduce names that are in
- * conflict. For example both handlers expects 'action' param and in
- * the axis2.xml this should be given as InAction and OutAction to
- * specify the 'action' to values for the two handlers. Whereas
- * parameters such as 'encryptionKeyIdentifier' need not be mapped into
- * new param names since they are specific to a handler
+ * Repetition count
*/
-
- interface In {
- public static final String ACTION = "InAction";
- public static final String PW_CALLBACK_CLASS = "InPasswordCallbackClass";
- public static final String SIG_PROP_FILE = "InSignaturePropFile";
- public static final String SIG_KEY_ID = "InSignatureKeyIdentifier";
- }
-
- interface Out {
- public static final String ACTION = "OutAction";
- public static final String PW_CALLBACK_CLASS = "OutPasswordCallbackClass";
- public static final String SIG_PROP_FILE = "OutSignaturePropFile";
- public static final String SIG_KEY_ID = "OutSignatureKeyIdentifier";
- public static final String SIGNATURE_PARTS = "OutSignatureParts";
+ public static final String SENDER_REPEAT_COUNT = "senderRepeatCount";
+
+ /**
+ * The current repetition
+ */
+ public static final String CURRENT_REPETITON = "currentRepetition";
- //Repetition count
- public static final String SENDER_REPEAT_COUNT = "senderRepeteCount";
- public static final String REPETITON = "repetition";
-
- public static final String OPTIMIZE_PARTS = "optimizeParts";
- }
+ /**
+ * This is used to indicate the XPath expression used to indicate the
+ * Elements whose first child (must be a text node) is to be optimized
+ */
+ public static final String OPTIMIZE_PARTS = "optimizeParts";
}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/Axis2Util.java Thu Oct 20 12:32:00 2005
@@ -19,6 +19,7 @@
import org.apache.axis2.om.OMElement;
import org.apache.axis2.om.impl.OMOutputImpl;
import org.apache.axis2.om.impl.llom.builder.StAXOMBuilder;
+import org.apache.axis2.security.handler.WSSHandlerConstants;
import org.apache.axis2.soap.SOAPEnvelope;
import org.apache.axis2.soap.impl.llom.builder.StAXSOAPModelBuilder;
import org.apache.ws.security.SOAPConstants;
@@ -129,7 +130,13 @@
}
-
+ /**
+ * Converts the given DOM Element to an OMElement
+ * @param elem
+ * @param constants
+ * @return
+ * @throws WSSecurityException
+ */
private static OMElement convertToOMelement(Element elem, SOAPConstants constants) throws WSSecurityException {
try {
@@ -161,4 +168,25 @@
}
+ /**
+ * This is used to provide the appropriate key to pickup
+ * config params from the message context.
+ * This is acutally used when the outflow handler (WSDoAllSender)
+ * is repeated n number of times
+ * @param originalKey The default key
+ * @param inHandler Whether the handler is the inflow handler or not
+ * @param repetition The current repetition number
+ * @return The key to be used internally in the security module to pick
+ * up the config params
+ */
+ public static String getKey(String originalKey, boolean inHandler, int repetition) {
+
+ if(repetition > 0 && !inHandler &&
+ !originalKey.equals(WSSHandlerConstants.OUTFLOW_SECURITY)&&
+ !originalKey.equals(WSSHandlerConstants.SENDER_REPEAT_COUNT)) {
+
+ return originalKey + repetition;
+ }
+ return originalKey;
+ }
}
Added: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java?rev=326985&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java (added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/HandlerParameterDecoder.java Thu Oct 20 12:32:00 2005
@@ -0,0 +1,120 @@
+/*
+ * 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.util;
+
+import org.apache.axis2.context.MessageContext;
+import org.apache.axis2.description.Parameter;
+import org.apache.axis2.om.OMElement;
+import org.apache.axis2.security.handler.WSSHandlerConstants;
+import org.apache.ws.security.WSSecurityException;
+
+import java.util.Iterator;
+
+/**
+ * This is used to process the security parameters from the
+ * configuration files
+ *
+ * Example:
+ <code>
+ <br>
+ <parameter name="InflowSecurity"><br>
+ <action>Timestamp Signature Encrypt</action><br>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass><br>
+ <signaturePropFile>interop.properties</signaturePropFile><br>
+ </parameter><br>
+
+
+ <parameter name="OutflowSecurity"><br>
+ <action>Timestamp Signature Encrypt</action><br>
+ <user>bob</user><br>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</passwordCallbackClass><br>
+ <signaturePropFile>interop.properties</signaturePropFile><br>
+ <signatureKeyIdentifier>SKIKeyIdentifier</signatureKeyIdentifier><br>
+ <encryptionKeyIdentifier>SKIKeyIdentifier</encryptionKeyIdentifier><br>
+ <encryptionUser>alice</encryptionUser><br>
+ <encryptionSymAlgorithm>http://www.w3.org/2001/04/xmlenc#aes128-cbc</encryptionSymAlgorithm><br>
+ <signatureParts>{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}To;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}ReplyTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}From;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}RelatesTo;{Element}{http://schemas.xmlsoap.org/ws/2004/08/addressing}MessageID;{Element}{http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd}Timestamp</signatureParts><br>
+
+ <optimizeParts>//xenc:EncryptedData/xenc:CipherData/xenc:CipherValue</optimizeParts><br>
+
+ <repetition count="1"><br>
+ <user>alice</user><br>
+ <action>Signature Timestamp</user><br>
+ <passwordCallbackClass>org.apache.axis2.security.PWCallback</user><br>
+ <signaturePropFile>interop.properties</user><br>
+ </repetition><br>
+ </parameter><br>
+ </code>
+ *
+ *
+ * @author Ruchith Fernando (ruchith.fernando@gmail.com)
+ */
+public class HandlerParameterDecoder {
+
+ /**
+ *
+ * @param msgCtx
+ * @param inflow
+ * @throws WSSecurityException
+ */
+ public static void processParameters(MessageContext msgCtx, boolean inflow) throws Exception {
+
+ Parameter inFlowSecParam = msgCtx.getParameter(WSSHandlerConstants.INFLOW_SECURITY);
+
+ Parameter outFlowSecParam = msgCtx.getParameter(WSSHandlerConstants.OUTFLOW_SECURITY);
+
+ int repetitionCount = 0;
+
+ /*
+ * Populate the inflow parameters
+ */
+ if(inFlowSecParam != null && inflow) {
+ OMElement inFlowParamElem = inFlowSecParam.getParameterElement();
+ Iterator childElements = inFlowParamElem.getChildElements();
+ while (childElements.hasNext()) {
+ OMElement element = (OMElement) childElements.next();
+ msgCtx.setProperty(element.getLocalName(),element.getText());
+ }
+ }
+
+ /*
+ * Populate the ourflow parameters
+ */
+ if(outFlowSecParam != null && !inflow) {
+ OMElement outFlowParamElem = outFlowSecParam.getParameterElement();
+ Iterator childElements = outFlowParamElem.getChildElements();
+ while (childElements.hasNext()) {
+ OMElement element = (OMElement) childElements.next();
+ if(!element.getLocalName().equals("repetition")) {
+ msgCtx.setProperty(element.getLocalName(),element.getText());
+ } else {
+ //Handle the repetition configuration
+ repetitionCount++;
+ Iterator repetitionParamElems = element.getChildElements();
+ while (repetitionParamElems.hasNext()) {
+ OMElement elem = (OMElement) repetitionParamElems.next();
+ msgCtx.setProperty(elem.getLocalName()+1,elem.getText());
+ }
+
+ }
+ }
+ }
+
+ msgCtx.setProperty(WSSHandlerConstants.SENDER_REPEAT_COUNT,new Integer(repetitionCount));
+
+ }
+
+}
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/WSHandlerConstantsMapper.java
URL: http://svn.apache.org/viewcvs/webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/WSHandlerConstantsMapper.java?rev=326985&r1=326984&r2=326985&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/WSHandlerConstantsMapper.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/axis2/security/util/WSHandlerConstantsMapper.java Thu Oct 20 12:32:00 2005
@@ -15,59 +15,9 @@
*/
package org.apache.axis2.security.util;
-import org.apache.axis2.security.handler.WSSHandlerConstants;
-import org.apache.ws.security.handler.WSHandlerConstants;
-import java.util.Hashtable;
public class WSHandlerConstantsMapper {
-
- private static Hashtable inHandlerConstants = new Hashtable();
-
- private static Hashtable outHandlerConstants = new Hashtable();
-
-
-
- /**
- * The parameter names that are shared across the two handlers are mapped in this situation
- */
- static {
- //Mapping the in handler constants
- inHandlerConstants.put(WSHandlerConstants.ACTION, WSSHandlerConstants.In.ACTION);
- inHandlerConstants.put(WSHandlerConstants.PW_CALLBACK_CLASS, WSSHandlerConstants.In.PW_CALLBACK_CLASS);
- inHandlerConstants.put(WSHandlerConstants.SIG_PROP_FILE, WSSHandlerConstants.In.SIG_PROP_FILE);
- inHandlerConstants.put(WSHandlerConstants.SIG_KEY_ID, WSSHandlerConstants.In.SIG_KEY_ID);
-
- //Mapping the out handler constants
- outHandlerConstants.put(WSHandlerConstants.ACTION, WSSHandlerConstants.Out.ACTION);
- outHandlerConstants.put(WSHandlerConstants.PW_CALLBACK_CLASS, WSSHandlerConstants.Out.PW_CALLBACK_CLASS);
- outHandlerConstants.put(WSHandlerConstants.SIG_PROP_FILE, WSSHandlerConstants.Out.SIG_PROP_FILE);
- outHandlerConstants.put(WSHandlerConstants.SIG_KEY_ID, WSSHandlerConstants.Out.SIG_KEY_ID);
- outHandlerConstants.put(WSHandlerConstants.SIGNATURE_PARTS, WSSHandlerConstants.Out.SIGNATURE_PARTS);
-
- }
- /**
- * If the mapping is there then the mapped value will be returned
- * Otherwise the original value will be returned since no mapping was required
- * @param axiskey
- * @return
- */
- public static String getMapping(String axiskey, boolean inHandler, int repetition) {
- String newKey = null;
- if(inHandler) {
- newKey = (String)inHandlerConstants.get(axiskey);
- } else {
- newKey = (String)outHandlerConstants.get(axiskey);
- }
- if(repetition > 0 && axiskey != WSSHandlerConstants.Out.SENDER_REPEAT_COUNT && axiskey != WSSHandlerConstants.OUTFLOW_SECURITY && !inHandler) {
- if(newKey == null) {
- return axiskey + repetition;
- } else {
- return newKey + repetition;
- }
- }
- return (newKey == null)?axiskey:newKey;
- }
}