axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ruchi...@apache.org
Subject svn commit: r433237 - in /webservices/axis2/trunk/java/modules/security: project.xml src/org/apache/rampart/policy/ src/org/apache/rampart/policy/model/ src/org/apache/rampart/policy/model/Crypto.java src/org/apache/rampart/policy/model/RampartConfig.java
Date Mon, 21 Aug 2006 12:37:33 GMT
Author: ruchithf
Date: Mon Aug 21 05:37:32 2006
New Revision: 433237

URL: http://svn.apache.org/viewvc?rev=433237&view=rev
Log:
adding the additional policy model classes to capture rampart specific configuration assertions

Added:
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/Crypto.java
    webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/RampartConfig.java
Modified:
    webservices/axis2/trunk/java/modules/security/project.xml

Modified: webservices/axis2/trunk/java/modules/security/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/project.xml?rev=433237&r1=433236&r2=433237&view=diff
==============================================================================
--- webservices/axis2/trunk/java/modules/security/project.xml (original)
+++ webservices/axis2/trunk/java/modules/security/project.xml Mon Aug 21 05:37:32 2006
@@ -36,19 +36,26 @@
             <artifactId>axiom-impl</artifactId>
             <version>${axiom.version}</version>
         </dependency>
+		
 		<dependency>
             <groupId>ws-commons</groupId>
             <artifactId>axiom-dom</artifactId>
             <version>${axiom.version}</version>
         </dependency>
-  <dependency>
+		<dependency>
+            <groupId>ws-commons</groupId>
+            <artifactId>neethi</artifactId>
+            <version>${neethi.version}</version>
+            <properties>
+                <module>true</module>
+            </properties>
+        </dependency>
+		<dependency>
             <groupId>axis2</groupId>
             <artifactId>axis2-java2wsdl</artifactId>
             <version>${pom.currentVersion}</version>
         </dependency>
-
-
-                <dependency>
+        <dependency>
             <groupId>axis2</groupId>
             <artifactId>axis2-codegen</artifactId>
             <version>${pom.currentVersion}</version>
@@ -68,7 +75,12 @@
             <groupId>axis2</groupId>
             <artifactId>axis2-jibx</artifactId>
             <version>${pom.currentVersion}</version>
-        </dependency>         
+        </dependency>
+        <dependency>
+            <groupId>axis2</groupId>
+            <artifactId>axis2-secpolicy</artifactId>
+            <version>${pom.currentVersion}</version>
+        </dependency>  
        <dependency>
             <groupId>axis2</groupId>
             <artifactId>axis2-xmlbeans</artifactId>

