airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1384499 [3/3] - in /incubator/airavata/sandbox/airavata-rest-security: ./ modules/ modules/commons/ modules/commons/airavata-registry-rest/ modules/commons/airavata-registry-rest/src/ modules/commons/airavata-registry-rest/src/main/ module...
Date Thu, 13 Sep 2012 20:03:49 GMT
Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/airavata-security.iml
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/airavata-security.iml?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/airavata-security.iml (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/airavata-security.iml Thu Sep 13 20:03:46 2012
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module relativePaths="false" type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="false">
+    <output url="file://$MODULE_DIR$/target/classes" />
+    <output-test url="file://$MODULE_DIR$/target/test-classes" />
+    <exclude-output />
+    <content url="file://$MODULE_DIR$">
+      <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/target/maven-shared-archive-resources" isTestSource="false" />
+      <sourceFolder url="file://$MODULE_DIR$/src/test/resources" isTestSource="true" />
+      <sourceFolder url="file://$MODULE_DIR$/target/maven-shared-archive-resources" isTestSource="true" />
+      <excludeFolder url="file://$MODULE_DIR$/target/classes" />
+      <excludeFolder url="file://$MODULE_DIR$/target/generated-sources" />
+      <excludeFolder url="file://$MODULE_DIR$/target/maven-archiver" />
+      <excludeFolder url="file://$MODULE_DIR$/target/surefire" />
+      <excludeFolder url="file://$MODULE_DIR$/target/surefire-reports" />
+      <excludeFolder url="file://$MODULE_DIR$/target/test-classes" />
+    </content>
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/junit/junit/4.7/junit-4.7.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/log4j/log4j/1.2.16/log4j-1.2.16.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+    <orderEntry type="module-library">
+      <library>
+        <CLASSES>
+          <root url="jar://$MAVEN_REPOSITORY$/org/slf4j/slf4j-simple/1.6.1/slf4j-simple-1.6.1.jar!/" />
+        </CLASSES>
+        <JAVADOC />
+        <SOURCES />
+      </library>
+    </orderEntry>
+  </component>
+</module>
+

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/pom.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/pom.xml?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/pom.xml (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/pom.xml Thu Sep 13 20:03:46 2012
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file 
+    distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <groupId>org.apache.airavata</groupId>
+        <artifactId>airavata</artifactId>
+        <version>0.5-incubating-SNAPSHOT</version>
+        <relativePath>../../pom.xml</relativePath>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>airavata-security</artifactId>
+    <name>Airavata Security Implementation</name>
+    <description>Module for managing security features in Airavata</description>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-api</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>log4j</groupId>
+            <artifactId>log4j</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <version>4.7</version>
+        </dependency>
+        <dependency>
+            <groupId>org.slf4j</groupId>
+            <artifactId>slf4j-simple</artifactId>
+        </dependency>
+    </dependencies>
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${surefire.version}</version>
+                <configuration>
+                    <testSourceDirectory>${basedir}\src\test\java\</testSourceDirectory>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractAuthenticator.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractAuthenticator.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractAuthenticator.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,110 @@
+package org.apache.airavata.security;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.text.SimpleDateFormat;
+import java.util.Calendar;
+
+/**
+ * An abstract implementation of the authenticator.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public abstract class AbstractAuthenticator implements Authenticator {
+
+    protected static final String DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
+
+    protected static Logger log = LoggerFactory.getLogger(AbstractAuthenticator.class);
+
+    public static int DEFAULT_AUTHENTICATOR_PRIORITY = 5;
+
+    protected String authenticatorName;
+
+    private int priority = DEFAULT_AUTHENTICATOR_PRIORITY;
+
+    protected boolean enabled = true;
+
+    public AbstractAuthenticator() {
+
+    }
+
+    public AbstractAuthenticator(String name) {
+        this.authenticatorName = name;
+    }
+
+    public int getPriority() {
+        return priority;
+    }
+
+    public boolean canProcess(Object credentials) {
+        return false;
+    }
+
+    public String getAuthenticatorName() {
+        return authenticatorName;
+    }
+
+    public void setAuthenticatorName(String authenticatorName) {
+        this.authenticatorName = authenticatorName;
+    }
+
+    public void setPriority(int priority) {
+        this.priority = priority;
+    }
+
+    public void setEnabled(boolean enabled) {
+        this.enabled = enabled;
+    }
+
+    public boolean isEnabled() {
+        return enabled;
+    }
+
+    public boolean authenticate(Object credentials) throws AuthenticationException {
+
+        boolean authenticated = doAuthentication(credentials);
+
+        if (authenticated) {
+            onSuccessfulAuthentication(credentials);
+        } else {
+            onFailedAuthentication(credentials);
+        }
+
+        return authenticated;
+    }
+
+
+    /**
+     * Gets the current time converted to format in DATE_TIME_FORMAT.
+     * @return Current time as a string.
+     */
+    protected String getCurrentTime() {
+        Calendar cal = Calendar.getInstance();
+        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(DATE_TIME_FORMAT);
+        return simpleDateFormat.format(cal.getTime());
+    }
+
+    /**
+     * The actual authenticating logic goes here. If user is successfully authenticated this should return
+     * <code>true</code> else this should return <code>false</code>. If an error occurred while authenticating
+     * this will throw an exception.
+     * @param credentials The object which contains request credentials. This could be request most of the time.
+     * @return <code>true</code> if successfully authenticated else <code>false</code>.
+     * @throws AuthenticationException If system error occurs while authenticating.
+     */
+    protected abstract boolean doAuthentication(Object credentials) throws AuthenticationException;
+
+    /**
+     * If authentication is successful we can do post authentication actions in following method.
+     * E.g :- adding user to session, audit logging etc ...
+     * @param authenticationInfo A generic object with authentication information.
+     */
+    public abstract void onSuccessfulAuthentication(Object authenticationInfo);
+
+    /**
+     * If authentication is failed we can do post authentication actions in following method.
+     * E.g :- adding user to session, audit logging etc ...
+     * @param authenticationInfo A generic object with authentication information.
+     */
+    public abstract void onFailedAuthentication(Object authenticationInfo);
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractDatabaseAuthenticator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractDatabaseAuthenticator.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractDatabaseAuthenticator.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AbstractDatabaseAuthenticator.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,105 @@
+package org.apache.airavata.security;
+
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * An abstract authenticator class which reads database configurations.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public abstract class AbstractDatabaseAuthenticator extends AbstractAuthenticator {
+
+    private String databaseURL;
+
+    private String databaseDriver;
+
+    private String databaseUserName;
+
+    private String databasePassword;
+
+    public AbstractDatabaseAuthenticator() {
+        super();
+    }
+
+    public AbstractDatabaseAuthenticator(String name) {
+        super(name);
+    }
+
+    /**
+     * We are reading database parameters in this case.
+     *
+     * @param node An XML configuration node.
+     */
+    public void configure(Node node) {
+
+        /**
+         <specificConfigurations>
+         <database>
+         <jdbcUrl></jdbcUrl>
+         <databaseDriver></databaseDriver>
+         <userName></userName>
+         <password></password>
+         </database>
+         </specificConfigurations>
+         */
+
+        NodeList databaseNodeList = node.getChildNodes();
+
+        Node databaseNode = null;
+
+        for (int k = 0; k < databaseNodeList.getLength(); ++k) {
+
+            Node n = databaseNodeList.item(k);
+
+            if (n != null && n.getNodeType() == Node.ELEMENT_NODE) {
+                databaseNode = n;
+            }
+        }
+
+        if (databaseNode != null) {
+            NodeList nodeList = databaseNode.getChildNodes();
+
+            for (int i = 0; i < nodeList.getLength(); ++i) {
+                Node n = nodeList.item(i);
+
+                if (n.getNodeType() == Node.ELEMENT_NODE) {
+
+                    Element element = (Element) n;
+
+                    if (element.getNodeName().equals("jdbcUrl")) {
+                        databaseURL = element.getFirstChild().getNodeValue();
+                    } else if (element.getNodeName().equals("databaseDriver")) {
+                        databaseDriver = element.getFirstChild().getNodeValue();
+                    } else if (element.getNodeName().equals("userName")) {
+                        databaseUserName = element.getFirstChild().getNodeValue();
+                    } else if (element.getNodeName().equals("password")) {
+                        databasePassword = element.getFirstChild().getNodeValue();
+                    }
+                }
+            }
+        }
+
+        StringBuilder stringBuilder = new StringBuilder("Configuring DB parameters for authenticator with JDBC URL - ");
+        stringBuilder.append(databaseURL).append(" DB driver - ").append(" DB user - ").
+                append(databaseUserName).append(" DB password - xxxxxx");
+
+        log.info(stringBuilder.toString());
+    }
+
+    public String getDatabaseURL() {
+        return databaseURL;
+    }
+
+    public String getDatabaseDriver() {
+        return databaseDriver;
+    }
+
+    public String getDatabaseUserName() {
+        return databaseUserName;
+    }
+
+    public String getDatabasePassword() {
+        return databasePassword;
+    }
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticationException.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticationException.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticationException.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticationException.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,22 @@
+package org.apache.airavata.security;
+
+/**
+ * Wraps errors during authentication. This exception will be thrown if there is a system error during authentication.
+ */
+public class AuthenticationException extends Exception {
+
+
+    public AuthenticationException() {
+        super();
+    }
+
+    public AuthenticationException (String message) {
+        super(message);
+    }
+
+    public AuthenticationException (String message, Exception e) {
+        super(message, e);
+    }
+
+
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authenticator.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authenticator.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authenticator.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authenticator.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,58 @@
+package org.apache.airavata.security;
+
+import org.w3c.dom.Node;
+
+/**
+ * A generic interface to do request authentication. Specific authenticator will implement authenticate method.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public interface Authenticator {
+
+    /**
+     * Authenticates the request with given credentials.
+     * @param credentials Credentials can be a session ticket, password or session id.
+     * @return <code>true</code> if request is successfully authenticated else <code>false</code>.
+     * @throws AuthenticationException If a system error occurred during authentication process.
+     */
+    boolean authenticate(Object credentials) throws AuthenticationException;
+
+    /**
+     * Checks whether given user is already authenticated.
+     * @param credentials The token to be authenticated.
+     * @return <code>true</code> if token is already authenticated else <code>false</code>.
+     */
+    boolean isAuthenticated(Object credentials);
+
+    /**
+     * Says whether current authenticator can handle given credentials.
+     * @param credentials Credentials used during authentication.
+     * @return <code>true</code> is can authenticate else <code>false</code>.
+     */
+    boolean canProcess(Object credentials);
+
+    /**
+     * Gets the priority of this authenticator.
+     * @return Higher the priority higher the precedence of selecting the authenticator.
+     */
+    int getPriority();
+
+    /**
+     * Returns the authenticator name. Each authenticator is associated with an identifiable name.
+     * @return The authenticator name.
+     */
+    String getAuthenticatorName();
+
+    /**
+     * Authenticator specific configurations goes into this method.
+     * @param node An XML configuration node.
+     * @throws RuntimeException If an error occurred while configuring the authenticator.
+     */
+    void configure(Node node) throws RuntimeException;
+
+    /**
+     * Return <code>true</code> if current authenticator is enabled. Else <code>false</code>.
+     * @return <code>true</code> if enabled.
+     */
+    boolean isEnabled();
+
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticatorConfiguration.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticatorConfiguration.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticatorConfiguration.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/AuthenticatorConfiguration.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,18 @@
+package org.apache.airavata.security;
+
+/**
+ * An interface class define authenticator configurations. Based on the mechanism we need
+ * to implement this interface to get the proper configuration.
+ */
+public interface AuthenticatorConfiguration {
+
+    /**
+     * Load configurations from a file or some other place.
+     */
+    void load ();
+
+    /**
+     * Serialize configurations.
+     */
+    void serialize();
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authoriser.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authoriser.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authoriser.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/Authoriser.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,18 @@
+package org.apache.airavata.security;
+
+/**
+ * An interface which can be used to authorise accessing resources.
+ */
+@SuppressWarnings("UnusedDeclaration")
+public interface Authoriser {
+
+    /**
+     * Checks whether user has sufficient privileges to perform action on the given resource.
+     * @param userName  The user who is performing the action.
+     * @param resource The resource which user is trying to access.
+     * @param action  The action (GET, PUT etc ...)
+     * @return Returns <code>true</code> if user is authorised to perform the action, else false.
+     */
+    boolean isAuthorised (String userName, String resource, String action);
+
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AbstractAuthenticatorConfigurations.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AbstractAuthenticatorConfigurations.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AbstractAuthenticatorConfigurations.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AbstractAuthenticatorConfigurations.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,30 @@
+package org.apache.airavata.security.configurations;
+
+import org.apache.airavata.security.AuthenticatorConfiguration;
+
+/**
+ * An abstract implementation of Authenticator configurations.
+ * An authenticator configurations will have two types of configurations.
+ * <ol>
+ *     <li>Configurations common to all authenticators. This includes configurations such as authenticator name,
+ *     the priority, whether authenticator is enabled or not.</li>
+ *     <li>Configurations which are specific to a particular authenticator.</li>
+ * </ol>
+ */
+public abstract class AbstractAuthenticatorConfigurations implements AuthenticatorConfiguration {
+
+    private String authenticatorName;
+
+    private String authenticatorClassName;
+
+    private boolean isEnabled;
+
+    private int authenticatorPriority;
+
+    public AbstractAuthenticatorConfigurations() {
+
+    }
+
+
+
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReader.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReader.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReader.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/main/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReader.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,166 @@
+package org.apache.airavata.security.configurations;
+
+import org.apache.airavata.security.AbstractAuthenticator;
+import org.apache.airavata.security.Authenticator;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.w3c.dom.Document;
+import org.w3c.dom.NamedNodeMap;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+import org.xml.sax.SAXException;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.parsers.ParserConfigurationException;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+
+/**
+ * This class will read authenticators.xml and load all configurations related to authenticators.
+ */
+public class AuthenticatorConfigurationReader {
+
+    private List<Authenticator> authenticatorList = new ArrayList<Authenticator>();
+
+    protected static Logger log = LoggerFactory.getLogger(AuthenticatorConfigurationReader.class);
+
+    public AuthenticatorConfigurationReader() {
+
+    }
+
+    public void init(String fileName) throws IOException, SAXException, ParserConfigurationException {
+
+        File configurationFile = new File(fileName);
+
+        if (!configurationFile.canRead()) {
+            throw new IOException("Error reading configuration file " + configurationFile.getAbsolutePath());
+        }
+
+        FileInputStream streamIn = new FileInputStream(configurationFile);
+
+        try {
+            init(streamIn);
+        } finally {
+            streamIn.close();
+        }
+    }
+
+    public void init(InputStream inputStream) throws IOException, ParserConfigurationException, SAXException {
+
+        DocumentBuilderFactory dbFactory = DocumentBuilderFactory.newInstance();
+        DocumentBuilder dBuilder = dbFactory.newDocumentBuilder();
+        Document doc = dBuilder.parse(inputStream);
+        doc.getDocumentElement().normalize();
+
+        NodeList authenticators = doc.getElementsByTagName("authenticator");
+
+        for (int i = 0; i < authenticators.getLength(); ++i) {
+            Node node = authenticators.item(i);
+
+            if (node.getNodeType() == Node.ELEMENT_NODE) {
+
+                NamedNodeMap namedNodeMap = node.getAttributes();
+
+                String name = namedNodeMap.getNamedItem("name").getNodeValue();
+                String className = namedNodeMap.getNamedItem("class").getNodeValue();
+                String enabled = namedNodeMap.getNamedItem("enabled").getNodeValue();
+                String priority = namedNodeMap.getNamedItem("priority").getNodeValue();
+
+                Authenticator authenticator = createAuthenticator(name, className, enabled, priority);
+
+                NodeList configurationNodes = node.getChildNodes();
+
+                for (int j = 0; j < configurationNodes.getLength(); ++j) {
+
+                    Node configurationNode = configurationNodes.item(j);
+
+                    if (configurationNode.getNodeType() == Node.ELEMENT_NODE) {
+
+                        if (configurationNode.getNodeName().equals("specificConfigurations")) {
+                            authenticator.configure(configurationNode);
+                        }
+                    }
+                }
+
+                if (authenticator.isEnabled()) {
+                    authenticatorList.add(authenticator);
+                }
+
+                Collections.sort(authenticatorList, new AuthenticatorComparator());
+
+                StringBuilder stringBuilder = new StringBuilder("Successfully initialized authenticator ");
+                stringBuilder.append(name).append(" with class ").append(className).append(" enabled? ").append(enabled)
+                        .append(" priority = ").append(priority);
+
+                log.info(stringBuilder.toString());
+            }
+        }
+    }
+
+    protected Authenticator createAuthenticator(String name, String className, String enabled, String priority) {
+
+        log.info("Loading authenticator class " + className + " and name " + name);
+
+        // Load a class and instantiate an object
+        Class authenticatorClass;
+        try {
+            authenticatorClass = Class.forName(className, true, Thread.currentThread().getContextClassLoader());
+            //authenticatorClass = Class.forName(className);
+        } catch (ClassNotFoundException e) {
+            log.error("Error loading authenticator class " + className);
+            throw new RuntimeException("Error loading authenticator class " + className, e);
+
+        }
+
+        try {
+            AbstractAuthenticator authenticatorInstance = (AbstractAuthenticator) authenticatorClass.newInstance();
+            authenticatorInstance.setAuthenticatorName(name);
+
+            if (enabled != null) {
+                authenticatorInstance.setEnabled(Boolean.parseBoolean(enabled));
+            }
+
+            if (priority != null) {
+                authenticatorInstance.setPriority(Integer.parseInt(priority));
+            }
+
+            return authenticatorInstance;
+
+        } catch (InstantiationException e) {
+            String error = "Error instantiating authenticator class " + className + " object.";
+            log.error(error);
+            throw new RuntimeException(error, e);
+
+        } catch (IllegalAccessException e) {
+            String error = "Not allowed to instantiate authenticator class " + className;
+            log.error(error);
+            throw new RuntimeException(error, e);
+        }
+
+    }
+
+    public List<Authenticator> getAuthenticatorList() {
+        return Collections.unmodifiableList(authenticatorList);
+    }
+
+
+    /**
+     * Comparator to sort authenticators based on authenticator priority.
+     */
+    public class AuthenticatorComparator implements Comparator<Authenticator> {
+
+        @Override
+        public int compare(Authenticator o1, Authenticator o2) {
+            return (o1.getPriority() > o2.getPriority() ? -1 : (o1.getPriority() == o2.getPriority() ? 0 : 1));
+        }
+    }
+
+
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReaderTest.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReaderTest.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReaderTest.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReaderTest.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,73 @@
+package org.apache.airavata.security.configurations;
+
+import junit.framework.TestCase;
+import org.apache.airavata.security.Authenticator;
+
+import java.io.File;
+import java.util.List;
+
+/**
+ * A test class for authenticator configuration reader.
+ * Reads the authenticators.xml in resources directory.
+ */
+public class AuthenticatorConfigurationReaderTest extends TestCase {
+
+    private String configurationFile = this.getClass().getClassLoader().getResource("authenticators.xml").getFile();
+
+    public void setUp() throws Exception {
+
+        File f = new File(".");
+        System.out.println(f.getAbsolutePath());
+
+        File file = new File(configurationFile);
+
+        if (!file.exists() && !file.canRead()) {
+            throw new Exception("Error reading configuration file " + configurationFile);
+
+        }
+    }
+
+    public void testInit() throws Exception {
+
+        AuthenticatorConfigurationReader authenticatorConfigurationReader
+                = new AuthenticatorConfigurationReader();
+        authenticatorConfigurationReader.init(configurationFile);
+
+        List<Authenticator> authenticators = authenticatorConfigurationReader.getAuthenticatorList();
+
+        assertEquals(authenticators.size(), 3);
+
+        for (Authenticator authenticator : authenticators) {
+            if (authenticator instanceof TestDBAuthenticator1) {
+                assertEquals("dbAuthenticator1", authenticator.getAuthenticatorName());
+                assertEquals(6, authenticator.getPriority());
+                assertEquals(true, authenticator.isEnabled());
+                assertEquals("jdbc:sql:thin:@//myhost:1521/mysql1", ((TestDBAuthenticator1) authenticator).getDatabaseURL());
+                assertEquals("org.myqsql.Driver1", ((TestDBAuthenticator1) authenticator).getDatabaseDriver());
+                assertEquals("mysql1", ((TestDBAuthenticator1) authenticator).getDatabaseUserName());
+                assertEquals("secret1", ((TestDBAuthenticator1) authenticator).getDatabasePassword());
+            } else if (authenticator instanceof TestDBAuthenticator2) {
+                assertEquals("dbAuthenticator2", authenticator.getAuthenticatorName());
+                assertEquals(7, authenticator.getPriority());
+                assertEquals(true, authenticator.isEnabled());
+                assertEquals("jdbc:sql:thin:@//myhost:1521/mysql2", ((TestDBAuthenticator2) authenticator).getDatabaseURL());
+                assertEquals("org.myqsql.Driver2", ((TestDBAuthenticator2) authenticator).getDatabaseDriver());
+                assertEquals("mysql2", ((TestDBAuthenticator2) authenticator).getDatabaseUserName());
+                assertEquals("secret2", ((TestDBAuthenticator2) authenticator).getDatabasePassword());
+            }  else if (authenticator instanceof TestDBAuthenticator3) {
+                assertEquals("dbAuthenticator3", authenticator.getAuthenticatorName());
+                assertEquals(8, authenticator.getPriority());
+                assertEquals(true, authenticator.isEnabled());
+                assertEquals("jdbc:sql:thin:@//myhost:1521/mysql3", ((TestDBAuthenticator3) authenticator).getDatabaseURL());
+                assertEquals("org.myqsql.Driver3", ((TestDBAuthenticator3) authenticator).getDatabaseDriver());
+                assertEquals("mysql3", ((TestDBAuthenticator3) authenticator).getDatabaseUserName());
+                assertEquals("secret3", ((TestDBAuthenticator3) authenticator).getDatabasePassword());
+            }
+        }
+
+        assertEquals(8, authenticators.get(0).getPriority());
+        assertEquals(7, authenticators.get(1).getPriority());
+        assertEquals(6, authenticators.get(2).getPriority());
+
+    }
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator1.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator1.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator1.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator1.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,37 @@
+package org.apache.airavata.security.configurations;
+
+import org.apache.airavata.security.AbstractDatabaseAuthenticator;
+import org.apache.airavata.security.AuthenticationException;
+
+public class TestDBAuthenticator1 extends AbstractDatabaseAuthenticator {
+
+    public TestDBAuthenticator1() {
+        super();
+    }
+
+    @Override
+    public void onSuccessfulAuthentication(Object authenticationInfo) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public void onFailedAuthentication(Object authenticationInfo) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean authenticate(Object credentials) throws AuthenticationException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    protected boolean doAuthentication(Object credentials) throws AuthenticationException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean isAuthenticated(Object credentials) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+}
+

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator2.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator2.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator2.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator2.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,43 @@
+package org.apache.airavata.security.configurations;
+
+import org.apache.airavata.security.AbstractDatabaseAuthenticator;
+import org.apache.airavata.security.AuthenticationException;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: thejaka
+ * Date: 9/6/12
+ * Time: 6:30 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class TestDBAuthenticator2 extends AbstractDatabaseAuthenticator {
+
+    public TestDBAuthenticator2() {
+        super();
+    }
+
+    @Override
+    public void onSuccessfulAuthentication(Object authenticationInfo) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public void onFailedAuthentication(Object authenticationInfo) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean authenticate(Object credentials) throws AuthenticationException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    protected boolean doAuthentication(Object credentials) throws AuthenticationException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean isAuthenticated(Object credentials) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator3.java
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator3.java?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator3.java (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator3.java Thu Sep 13 20:03:46 2012
@@ -0,0 +1,43 @@
+package org.apache.airavata.security.configurations;
+
+import org.apache.airavata.security.AbstractDatabaseAuthenticator;
+import org.apache.airavata.security.AuthenticationException;
+
+/**
+ * Created with IntelliJ IDEA.
+ * User: thejaka
+ * Date: 9/6/12
+ * Time: 6:30 PM
+ * To change this template use File | Settings | File Templates.
+ */
+public class TestDBAuthenticator3 extends AbstractDatabaseAuthenticator {
+
+    public TestDBAuthenticator3() {
+        super();
+    }
+
+    @Override
+    public void onSuccessfulAuthentication(Object authenticationInfo) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public void onFailedAuthentication(Object authenticationInfo) {
+        //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean authenticate(Object credentials) throws AuthenticationException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    protected boolean doAuthentication(Object credentials) throws AuthenticationException {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+
+    @Override
+    public boolean isAuthenticated(Object credentials) {
+        return false;  //To change body of implemented methods use File | Settings | File Templates.
+    }
+}

Added: incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/resources/authenticators.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/resources/authenticators.xml?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/resources/authenticators.xml (added)
+++ incubator/airavata/sandbox/airavata-rest-security/modules/security/src/test/resources/authenticators.xml Thu Sep 13 20:03:46 2012
@@ -0,0 +1,68 @@
+<?xml version="1.0"?>
+
+<!--
+This file contains a sample authenticator configuration. We can define all authenticators in this file. Each authenticator
+configuration has to start with tag "authenticator". The name is the name given to the authenticator. The actual
+authenticator implementation is implemented in the class. There are configurations specific to authenticators.
+Those configurations are reside inside &lt;specificConfigurations&gt; tags.
+-->
+
+<authenticators>
+    <authenticator name="dbAuthenticator1" class="org.apache.airavata.security.configurations.TestDBAuthenticator1" enabled="true" priority="6">
+        <specificConfigurations>
+            <database>
+                <jdbcUrl>jdbc:sql:thin:@//myhost:1521/mysql1</jdbcUrl>
+                <userName>mysql1</userName>
+                <password>secret1</password>
+                <databaseDriver>org.myqsql.Driver1</databaseDriver>
+                <sessionTable>Session1</sessionTable>
+                <sessionColumn>sessioncolumn</sessionColumn>
+                <comparingColumn>comparecolumn</comparingColumn>
+                <!-- TODO add datasource.name></datasource.name -->
+            </database>
+        </specificConfigurations>
+    </authenticator>
+
+    <authenticator name="dbAuthenticator2" class="org.apache.airavata.security.configurations.TestDBAuthenticator2" enabled="true" priority="7">
+        <specificConfigurations>
+            <database>
+                <jdbcUrl>jdbc:sql:thin:@//myhost:1521/mysql2</jdbcUrl>
+                <userName>mysql2</userName>
+                <password>secret2</password>
+                <databaseDriver>org.myqsql.Driver2</databaseDriver>
+                <sessionTable>Session2</sessionTable>
+                <sessionColumn>sessioncolumn2</sessionColumn>
+                <comparingColumn>comparecolumn2</comparingColumn>
+            </database>
+        </specificConfigurations>
+    </authenticator>
+
+    <authenticator name="dbAuthenticator4" class="org.apache.airavata.security.configurations.TestDBAuthenticator2" enabled="false" priority="7">
+        <specificConfigurations>
+            <database>
+                <jdbcUrl>jdbc:sql:thin:@//myhost:1521/mysql2</jdbcUrl>
+                <userName>mysql2</userName>
+                <password>secret2</password>
+                <databaseDriver>org.myqsql.Driver2</databaseDriver>
+                <sessionTable>Session2</sessionTable>
+                <sessionColumn>sessioncolumn2</sessionColumn>
+                <comparingColumn>comparecolumn2</comparingColumn>
+            </database>
+        </specificConfigurations>
+    </authenticator>
+
+    <authenticator name="dbAuthenticator3" class="org.apache.airavata.security.configurations.TestDBAuthenticator3" enabled="true" priority="8">
+        <specificConfigurations>
+            <database>
+                <jdbcUrl>jdbc:sql:thin:@//myhost:1521/mysql3</jdbcUrl>
+                <userName>mysql3</userName>
+                <password>secret3</password>
+                <databaseDriver>org.myqsql.Driver3</databaseDriver>
+                <sessionTable>Session3</sessionTable>
+                <sessionColumn>sessioncolumn3</sessionColumn>
+                <comparingColumn>comparecolumn3</comparingColumn>
+            </database>
+        </specificConfigurations>
+    </authenticator>
+
+</authenticators>
\ No newline at end of file

Added: incubator/airavata/sandbox/airavata-rest-security/pom.xml
URL: http://svn.apache.org/viewvc/incubator/airavata/sandbox/airavata-rest-security/pom.xml?rev=1384499&view=auto
==============================================================================
--- incubator/airavata/sandbox/airavata-rest-security/pom.xml (added)
+++ incubator/airavata/sandbox/airavata-rest-security/pom.xml Thu Sep 13 20:03:46 2012
@@ -0,0 +1,630 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file 
+    distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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 xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <prerequisites>
+        <maven>3.0</maven>
+    </prerequisites>
+
+    <parent>
+        <groupId>org.apache</groupId>
+        <artifactId>apache</artifactId>
+        <version>10</version>
+        <relativePath />
+    </parent>
+
+    <groupId>org.apache.airavata</groupId>
+    <artifactId>airavata</artifactId>
+    <packaging>pom</packaging>
+    <name>Airavata</name>
+    <version>0.5-incubating-SNAPSHOT</version>
+
+    <url>http://incubator.apache.org/airavata/</url>
+    <inceptionYear>2011</inceptionYear>
+
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/airavata/trunk</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/incubator/airavata/trunk</developerConnection>
+        <url>http://svn.apache.org/viewvc/incubator/airavata/trunk/</url>
+    </scm>
+
+    <mailingLists>
+        <mailingList>
+            <name>Airavata Developer List</name>
+            <subscribe>airavata-dev-subscribe@incubator.apache.org</subscribe>
+            <unsubscribe>airavata-dev-unsubscribe@incubator.apache.org</unsubscribe>
+            <post>mailto:airavata-dev@incubator.apache.org</post>
+            <archive>http://mail-archives.apache.org/mod_mbox/incubator-airavata-dev/</archive>
+        </mailingList>
+    </mailingLists>
+
+    <issueManagement>
+        <url>https://issues.apache.org/jira/browse/AIRAVATA</url>
+    </issueManagement>
+
+    <properties>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+        <axis2.version>1.5.1</axis2.version>
+        <derby.version>10.7.1.1</derby.version>
+        <jackrabbit.version>2.2.7</jackrabbit.version>
+        <logback.version>0.9.20</logback.version>
+        <org.slf4j.version>1.6.1</org.slf4j.version>
+        <log4j.version>1.2.16</log4j.version>
+        <axiom.version>1.2.8</axiom.version>
+        <surefire.version>2.12</surefire.version>
+        <jcr.version>2.0</jcr.version>
+        <xmlbeans.version>2.5.0</xmlbeans.version>
+        <xpp3.version>1.1.3_7</xpp3.version>
+        <skipTests>false</skipTests>
+    </properties>
+
+    <developers>
+        <developer>
+            <id>chinthaka</id>
+            <name>Eran Chinthaka</name>
+            <email>chinthaka@apache.org</email>
+            <timezone>-8</timezone>
+            <organization>Nextag</organization>
+            <organizationUrl>http://www.nextag.com/</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>ate</id>
+            <name>Ate Douma</name>
+            <email>ate@douma.nu</email>
+            <timezone>+1</timezone>
+            <organization>Hippo</organization>
+            <organizationUrl>http://www.onehippo.com</organizationUrl>
+            <roles>
+                <role>mentor</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>rgardler</id>
+            <name>Ross Gardler</name>
+            <email>rgardler@apache.org</email>
+            <organization>OpenDirective</organization>
+            <organizationUrl>http://www.opendirective.com/</organizationUrl>
+            <roles>
+                <role>champion</role>
+                <role>mentor</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>lahiru</id>
+            <name>Lahiru Gunathilake</name>
+            <email>glahiru@gmail.com</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>thilina</id>
+            <name>Thilina Gunaratne</name>
+            <email>thilina@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>barbara</id>
+            <name>Barbara Hallock</name>
+            <email>bahalloc@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>chathura</id>
+            <name>Chathura Herath</name>
+            <email>chathura@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Knight Capital Group</organization>
+            <organizationUrl>http://www.knight.com</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>chris</id>
+            <name>Chris Mattmann</name>
+            <email>chris.a.mattmann@jpl.nasa.gov</email>
+            <timezone>-5</timezone>
+            <organization>NASA JPL</organization>
+            <organizationUrl>http://www.jpl.nasa.gov/</organizationUrl>
+            <roles>
+                <role>mentor</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>smarru</id>
+            <name>Suresh Marru</name>
+            <email>smarru@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+                <role>release manager</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>hemapani</id>
+            <name>Srinath Perera</name>
+            <email>hemapani@apache.org</email>
+            <timezone>+1</timezone>
+            <organization>Lanka Software Foundation</organization>
+            <organizationUrl>http://opensource.lk</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>mpierce</id>
+            <name>Marlon Pierce</name>
+            <email>mpierce@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>raminder</id>
+            <name>Raminderjeet Singh</name>
+            <email>ramifnu@indiana.edu</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>aslom</id>
+            <name>Aleksander Slominski</name>
+            <email>aslom@us.ibm.com</email>
+            <timezone>-5</timezone>
+            <organization>IBM</organization>
+            <organizationUrl>http://www.ibm.com/us/en/</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>mentor</role>
+                <role>PPMC member</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>heshan</id>
+            <name>Heshan Suriyarachchi</name>
+            <email>heshan@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>patanachai</id>
+            <name>Patanachai Tangchaisin</name>
+            <email>patanachai@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Nextag</organization>
+            <organizationUrl>http://www.nextag.com/</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <name>Sanjiva Weerawarana</name>
+            <id>sanjiva</id>
+            <email>sanjiva@wso2.com</email>
+            <organization>WSO2</organization>
+            <roles>
+                <role>mentor</role>
+                <role>IPMC member</role>
+            </roles>
+        </developer>
+        <developer>
+            <id>saminda</id>
+            <name>Saminda Wijeratne</name>
+            <email>samindaw@apache.org</email>
+            <timezone>-5</timezone>
+            <organization>Indiana University</organization>
+            <organizationUrl>http://www.iub.edu</organizationUrl>
+            <roles>
+                <role>committer</role>
+                <role>PPMC member</role>
+            </roles>
+        </developer>
+    </developers>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-api</artifactId>
+                <version>${org.slf4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>log4j</groupId>
+                <artifactId>log4j</artifactId>
+                <version>${log4j.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>junit</groupId>
+                <artifactId>junit</artifactId>
+                <version>4.7</version>
+            </dependency>
+            <dependency>
+                <groupId>org.slf4j</groupId>
+                <artifactId>slf4j-simple</artifactId>
+                <version>${org.slf4j.version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+    <repositories>
+        <repository>
+            <id>central</id>
+            <name>Maven Central</name>
+            <url>http://repo1.maven.org/maven2</url>
+            <releases>
+                <enabled>true</enabled>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <name>ogce.m2.all</name>
+            <id>ogce.m2.all</id>
+            <url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
+            <snapshots>
+                <!--updatePolicy>daily</updatePolicy -->
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>m2-snapshot-repository</id>
+            <url>http://people.apache.org/repo/m2-snapshot-repository</url>
+            <releases>
+            </releases>
+            <snapshots>
+                <enabled>false</enabled>
+            </snapshots>
+        </repository>
+        <repository>
+            <id>OW2</id>
+            <name>OW2 Repository</name>
+            <url>http://maven.ow2.org/maven2</url>
+        </repository>
+    </repositories>
+    <profiles>
+        <profile>
+            <id>profile-test-suite</id>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>test-suite</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/test-suite</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>profile-gfac</id>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>gfac</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/gfac-core</module>
+                <module>modules/gfac-axis2</module>
+                <module>modules/commons</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>profile-wsmessaging</id>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>wsmessaging</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/ws-messenger</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>profile-workflow-interpreter</id>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>workflow-interpreter</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/commons</module>
+                <module>modules/ws-messenger</module>
+                <module>modules/workflow-model</module>
+                <module>modules/xbaya-gui</module>
+                <module>modules/workflow-interpreter</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>profile-workflow-tracking</id>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>workflow-tracking</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/commons</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>profile-xbaya</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>2.3.2</version>
+                        <configuration>
+                            <source>1.6</source>
+                            <target>1.6</target>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>xbaya</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/commons</module>
+                <module>modules/ws-messenger</module>
+                <module>modules/workflow-model</module>
+                <module>modules/xbaya-gui</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>profile-airavata-client</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>2.3.2</version>
+                        <configuration>
+                            <source>1.6</source>
+                            <target>1.6</target>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>airavata-client</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/commons</module>
+                <module>modules/ws-messenger</module>
+                <module>modules/workflow-model</module>
+                <module>modules/xbaya-gui</module>
+                <module>modules/airavata-client</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>profile-registry-api</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>2.3.2</version>
+                        <configuration>
+                            <source>1.6</source>
+                            <target>1.6</target>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>registry-api</value>
+                </property>
+            </activation>
+            <modules>
+                <module>modules/commons/gfac-schema</module>
+                <module>modules/commons/utils</module>
+                <module>modules/commons/common-registry-api</module>
+                <module>modules/commons/registry-api</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>profile-samples</id>
+            <activation>
+                <property>
+                    <name>module</name>
+                    <value>samples</value>
+                </property>
+            </activation>
+            <modules>
+                <module>samples/simple-math-service</module>
+                <module>samples/complex-math-service</module>
+                <module>samples/levenshtein-distance-service</module>
+            </modules>
+        </profile>
+
+        <profile>
+            <id>default</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-remote-resources-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <goals>
+                                    <goal>process</goal>
+                                </goals>
+                                <configuration>
+                                    <!-- add apache-incubator-disclaimer-resource-bundle to be removed again when graduating from Incubator -->
+                                    <resourceBundles combine.children="append">
+                                        <resourceBundle>org.apache:apache-incubator-disclaimer-resource-bundle:1.1</resourceBundle>
+                                    </resourceBundles>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <artifactId>maven-resources-plugin</artifactId>
+                        <version>2.5</version>
+                        <executions>
+                            <execution>
+                                <id>copy-resources</id>
+                                <!-- here the phase you need -->
+                                <phase>validate</phase>
+                                <goals>
+                                    <goal>copy-resources</goal>
+                                </goals>
+                                <configuration>
+                                    <outputDirectory>${basedir}/target/classes/META-INF</outputDirectory>
+                                    <resources>
+                                        <resource>
+                                            <directory>${basedir}/src/main/assembly/dist</directory>
+                                            <filtering>true</filtering>
+                                        </resource>
+                                    </resources>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>2.3.2</version>
+                        <configuration>
+                            <source>1.6</source>
+                            <target>1.6</target>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-surefire-plugin</artifactId>
+                        <version>${surefire.version}</version>
+                        <configuration>
+                            <skipTests>${skipTests}</skipTests>
+                            <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
+                        </configuration>
+                    </plugin>
+                </plugins>
+            </build>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>modules/security</module>
+                <module>modules/commons</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>pedantic</id>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-compiler-plugin</artifactId>
+                        <version>2.3.2</version>
+                        <configuration>
+                            <source>1.6</source>
+                            <target>1.6</target>
+                        </configuration>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.rat</groupId>
+                        <artifactId>apache-rat-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <phase>verify</phase>
+                                <goals>
+                                    <goal>check</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
+    <reporting>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-javadoc-plugin</artifactId>
+                <version>2.8.1</version>
+                <configuration>
+                    <aggregate>true</aggregate>
+                    <quiet>true</quiet>
+                </configuration>
+            </plugin>
+        </plugins>
+    </reporting>
+
+</project>



Mime
View raw message