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/07/27 14:01:58 UTC
svn commit: r426035 - in /webservices/axis2/trunk/java: etc/
modules/secpolicy/ modules/secpolicy/src/ modules/secpolicy/src/org/
modules/secpolicy/src/org/apache/ modules/secpolicy/src/org/apache/ws/
modules/secpolicy/src/org/apache/ws/secpolicy/ modu...
Author: ruchithf
Date: Thu Jul 27 05:01:56 2006
New Revision: 426035
URL: http://svn.apache.org/viewvc?rev=426035&view=rev
Log:
New maven module to hold the security policy model based on neethi-2 and copied the secpolicy model over from rampart
Added:
webservices/axis2/trunk/java/modules/secpolicy/
webservices/axis2/trunk/java/modules/secpolicy/maven.xml
webservices/axis2/trunk/java/modules/secpolicy/project.xml
webservices/axis2/trunk/java/modules/secpolicy/src/
webservices/axis2/trunk/java/modules/secpolicy/src/org/
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/Constants.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/WSSPolicyException.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmSuite.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmWrapper.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AsymmetricBinding.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Binding.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/EncryptionToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Header.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/HttpsToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/InitiatorToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Layout.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/ProtectionToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/RecipientToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignatureToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedElements.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedParts.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SupportingToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricAsymmetricBindingBase.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricBinding.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Token.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TokenWrapper.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportBinding.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/UsernameToken.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss10.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss11.java
webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/X509Token.java
webservices/axis2/trunk/java/modules/secpolicy/test/
Modified:
webservices/axis2/trunk/java/etc/project.properties
Modified: webservices/axis2/trunk/java/etc/project.properties
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/etc/project.properties?rev=426035&r1=426034&r2=426035&view=diff
==============================================================================
--- webservices/axis2/trunk/java/etc/project.properties (original)
+++ webservices/axis2/trunk/java/etc/project.properties Thu Jul 27 05:01:56 2006
@@ -68,6 +68,7 @@
modules/jibx/project.xml,\
modules/savan/project.xml,\
modules/rahas/project.xml,\
+modules/secpolicy/project.xml,\
${optional.includes}
#maven.multiproject.excludes=modules/tool/project.xml
Added: webservices/axis2/trunk/java/modules/secpolicy/maven.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/maven.xml?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/maven.xml (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/maven.xml Thu Jul 27 05:01:56 2006
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!-- $Revision: 1.21 $ $Date: 2004-10-27 20:54:09 +0600 (Wed, 27 Oct 2004) $ -->
+
+<project default="jar"
+ xmlns:j="jelly:core"
+ xmlns:u="jelly:util"
+ xmlns:maven="jelly:maven"
+ xmlns:deploy="deploy"
+ xmlns:ant="jelly:ant">
+</project>
Added: webservices/axis2/trunk/java/modules/secpolicy/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/project.xml?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/project.xml (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/project.xml Thu Jul 27 05:01:56 2006
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+<project>
+ <pomVersion>3</pomVersion>
+ <extend>../../etc/project.xml</extend>
+
+ <name>Apache Axis 2.0 - Security Policy</name>
+ <id>axis2-secpolicy</id>
+ <groupId>axis2</groupId>
+ <description>Axis2 : WS-Security Policy implementation</description>
+
+ <dependencies>
+
+ </dependencies>
+ <!-- build information for the project -->
+ <build>
+ <nagEmailAddress>axis-dev@ws.apache.org</nagEmailAddress>
+ <sourceDirectory>src</sourceDirectory>
+ <unitTestSourceDirectory>test</unitTestSourceDirectory>
+
+ <unitTest>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </unitTest>
+ </build>
+ <reports/>
+</project>
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/Constants.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/Constants.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/Constants.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/Constants.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,167 @@
+/*
+ * 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.ws.secpolicy;
+
+public class Constants {
+
+ public final static String SP_NS = "http://schemas.xmlsoap.org/ws/2005/07/securitypolicy";
+
+ public final static String ATTR_INCLUDE_TOKEN = "IncludeToken";
+
+ public final static String INCLUDE_NEVER = Constants.SP_NS
+ + "/IncludeToken/Never";
+
+ public final static String INCLUDE_ONCE = Constants.SP_NS
+ + "/IncludeToken/Once";
+
+ public final static String INCLUDE_ALWAYS_TO_RECIPIENT = Constants.SP_NS
+ + "/IncludeToken/AlwaysToRecipient";
+
+ public final static String INCLUDE_ALWAYS = Constants.SP_NS
+ + "/IncludeToken/Always";
+
+
+ public final static int SUPPORTING_TOKEN_SUPPORTING = 1;
+ public final static int SUPPORTING_TOKEN_ENDORSING = 2;
+ public final static int SUPPORTING_TOKEN_SIGNED = 3;
+ public final static int SUPPORTING_TOKEN_SIGNED_ENDORSING = 4;
+
+ /**
+ * Security Header Layout : Strict
+ */
+ public final static String LAYOUT_STRICT = "Strict";
+
+ /**
+ * Security Header Layout : Lax
+ */
+ public final static String LAYOUT_LAX = "Lax";
+
+ /**
+ * Security Header Layout : LaxTimestampFirst
+ */
+ public final static String LAYOUT_LAX_TIMESTAMP_FIRST = "LaxTimestampFirst";
+
+ /**
+ * Security Header Layout : LaxTimestampLast
+ */
+ public final static String LAYOUT_LAX_TIMESTAMP_LAST = "LaxTimestampLast";
+
+ /**
+ * Protection Order : EncryptBeforeSigning
+ */
+ public final static String ENCRYPT_BEFORE_SIGNING = "EncryptBeforeSigning";
+
+ /**
+ * Protection Order : SignBeforeEncrypting
+ */
+ public final static String SIGN_BEFORE_ENCRYPTING = "SignBeforeEncrypting";
+
+ public final static String WSS_X509_V1_TOKEN10 = "WssX509V1Token10";
+
+ public final static String WSS_X509_V3_TOKEN10 = "WssX509V3Token10";
+
+ public final static String WSS_X509_PKCS7_TOKEN10 = "WssX509Pkcs7Token10";
+
+ public final static String WSS_X509_PKI_PATH_V1_TOKEN10 =
+ "WssX509PkiPathV1Token10";
+
+ public final static String WSS_X509_V1_TOKEN11 = "WssX509V1Token11";
+
+ public final static String WSS_X509_V3_TOKEN11 = "WssX509V3Token11";
+
+ public final static String WSS_X509_PKCS7_TOKEN11 = "WssX509Pkcs7Token11";
+
+ public final static String WSS_X509_PKI_PATH_V1_TOKEN11 =
+ "WssX509PkiPathV1Token11";
+
+ ///
+ ///Algorithm Suites
+ ///
+ public final static String ALGO_SUITE_BASIC256 = "Basic256";
+ public final static String ALGO_SUITE_BASIC192 = "Basic192";
+ public final static String ALGO_SUITE_BASIC128 = "Basic128";
+ public final static String ALGO_SUITE_TRIPLE_DES = "TripleDes";
+ public final static String ALGO_SUITE_BASIC256_RSA15 = "Basic256Rsa15";
+ public final static String ALGO_SUITE_BASIC192_RSA15 = "Basic192Rsa15";
+ public final static String ALGO_SUITE_BASIC128_RSA15 = "Basic128Rsa15";
+ public final static String ALGO_SUITE_TRIPLE_DES_RSA15 = "TripleDesRsa15";
+ public final static String ALGO_SUITE_BASIC256_SHA256 = "Basic256Sha256";
+ public final static String ALGO_SUITE_BASIC192_SHA256 = "Basic192Sha256";
+ public final static String ALGO_SUITE_BASIC128_SHA256 = "Basic128Sha256";
+ public final static String ALGO_SUITE_TRIPLE_DES_SHA256 = "TripleDesSha256";
+ public final static String ALGO_SUITE_BASIC256_SHA256_RSA15 =
+ "Basic256Sha256Rsa15";
+ public final static String ALGO_SUITE_BASIC192_SHA256_RSA15 =
+ "Basic192Sha256Rsa15";
+ public final static String ALGO_SUITE_BASIC128_SHA256_RSA15 =
+ "Basic128Sha256Rsa15";
+ public final static String ALGO_SUITE_TRIPLE_DES_SHA256_RSA15 =
+ "TripleDesSha256Rsa15";
+
+ ///
+ ///Algorithms
+ ///
+ public final static String HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1";
+
+ public final static String RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1";
+
+ public final static String SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1";
+
+ public final static String SHA256 = "http://www.w3.org/2001/04/xmlenc#sha256";
+
+ public final static String SHA512 = "http://www.w3.org/2001/04/xmlenc#sha512";
+
+ public final static String AES128 = "http://www.w3.org/2001/04/xmlenc#aes128-cbc";
+
+ public final static String AES192 = "http://www.w3.org/2001/04/xmlenc#aes192-cbc";
+
+ public final static String AES256 = "http://www.w3.org/2001/04/xmlenc#aes256-cbc";
+
+ public final static String TRIPLE_DES = "http://www.w3.org/2001/04/xmlenc#tripledes-cbc";
+
+ public final static String KW_AES128 = "http://www.w3.org/2001/04/xmlenc#kw-aes256";
+
+ public final static String KW_AES192 = "http://www.w3.org/2001/04/xmlenc#kw-aes192";
+
+ public final static String KW_AES256 = "http://www.w3.org/2001/04/xmlenc#kw-aes128";
+
+ public final static String KW_TRIPLE_DES = "http://www.w3.org/2001/04/xmlenc#kw-tripledes";
+
+ public final static String KW_RSA_OAEP = "http://www.w3.org/2001/04/xmlenc#rsa-oaep-mgf1p";
+
+ public final static String KW_RSA15 = "http://www.w3.org/2001/04/xmlenc#rsa-1_5";
+
+ public final static String P_SHA1 = "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1";
+
+ public final static String P_SHA1_L128 = "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1";
+
+ public final static String P_SHA1_L192 = "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1";
+
+ public final static String P_SHA1_L256 = "http://schemas.xmlsoap.org/ws/2005/02/sc/dk/p_sha1";
+
+ public final static String XPATH = "http://www.w3.org/TR/1999/REC-xpath-19991116";
+
+ public final static String XPATH20 = "http://www.w3.org/2002/06/xmldsig-filter2";
+
+ public final static String C14N = "http://www.w3.org/2001/10/xml-c14n#";
+
+ public final static String EX_C14N = "http://www.w3.org/2001/10/xml-exc-c14n#";
+
+ public final static String SNT = "http://www.w3.org/TR/soap12-n11n";
+
+ public final static String STRT10 = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#STR-Transform";
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/WSSPolicyException.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/WSSPolicyException.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/WSSPolicyException.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/WSSPolicyException.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,31 @@
+/*
+ * 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.ws.secpolicy;
+
+public class WSSPolicyException extends Exception {
+
+ private static final long serialVersionUID = 5904800255533588133L;
+
+ public WSSPolicyException(String message, Throwable e) {
+ super(message, e);
+ }
+
+ public WSSPolicyException(String message) {
+ super(message);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmSuite.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmSuite.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmSuite.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmSuite.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,365 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.Constants;
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+
+public class AlgorithmSuite {
+
+ private String symmetricSignature = Constants.HMAC_SHA1;
+
+ private String asymmetricSignature = Constants.RSA_SHA1;
+
+ private String computedKey = Constants.P_SHA1;
+
+ private int maximumSymmetricKeyLength = 256;
+
+ private int minimumAsymmetricKeyLength = 1024;
+
+ private int maximumAsymmetricKeyLength = 4096;
+
+ private String digest;
+
+ private String encryption;
+
+ private String symmetricKeyWrap;
+
+ private String asymmetricKeyWrap;
+
+ private String encryptionKeyDerivation;
+
+ private String signatureKeyDerivation;
+
+ private int minimumSymmetricKeyLength;
+
+ private String c14n = Constants.EX_C14N;
+
+ private String soapNormalization;
+
+ private String strTransform;
+
+ private String xPath;
+
+// public AlgorithmSuite (String algoSuite) throws WSSPolicyException {
+// this.setAlgorithmSuite(algoSuite);
+// }
+
+ /**
+ * Set the algorithm suite
+ * @param algoSuite
+ * @throws WSSPolicyException
+ * @see Constants#ALGO_SUITE_BASIC128
+ * @see Constants#ALGO_SUITE_BASIC128_RSA15
+ * @see Constants#ALGO_SUITE_BASIC128_SHA256
+ * @see Constants#ALGO_SUITE_BASIC128_SHA256_RSA15
+ * @see Constants#ALGO_SUITE_BASIC192
+ * @see Constants#ALGO_SUITE_BASIC192_RSA15
+ * @see Constants#ALGO_SUITE_BASIC192_SHA256
+ * @see Constants#ALGO_SUITE_BASIC192_SHA256_RSA15
+ * @see Constants#ALGO_SUITE_BASIC256
+ * @see Constants#ALGO_SUITE_BASIC256_RSA15
+ * @see Constants#ALGO_SUITE_BASIC256_SHA256
+ * @see Constants#ALGO_SUITE_BASIC256_SHA256_RSA15
+ * @see Constants#ALGO_SUITE_TRIPLE_DES
+ * @see Constants#ALGO_SUITE_TRIPLE_DES_RSA15
+ * @see Constants#ALGO_SUITE_TRIPLE_DES_SHA256
+ * @see Constants#ALGO_SUITE_TRIPLE_DES_SHA256_RSA15
+ */
+ public void setAlgorithmSuite(String algoSuite) throws WSSPolicyException {
+ //TODO: Optimize this :-)
+ if(Constants.ALGO_SUITE_BASIC256.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.AES256;
+ this.symmetricKeyWrap = Constants.KW_AES256;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L256;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 256;
+ } else if (Constants.ALGO_SUITE_BASIC192.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.AES192;
+ this.symmetricKeyWrap = Constants.KW_AES192;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if (Constants.ALGO_SUITE_BASIC128.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.AES128;
+ this.symmetricKeyWrap = Constants.KW_AES128;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L128;
+ this.signatureKeyDerivation = Constants.P_SHA1_L128;
+ this.minimumSymmetricKeyLength = 128;
+ } else if(Constants.ALGO_SUITE_TRIPLE_DES.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.TRIPLE_DES;
+ this.symmetricKeyWrap = Constants.KW_TRIPLE_DES;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if (Constants.ALGO_SUITE_BASIC256_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.AES256;
+ this.symmetricKeyWrap = Constants.KW_AES256;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L256;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 256;
+ } else if (Constants.ALGO_SUITE_BASIC192_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.AES192;
+ this.symmetricKeyWrap = Constants.KW_AES192;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if (Constants.ALGO_SUITE_BASIC128_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.AES128;
+ this.symmetricKeyWrap = Constants.KW_AES128;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L128;
+ this.signatureKeyDerivation = Constants.P_SHA1_L128;
+ this.minimumSymmetricKeyLength = 128;
+ } else if (Constants.ALGO_SUITE_TRIPLE_DES_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA1;
+ this.encryption = Constants.TRIPLE_DES;
+ this.symmetricKeyWrap = Constants.KW_TRIPLE_DES;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if(Constants.ALGO_SUITE_BASIC256_SHA256.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.AES256;
+ this.symmetricKeyWrap = Constants.KW_AES256;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L256;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 256;
+ } else if (Constants.ALGO_SUITE_BASIC192_SHA256.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.AES192;
+ this.symmetricKeyWrap = Constants.KW_AES192;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if (Constants.ALGO_SUITE_BASIC128_SHA256.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.AES128;
+ this.symmetricKeyWrap = Constants.KW_AES128;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L128;
+ this.signatureKeyDerivation = Constants.P_SHA1_L128;
+ this.minimumSymmetricKeyLength = 128;
+ } else if(Constants.ALGO_SUITE_TRIPLE_DES_SHA256.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.TRIPLE_DES;
+ this.symmetricKeyWrap = Constants.KW_TRIPLE_DES;
+ this.asymmetricKeyWrap = Constants.KW_RSA_OAEP;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if (Constants.ALGO_SUITE_BASIC256_SHA256_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.AES256;
+ this.symmetricKeyWrap = Constants.KW_AES256;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L256;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 256;
+ } else if (Constants.ALGO_SUITE_BASIC192_SHA256_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.AES192;
+ this.symmetricKeyWrap = Constants.KW_AES192;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else if (Constants.ALGO_SUITE_BASIC128_SHA256_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.AES128;
+ this.symmetricKeyWrap = Constants.KW_AES128;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L128;
+ this.signatureKeyDerivation = Constants.P_SHA1_L128;
+ this.minimumSymmetricKeyLength = 128;
+ } else if (Constants.ALGO_SUITE_TRIPLE_DES_SHA256_RSA15.equals(algoSuite)) {
+ this.digest = Constants.SHA256;
+ this.encryption = Constants.TRIPLE_DES;
+ this.symmetricKeyWrap = Constants.KW_TRIPLE_DES;
+ this.asymmetricKeyWrap = Constants.KW_RSA15;
+ this.encryptionKeyDerivation = Constants.P_SHA1_L192;
+ this.signatureKeyDerivation = Constants.P_SHA1_L192;
+ this.minimumSymmetricKeyLength = 192;
+ } else {
+ throw new WSSPolicyException("Invalid algorithm suite : " + algoSuite);
+ }
+ }
+
+ /**
+ * @return Returns the asymmetricKeyWrap.
+ */
+ public String getAsymmetricKeyWrap() {
+ return asymmetricKeyWrap;
+ }
+
+ /**
+ * @return Returns the asymmetricSignature.
+ */
+ public String getAsymmetricSignature() {
+ return asymmetricSignature;
+ }
+
+ /**
+ * @return Returns the computedKey.
+ */
+ public String getComputedKey() {
+ return computedKey;
+ }
+
+ /**
+ * @return Returns the digest.
+ */
+ public String getDigest() {
+ return digest;
+ }
+
+ /**
+ * @return Returns the encryption.
+ */
+ public String getEncryption() {
+ return encryption;
+ }
+
+ /**
+ * @return Returns the encryptionKeyDerivation.
+ */
+ public String getEncryptionKeyDerivation() {
+ return encryptionKeyDerivation;
+ }
+
+ /**
+ * @return Returns the maximumAsymmetricKeyLength.
+ */
+ public int getMaximumAsymmetricKeyLength() {
+ return maximumAsymmetricKeyLength;
+ }
+
+ /**
+ * @return Returns the maximumSymmetricKeyLength.
+ */
+ public int getMaximumSymmetricKeyLength() {
+ return maximumSymmetricKeyLength;
+ }
+
+ /**
+ * @return Returns the minimumAsymmetricKeyLength.
+ */
+ public int getMinimumAsymmetricKeyLength() {
+ return minimumAsymmetricKeyLength;
+ }
+
+ /**
+ * @return Returns the minimumSymmetricKeyLength.
+ */
+ public int getMinimumSymmetricKeyLength() {
+ return minimumSymmetricKeyLength;
+ }
+
+ /**
+ * @return Returns the signatureKeyDerivation.
+ */
+ public String getSignatureKeyDerivation() {
+ return signatureKeyDerivation;
+ }
+
+ /**
+ * @return Returns the symmetricKeyWrap.
+ */
+ public String getSymmetricKeyWrap() {
+ return symmetricKeyWrap;
+ }
+
+ /**
+ * @return Returns the symmetricSignature.
+ */
+ public String getSymmetricSignature() {
+ return symmetricSignature;
+ }
+
+ /**
+ * @return Returns the c14n.
+ */
+ public String getInclusiveC14n() {
+ return c14n;
+ }
+
+ /**
+ * @param c14n The c14n to set.
+ */
+ public void setC14n(String c14n) throws WSSPolicyException {
+ this.c14n = c14n;
+ }
+
+ /**
+ * @return Returns the soapNormalization.
+ */
+ public String getSoapNormalization() {
+ return soapNormalization;
+ }
+
+ /**
+ * @param soapNormalization The soapNormalization to set.
+ */
+ public void setSoapNormalization(String soapNormalization) throws WSSPolicyException {
+ this.soapNormalization = soapNormalization;
+ }
+
+ /**
+ * @return Returns the strTransform.
+ */
+ public String getStrTransform() {
+ return strTransform;
+ }
+
+ /**
+ * @param strTransform The strTransform to set.
+ */
+ public void setStrTransform(String strTransform) throws WSSPolicyException {
+ this.strTransform = strTransform;
+ }
+
+ /**
+ * @return Returns the xPath.
+ */
+ public String getXPath() {
+ return xPath;
+ }
+
+ /**
+ * @param path The xPath to set.
+ */
+ public void setXPath(String path) throws WSSPolicyException{
+ xPath = path;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmWrapper.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmWrapper.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AlgorithmWrapper.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,25 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public interface AlgorithmWrapper {
+
+ public void setAlgorithmSuite(AlgorithmSuite algorithmSuite) throws WSSPolicyException;
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AsymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AsymmetricBinding.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AsymmetricBinding.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/AsymmetricBinding.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,51 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class AsymmetricBinding extends SymmetricAsymmetricBindingBase {
+
+ private InitiatorToken initiatorToken;
+
+ private RecipientToken recipientToken;
+
+ /**
+ * @return Returns the initiatorToken.
+ */
+ public InitiatorToken getInitiatorToken() {
+ return initiatorToken;
+ }
+ /**
+ * @param initiatorToken The initiatorToken to set.
+ */
+ public void setInitiatorToken(InitiatorToken initiatorToken) {
+ this.initiatorToken = initiatorToken;
+ }
+ /**
+ * @return Returns the recipientToken.
+ */
+ public RecipientToken getRecipientToken() {
+ return recipientToken;
+ }
+ /**
+ * @param recipientToken The recipientToken to set.
+ */
+ public void setRecipientToken(RecipientToken recipientToken) {
+ this.recipientToken = recipientToken;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Binding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Binding.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Binding.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Binding.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,68 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class Binding implements AlgorithmWrapper {
+
+ private AlgorithmSuite algorithmSuite;
+ private boolean includeTimestamp;
+ private Layout layout = new Layout();
+
+ /**
+ * @return Returns the algorithmSuite.
+ */
+ public AlgorithmSuite getAlgorithmSuite() {
+ return algorithmSuite;
+ }
+
+ /**
+ * @param algorithmSuite The algorithmSuite to set.
+ */
+ public void setAlgorithmSuite(AlgorithmSuite algorithmSuite) {
+ this.algorithmSuite = algorithmSuite;
+ }
+
+ /**
+ * @return Returns the includeTimestamp.
+ */
+ public boolean isIncludeTimestamp() {
+ return includeTimestamp;
+ }
+
+ /**
+ * @param includeTimestamp The includeTimestamp to set.
+ */
+ public void setIncludeTimestamp(boolean includeTimestamp) {
+ this.includeTimestamp = includeTimestamp;
+ }
+
+ /**
+ * @return Returns the layout.
+ */
+ public Layout getLayout() {
+ return layout;
+ }
+
+ /**
+ * @param layout The layout to set.
+ */
+ public void setLayout(Layout layout) throws WSSPolicyException {
+ this.layout = layout;
+ }
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/EncryptionToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/EncryptionToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/EncryptionToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/EncryptionToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,46 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class EncryptionToken implements TokenWrapper {
+
+ private Token encryptionToken;
+
+ /**
+ * @return Returns the encryptionToken.
+ */
+ public Token getEncryptionToken() {
+ return encryptionToken;
+ }
+
+ /**
+ * @param encryptionToken The encryptionToken to set.
+ */
+ public void setEncryptionToken(Token encryptionToken) {
+ this.encryptionToken = encryptionToken;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
+ */
+ public void setToken(Token tok) throws WSSPolicyException {
+ this.setEncryptionToken(tok);
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Header.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Header.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Header.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Header.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,49 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class Header {
+
+ private String name;
+ private String namespace;
+
+ /**
+ * @return Returns the name.
+ */
+ public String getName() {
+ return name;
+ }
+ /**
+ * @param name The name to set.
+ */
+ public void setName(String name) {
+ this.name = name;
+ }
+ /**
+ * @return Returns the namespace.
+ */
+ public String getNamespace() {
+ return namespace;
+ }
+ /**
+ * @param namespace The namespace to set.
+ */
+ public void setNamespace(String namespace) {
+ this.namespace = namespace;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/HttpsToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/HttpsToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/HttpsToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/HttpsToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class HttpsToken {
+
+ private Token httpsToken;
+
+ /**
+ * @return Returns the httpsToken.
+ */
+ public Token getHttpsToken() {
+ return httpsToken;
+ }
+
+ /**
+ * @param httpsToken The httpsToken to set.
+ */
+ public void setHttpsToken(Token httpsToken) {
+ this.httpsToken = httpsToken;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/InitiatorToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/InitiatorToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/InitiatorToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/InitiatorToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,47 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class InitiatorToken implements TokenWrapper {
+
+ private Token initiatorToken;
+
+ /**
+ * @return Returns the initiatorToken.
+ */
+ public Token getInitiatorToken() {
+ return initiatorToken;
+ }
+
+ /**
+ * @param initiatorToken The initiatorToken to set.
+ */
+ public void setInitiatorToken(Token initiatorToken) {
+ this.initiatorToken = initiatorToken;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
+ */
+ public void setToken(Token tok) throws WSSPolicyException {
+ this.setInitiatorToken(tok);
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Layout.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Layout.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Layout.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Layout.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,48 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.Constants;
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class Layout {
+
+ private String value = Constants.LAYOUT_LAX;
+
+ /**
+ * @return Returns the value.
+ */
+ public String getValue() {
+ return value;
+ }
+
+ /**
+ * @param value The value to set.
+ */
+ public void setValue(String value) throws WSSPolicyException{
+ if(Constants.LAYOUT_LAX.equals(value) ||
+ Constants.LAYOUT_STRICT.equals(value) ||
+ Constants.LAYOUT_LAX_TIMESTAMP_FIRST.equals(value) ||
+ Constants.LAYOUT_LAX_TIMESTAMP_LAST.equals(value)) {
+ this.value = value;
+ } else {
+ throw new WSSPolicyException("Incorrect layout value : " + value);
+ }
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/ProtectionToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/ProtectionToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/ProtectionToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/ProtectionToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,44 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class ProtectionToken implements TokenWrapper {
+
+ private Token protectionToken;
+
+ /**
+ * @return Returns the protectionToken.
+ */
+ public Token getProtectionToken() {
+ return protectionToken;
+ }
+
+ /**
+ * @param protectionToken The protectionToken to set.
+ */
+ public void setProtectionToken(Token protectionToken) {
+ this.protectionToken = protectionToken;
+ }
+
+ public void setToken(Token tok) throws WSSPolicyException {
+ this.setProtectionToken(tok);
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/RecipientToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/RecipientToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/RecipientToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/RecipientToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,47 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class RecipientToken implements TokenWrapper {
+
+ private Token receipientToken;
+
+ /**
+ * @return Returns the receipientToken.
+ */
+ public Token getReceipientToken() {
+ return receipientToken;
+ }
+
+ /**
+ * @param receipientToken The receipientToken to set.
+ */
+ public void setReceipientToken(Token receipientToken) {
+ this.receipientToken = receipientToken;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
+ */
+ public void setToken(Token tok) throws WSSPolicyException {
+ this.setReceipientToken(tok);
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignatureToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignatureToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignatureToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignatureToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,47 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class SignatureToken implements TokenWrapper {
+
+ private Token signatureToken;
+
+ /**
+ * @return Returns the signatureToken.
+ */
+ public Token getSignatureToken() {
+ return signatureToken;
+ }
+
+ /**
+ * @param signatureToken The signatureToken to set.
+ */
+ public void setSignatureToken(Token signatureToken) {
+ this.signatureToken = signatureToken;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
+ */
+ public void setToken(Token tok) throws WSSPolicyException {
+ this.setSignatureToken(tok);
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedElements.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedElements.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedElements.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedElements.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,70 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import java.util.ArrayList;
+
+public class SignedEncryptedElements {
+
+ private ArrayList xPathExpressions = new ArrayList();
+ private String xPathVersion;
+
+ /**
+ * Just a flag to identify whether this holds
+ * sign element info or encr elements info
+ */
+ private boolean signedElemets;
+
+ public SignedEncryptedElements(boolean signedElements) {
+ this.signedElemets = signedElements;
+ }
+
+ /**
+ * @return Returns the xPathExpressions.
+ */
+ public ArrayList getXPathExpressions() {
+ return xPathExpressions;
+ }
+
+ public void addXPathExpression(String expr) {
+ this.xPathExpressions.add(expr);
+ }
+
+ /**
+ * @return Returns the xPathVersion.
+ */
+ public String getXPathVersion() {
+ return xPathVersion;
+ }
+
+ /**
+ * @param pathVersion The xPathVersion to set.
+ */
+ public void setXPathVersion(String pathVersion) {
+ xPathVersion = pathVersion;
+ }
+
+ /**
+ * @return Returns the signedElemets.
+ */
+ public boolean isSignedElemets() {
+ return signedElemets;
+ }
+
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedParts.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedParts.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedParts.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SignedEncryptedParts.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,70 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import java.util.ArrayList;
+
+public class SignedEncryptedParts {
+
+ private boolean body;
+
+ private ArrayList headers = new ArrayList();
+
+ private boolean signedParts;
+
+ public SignedEncryptedParts(boolean signedParts) {
+ this.signedParts = signedParts;
+ }
+
+ /**
+ * @return Returns the body.
+ */
+ public boolean isBody() {
+ return body;
+ }
+
+ /**
+ * @param body The body to set.
+ */
+ public void setBody(boolean body) {
+ this.body = body;
+ }
+
+ /**
+ * @return Returns the headers.
+ */
+ public ArrayList getHeaders() {
+ return this.headers;
+ }
+
+ /**
+ * @param headers The headers to set.
+ */
+ public void addHeader(Header header) {
+ this.headers.add(header);
+ }
+
+ /**
+ * @return Returns the signedParts.
+ */
+ public boolean isSignedParts() {
+ return signedParts;
+ }
+
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SupportingToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SupportingToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SupportingToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SupportingToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,157 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+import java.util.ArrayList;
+
+public class SupportingToken implements AlgorithmWrapper, TokenWrapper {
+
+ /**
+ * Type of SupportingToken
+ * @see SupportingToken#SUPPORTING
+ * @see SupportingToken#ENDORSING
+ * @see SupportingToken#SIGNED
+ * @see SupportingToken#SIGNED_ENDORSING
+ */
+ private int type;
+
+ private AlgorithmSuite algorithmSuite;
+
+ private ArrayList tokens = new ArrayList();
+
+ private SignedEncryptedElements signedElements;
+
+ private SignedEncryptedElements encryptedElements;
+
+ private SignedEncryptedParts signedParts;
+
+ private SignedEncryptedParts encryptedParts;
+
+ public SupportingToken(int type) {
+ this.type = type;
+ }
+
+ /**
+ * @return Returns the algorithmSuite.
+ */
+ public AlgorithmSuite getAlgorithmSuite() {
+ return algorithmSuite;
+ }
+
+ /**
+ * @param algorithmSuite The algorithmSuite to set.
+ */
+ public void setAlgorithmSuite(AlgorithmSuite algorithmSuite) {
+ this.algorithmSuite = algorithmSuite;
+ }
+
+ /**
+ * @return Returns the token.
+ */
+ public ArrayList getTokens() {
+ return tokens;
+ }
+
+ /**
+ * @param token The token to set.
+ */
+ public void addToken(Token token) {
+ this.tokens.add(token);
+ }
+
+ /**
+ * @return Returns the type.
+ */
+ public int getType() {
+ return type;
+ }
+
+ /**
+ * @param type The type to set.
+ */
+ public void setType(int type) {
+ this.type = type;
+ }
+
+ /**
+ * @return Returns the encryptedElements.
+ */
+ public SignedEncryptedElements getEncryptedElements() {
+ return encryptedElements;
+ }
+
+ /**
+ * @param encryptedElements The encryptedElements to set.
+ */
+ public void setEncryptedElements(SignedEncryptedElements encryptedElements) {
+ this.encryptedElements = encryptedElements;
+ }
+
+ /**
+ * @return Returns the encryptedParts.
+ */
+ public SignedEncryptedParts getEncryptedParts() {
+ return encryptedParts;
+ }
+
+ /**
+ * @param encryptedParts The encryptedParts to set.
+ */
+ public void setEncryptedParts(SignedEncryptedParts encryptedParts) {
+ this.encryptedParts = encryptedParts;
+ }
+
+ /**
+ * @return Returns the signedElements.
+ */
+ public SignedEncryptedElements getSignedElements() {
+ return signedElements;
+ }
+
+ /**
+ * @param signedElements The signedElements to set.
+ */
+ public void setSignedElements(SignedEncryptedElements signedElements) {
+ this.signedElements = signedElements;
+ }
+
+ /**
+ * @return Returns the signedParts.
+ */
+ public SignedEncryptedParts getSignedParts() {
+ return signedParts;
+ }
+
+ /**
+ * @param signedParts The signedParts to set.
+ */
+ public void setSignedParts(SignedEncryptedParts signedParts) {
+ this.signedParts = signedParts;
+ }
+
+ /* (non-Javadoc)
+ * @see org.apache.ws.security.policy.TokenWrapper#setToken(org.apache.ws.security.policy.Token)
+ */
+ public void setToken(Token tok) throws WSSPolicyException {
+ this.addToken(tok);
+ }
+
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricAsymmetricBindingBase.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricAsymmetricBindingBase.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricAsymmetricBindingBase.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricAsymmetricBindingBase.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,98 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.Constants;
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class SymmetricAsymmetricBindingBase extends Binding {
+
+ private String protectionOrder = Constants.SIGN_BEFORE_ENCRYPTING;
+
+ private boolean signatureProtection;
+
+ private boolean tokenProtection;
+
+ private boolean entireHeaderAndBodySignatures;
+
+ /**
+ * @return Returns the entireHeaderAndBodySignatures.
+ */
+ public boolean isEntireHeaderAndBodySignatures() {
+ return entireHeaderAndBodySignatures;
+ }
+
+ /**
+ * @param entireHeaderAndBodySignatures The entireHeaderAndBodySignatures to set.
+ */
+ public void setEntireHeaderAndBodySignatures(
+ boolean entireHeaderAndBodySignatures) {
+ this.entireHeaderAndBodySignatures = entireHeaderAndBodySignatures;
+ }
+
+ /**
+ * @return Returns the protectionOrder.
+ */
+ public String getProtectionOrder() {
+ return protectionOrder;
+ }
+
+ /**
+ * @param protectionOrder The protectionOrder to set.
+ */
+ public void setProtectionOrder(String protectionOrder)
+ throws WSSPolicyException {
+ if(Constants.ENCRYPT_BEFORE_SIGNING.equals(protectionOrder) ||
+ Constants.SIGN_BEFORE_ENCRYPTING.equals(protectionOrder)) {
+ this.protectionOrder = protectionOrder;
+ } else {
+ throw new WSSPolicyException("Incorrect protection order value : "
+ + protectionOrder);
+ }
+ }
+
+ /**
+ * @return Returns the signatureProtection.
+ */
+ public boolean isSignatureProtection() {
+ return signatureProtection;
+ }
+
+ /**
+ * @param signatureProtection The signatureProtection to set.
+ */
+ public void setSignatureProtection(boolean signatureProtection) {
+ this.signatureProtection = signatureProtection;
+ }
+
+ /**
+ * @return Returns the tokenProtection.
+ */
+ public boolean isTokenProtection() {
+ return tokenProtection;
+ }
+
+ /**
+ * @param tokenProtection The tokenProtection to set.
+ */
+ public void setTokenProtection(boolean tokenProtection) {
+ this.tokenProtection = tokenProtection;
+ }
+
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricBinding.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricBinding.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/SymmetricBinding.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,85 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class SymmetricBinding extends SymmetricAsymmetricBindingBase {
+
+ private EncryptionToken encryptionToken;
+
+ private SignatureToken signatureToken;
+
+ private ProtectionToken protectionToken;
+
+ /**
+ * @return Returns the encryptionToken.
+ */
+ public EncryptionToken getEncryptionToken() {
+ return encryptionToken;
+ }
+
+ /**
+ * @param encryptionToken The encryptionToken to set.
+ */
+ public void setEncryptionToken(EncryptionToken encryptionToken) throws WSSPolicyException {
+ if(this.protectionToken != null) {
+ throw new WSSPolicyException("Cannot use an EncryptionToken in a " +
+ "SymmetricBinding when there is a ProtectionToken");
+ }
+ this.encryptionToken = encryptionToken;
+ }
+
+ /**
+ * @return Returns the protectionToken.
+ */
+ public ProtectionToken getProtectionToken() {
+ return protectionToken;
+ }
+
+ /**
+ * @param protectionToken The protectionToken to set.
+ */
+ public void setProtectionToken(ProtectionToken protectionToken) throws WSSPolicyException {
+ if(this.encryptionToken != null || this.signatureToken != null) {
+ throw new WSSPolicyException("Cannot use a ProtectionToken in a " +
+ "SymmetricBinding when there is a SignatureToken or an" +
+ "EncryptionToken");
+ }
+ this.protectionToken = protectionToken;
+ }
+
+ /**
+ * @return Returns the signatureToken.
+ */
+ public SignatureToken getSignatureToken() {
+ return signatureToken;
+ }
+
+ /**
+ * @param signatureToken The signatureToken to set.
+ */
+ public void setSignatureToken(SignatureToken signatureToken) throws WSSPolicyException {
+ if(this.protectionToken != null) {
+ throw new WSSPolicyException("Cannot use a SignatureToken in a " +
+ "SymmetricBinding when there is a ProtectionToken");
+ }
+ this.signatureToken = signatureToken;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Token.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Token.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Token.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Token.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,69 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.Constants;
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public class Token {
+
+ /**
+ * Inclusiong property of a TokenAssertion
+ */
+ private String inclusion = Constants.INCLUDE_ALWAYS;
+
+ /**
+ * Whether to derive keys or not
+ */
+ private boolean derivedKeys;
+
+ /**
+ * @return Returns the inclusion.
+ */
+ public String getInclusion() {
+ return inclusion;
+ }
+
+ /**
+ * @param inclusion The inclusion to set.
+ */
+ public void setInclusion(String inclusion) throws WSSPolicyException {
+ if(Constants.INCLUDE_ALWAYS.equals(inclusion) ||
+ Constants.INCLUDE_ALWAYS_TO_RECIPIENT.equals(inclusion) ||
+ Constants.INCLUDE_NEVER.equals(inclusion) ||
+ Constants.INCLUDE_ONCE.equals(inclusion)) {
+ this.inclusion = inclusion;
+ } else {
+ throw new WSSPolicyException("Incorrect inclusion value: " + inclusion);
+ }
+ }
+
+ /**
+ * @return Returns the derivedKeys.
+ */
+ public boolean isDerivedKeys() {
+ return derivedKeys;
+ }
+
+ /**
+ * @param derivedKeys The derivedKeys to set.
+ */
+ public void setDerivedKeys(boolean derivedKeys) {
+ this.derivedKeys = derivedKeys;
+ }
+
+}
\ No newline at end of file
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TokenWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TokenWrapper.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TokenWrapper.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TokenWrapper.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,24 @@
+/*
+ * 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.ws.secpolicy.model;
+
+import org.apache.ws.secpolicy.WSSPolicyException;
+
+public interface TokenWrapper {
+
+ public void setToken(Token tok) throws WSSPolicyException;
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportBinding.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportBinding.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportBinding.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportBinding.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,37 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class TransportBinding extends Binding {
+
+ private Token transportToken;
+
+ /**
+ * @return Returns the transportToken.
+ */
+ public Token getTransportToken() {
+ return transportToken;
+ }
+
+ /**
+ * @param transportToken The transportToken to set.
+ */
+ public void setTransportToken(Token transportToken) {
+ this.transportToken = transportToken;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/TransportToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.ws.secpolicy.model;
+
+
+public class TransportToken {
+
+ private Token transportToken;
+
+
+ /**
+ * @return Returns the transportToken.
+ */
+ public Token getTransportToken() {
+ return transportToken;
+ }
+
+ /**
+ * @param transportToken The transportToken to set.
+ */
+ public void setTransportToken(Token transportToken) {
+ this.transportToken = transportToken;
+ }
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/UsernameToken.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/UsernameToken.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/UsernameToken.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/UsernameToken.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,38 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class UsernameToken extends Token {
+
+ private boolean useUTProfile11;
+
+ /**
+ * @return Returns the useUTProfile11.
+ */
+ public boolean isUseUTProfile11() {
+ return useUTProfile11;
+ }
+
+ /**
+ * @param useUTProfile11 The useUTProfile11 to set.
+ */
+ public void setUseUTProfile11(boolean useUTProfile11) {
+ this.useUTProfile11 = useUTProfile11;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss10.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss10.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss10.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss10.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,75 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class Wss10 {
+
+ private boolean mustSupportRefKeyIdentifier;
+ private boolean MustSupportRefIssuerSerial;
+ private boolean MustSupportRefExternalURI;
+ private boolean MustSupportRefEmbeddedToken;
+
+ /**
+ * @return Returns the mustSupportRefEmbeddedToken.
+ */
+ public boolean isMustSupportRefEmbeddedToken() {
+ return MustSupportRefEmbeddedToken;
+ }
+ /**
+ * @param mustSupportRefEmbeddedToken The mustSupportRefEmbeddedToken to set.
+ */
+ public void setMustSupportRefEmbeddedToken(boolean mustSupportRefEmbeddedToken) {
+ MustSupportRefEmbeddedToken = mustSupportRefEmbeddedToken;
+ }
+ /**
+ * @return Returns the mustSupportRefExternalURI.
+ */
+ public boolean isMustSupportRefExternalURI() {
+ return MustSupportRefExternalURI;
+ }
+ /**
+ * @param mustSupportRefExternalURI The mustSupportRefExternalURI to set.
+ */
+ public void setMustSupportRefExternalURI(boolean mustSupportRefExternalURI) {
+ MustSupportRefExternalURI = mustSupportRefExternalURI;
+ }
+ /**
+ * @return Returns the mustSupportRefIssuerSerial.
+ */
+ public boolean isMustSupportRefIssuerSerial() {
+ return MustSupportRefIssuerSerial;
+ }
+ /**
+ * @param mustSupportRefIssuerSerial The mustSupportRefIssuerSerial to set.
+ */
+ public void setMustSupportRefIssuerSerial(boolean mustSupportRefIssuerSerial) {
+ MustSupportRefIssuerSerial = mustSupportRefIssuerSerial;
+ }
+ /**
+ * @return Returns the mustSupportRefKeyIdentifier.
+ */
+ public boolean isMustSupportRefKeyIdentifier() {
+ return mustSupportRefKeyIdentifier;
+ }
+ /**
+ * @param mustSupportRefKeyIdentifier The mustSupportRefKeyIdentifier to set.
+ */
+ public void setMustSupportRefKeyIdentifier(boolean mustSupportRefKeyIdentifier) {
+ this.mustSupportRefKeyIdentifier = mustSupportRefKeyIdentifier;
+ }
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss11.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss11.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss11.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/Wss11.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,63 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class Wss11 extends Wss10 {
+
+ private boolean MustSupportRefThumbprint;
+ private boolean MustSupportRefEncryptedKey;
+ private boolean RequireSignatureConfirmation;
+
+ /**
+ * @return Returns the mustSupportRefEncryptedKey.
+ */
+ public boolean isMustSupportRefEncryptedKey() {
+ return MustSupportRefEncryptedKey;
+ }
+ /**
+ * @param mustSupportRefEncryptedKey The mustSupportRefEncryptedKey to set.
+ */
+ public void setMustSupportRefEncryptedKey(boolean mustSupportRefEncryptedKey) {
+ MustSupportRefEncryptedKey = mustSupportRefEncryptedKey;
+ }
+ /**
+ * @return Returns the mustSupportRefThumbprint.
+ */
+ public boolean isMustSupportRefThumbprint() {
+ return MustSupportRefThumbprint;
+ }
+ /**
+ * @param mustSupportRefThumbprint The mustSupportRefThumbprint to set.
+ */
+ public void setMustSupportRefThumbprint(boolean mustSupportRefThumbprint) {
+ MustSupportRefThumbprint = mustSupportRefThumbprint;
+ }
+ /**
+ * @return Returns the requireSignatureConfirmation.
+ */
+ public boolean isRequireSignatureConfirmation() {
+ return RequireSignatureConfirmation;
+ }
+ /**
+ * @param requireSignatureConfirmation The requireSignatureConfirmation to set.
+ */
+ public void setRequireSignatureConfirmation(boolean requireSignatureConfirmation) {
+ RequireSignatureConfirmation = requireSignatureConfirmation;
+ }
+
+
+}
Added: webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/X509Token.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/X509Token.java?rev=426035&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/X509Token.java (added)
+++ webservices/axis2/trunk/java/modules/secpolicy/src/org/apache/ws/secpolicy/model/X509Token.java Thu Jul 27 05:01:56 2006
@@ -0,0 +1,104 @@
+/*
+ * 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.ws.secpolicy.model;
+
+public class X509Token extends Token {
+
+ private boolean requireKeyIdentifierReference;
+
+ private boolean requireIssuerSerialReference;
+
+ private boolean requireEmbeddedTokenReference;
+
+ private boolean requireThumbprintReference;
+
+ private String tokenVersionAndType;
+
+ /**
+ * @return Returns the requireEmbeddedTokenReference.
+ */
+ public boolean isRequireEmbeddedTokenReference() {
+ return requireEmbeddedTokenReference;
+ }
+
+ /**
+ * @param requireEmbeddedTokenReference The requireEmbeddedTokenReference to set.
+ */
+ public void setRequireEmbeddedTokenReference(
+ boolean requireEmbeddedTokenReference) {
+ this.requireEmbeddedTokenReference = requireEmbeddedTokenReference;
+ }
+
+ /**
+ * @return Returns the requireIssuerSerialReference.
+ */
+ public boolean isRequireIssuerSerialReference() {
+ return requireIssuerSerialReference;
+ }
+
+ /**
+ * @param requireIssuerSerialReference The requireIssuerSerialReference to set.
+ */
+ public void setRequireIssuerSerialReference(boolean requireIssuerSerialReference) {
+ this.requireIssuerSerialReference = requireIssuerSerialReference;
+ }
+
+ /**
+ * @return Returns the requireKeyIdentifierReference.
+ */
+ public boolean isRequireKeyIdentifierReference() {
+ return requireKeyIdentifierReference;
+ }
+
+ /**
+ * @param requireKeyIdentifierReference The requireKeyIdentifierReference to set.
+ */
+ public void setRequireKeyIdentifierReference(
+ boolean requireKeyIdentifierReference) {
+ this.requireKeyIdentifierReference = requireKeyIdentifierReference;
+ }
+
+ /**
+ * @return Returns the requireThumbprintReference.
+ */
+ public boolean isRequireThumbprintReference() {
+ return requireThumbprintReference;
+ }
+
+ /**
+ * @param requireThumbprintReference The requireThumbprintReference to set.
+ */
+ public void setRequireThumbprintReference(boolean requireThumbprintReference) {
+ this.requireThumbprintReference = requireThumbprintReference;
+ }
+
+ /**
+ * @return Returns the tokenVersionAndType.
+ */
+ public String getTokenVersionAndType() {
+ return tokenVersionAndType;
+ }
+
+ /**
+ * @param tokenVersionAndType The tokenVersionAndType to set.
+ */
+ public void setTokenVersionAndType(String tokenVersionAndType) {
+ this.tokenVersionAndType = tokenVersionAndType;
+ }
+
+
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org