Added: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/Crypto.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/Crypto.java?rev=433237&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/Crypto.java
(added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/Crypto.java
Mon Aug 21 05:37:32 2006
@@ -0,0 +1,86 @@
+/*
+ * 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.rampart.policy.model;
+
+import org.apache.neethi.Assertion;
+import org.apache.neethi.PolicyComponent;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+import java.util.Properties;
+
+/**
+ * Policy model bean to capture crypto information.
+ * 
+ * Example:
+<pre>
+<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+    <ramp:property name="keystoreType">JKS</ramp:property>
+    <ramp:property name="keystoreFile">/path/to/file.jks</ramp:property>
+    <ramp:property name="keystorePassword">password</ramp:property>
+</ramp:crypto>
+</pre>
+ */
+public class Crypto implements Assertion {
+    
+    public final static String CRYPTO_LN = "crypto";
+    public final static String PROVIDER_ATTR = "provider";
+    public final static String PROPERTY_LN = "property";
+    public final static String PERPERTY_NAME_ATTR = "name";
+
+    private String provider;
+    private Properties prop;
+    
+    public Properties getProp() {
+        return prop;
+    }
+    public void setProp(Properties prop) {
+        this.prop = prop;
+    }
+    public String getProvider() {
+        return provider;
+    }
+    public void setProvider(String provider) {
+        this.provider = provider;
+    }
+    
+    public QName getName() {
+        return new QName(RampartConfig.NS, CRYPTO_LN);
+    }
+
+    public boolean isOptional() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+ 
+    public PolicyComponent normalize() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public short getType() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+}

Added: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/RampartConfig.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/RampartConfig.java?rev=433237&view=auto
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/RampartConfig.java
(added)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/policy/model/RampartConfig.java
Mon Aug 21 05:37:32 2006
@@ -0,0 +1,144 @@
+/*
+ * 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.rampart.policy.model;
+
+import org.apache.neethi.Assertion;
+import org.apache.neethi.PolicyComponent;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamWriter;
+
+/**
+ * Rampart policy model bean to capture Rampart configuration assertion info.
+ * 
+ * Example:
+<pre>
+    <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy"> 
+        <ramp:user>alice</ramp:user>
+        <ramp:encryptionUser>bob</ramp:encryptionUser>
+        <ramp:passwordCallbackClass>org.apache.axis2.security.PWCallback</ramp:passwordCallbackClass>
+        
+        <ramp:signatureCryto>
+            <ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+                <ramp:property name="keystoreType">JKS</ramp:property>
+                <ramp:property name="keystoreFile">/path/to/file.jks</ramp:property>
+                <ramp:property name="keystorePassword">password</ramp:property>
+            </ramp:crypto>
+        </ramp:signatureCryto>
+    </ramp:RampartConfig>
+</pre>
+ * 
+ */
+public class RampartConfig implements Assertion {
+
+    public final static String NS = "http://ws.apache.org/rampart/policy";
+    
+    public final static String RAMPART_CONFIG_LN = "RampartConfig";
+    
+    public final static String USER_LN = "user";
+    
+    public final static String ENCRYPTION_USER_LN = "encryptionUser";
+    
+    public final static String PW_CB_CLASS_LN = "passwordCallbackClass";
+    
+    public final static String SIG_CRYPTO_LN = "signatureCryto";
+    
+    public final static String ENCR_CRYPTO_LN = "encryptionCypto";
+    
+    public final static String DEC_CRYPTO_LN = "decryptionCrypto";
+    
+    private String user;
+    private String encryptionUser;
+    private String pwCbClass;
+    private Crypto sigCrypto;
+    private Crypto encrCrypto;
+    private Crypto decCrypto;
+    
+    public Crypto getDecCrypto() {
+        return decCrypto;
+    }
+
+    public void setDecCrypto(Crypto decCrypto) {
+        this.decCrypto = decCrypto;
+    }
+
+    public Crypto getEncrCrypto() {
+        return encrCrypto;
+    }
+
+    public void setEncrCrypto(Crypto encrCrypto) {
+        this.encrCrypto = encrCrypto;
+    }
+
+    public String getEncryptionUser() {
+        return encryptionUser;
+    }
+
+    public void setEncryptionUser(String encryptionUser) {
+        this.encryptionUser = encryptionUser;
+    }
+
+    public String getPwCbClass() {
+        return pwCbClass;
+    }
+
+    public void setPwCbClass(String pwCbClass) {
+        this.pwCbClass = pwCbClass;
+    }
+
+    public Crypto getSigCrypto() {
+        return sigCrypto;
+    }
+
+    public void setSigCrypto(Crypto sigCrypto) {
+        this.sigCrypto = sigCrypto;
+    }
+
+    public String getUser() {
+        return user;
+    }
+
+    public void setUser(String user) {
+        this.user = user;
+    }
+
+    public QName getName() {
+        return new QName(NS,RAMPART_CONFIG_LN);
+    }
+
+    public boolean isOptional() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public PolicyComponent normalize() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public void serialize(XMLStreamWriter writer) throws XMLStreamException {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+    public short getType() {
+        // TODO TODO
+        throw new UnsupportedOperationException("TODO");
+    }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org


Mime
View raw message