You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by am...@apache.org on 2013/07/13 02:49:16 UTC

svn commit: r1502732 [2/8] - in /airavata/trunk: ./ jglobus-repo/ jglobus-repo/repository/ jglobus-repo/repository/org/ jglobus-repo/repository/org/jglobus/ jglobus-repo/repository/org/jglobus/axisg/ jglobus-repo/repository/org/jglobus/axisg/2.0.6-rc2/...

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/2.0.6-rc2/jsse-2.0.6-rc2.pom
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/2.0.6-rc2/jsse-2.0.6-rc2.pom?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/2.0.6-rc2/jsse-2.0.6-rc2.pom (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/2.0.6-rc2/jsse-2.0.6-rc2.pom Sat Jul 13 00:49:09 2013
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+    <artifactId>jglobus-all</artifactId>
+    <groupId>org.jglobus</groupId>
+    <version>2.0.6-rc2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>jsse</artifactId>
+  <name>SSL support</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>${project.groupId}</groupId>
+      <artifactId>ssl-proxies</artifactId>
+      <version>${project.version}</version>
+    </dependency>
+  </dependencies>
+</project>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/maven-metadata-local.xml?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/maven-metadata-local.xml (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/jsse/maven-metadata-local.xml Sat Jul 13 00:49:09 2013
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.jglobus</groupId>
+  <artifactId>jsse</artifactId>
+  <versioning>
+    <release>2.0.6-rc2</release>
+    <versions>
+      <version>2.0.6-rc2</version>
+      <version>2.1-SNAPSHOT</version>
+      <version>2.0.6-rc3-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20130619202702</lastUpdated>
+  </versioning>
+</metadata>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/_maven.repositories
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/_maven.repositories?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/_maven.repositories (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/_maven.repositories Sat Jul 13 00:49:09 2013
@@ -0,0 +1,5 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Mon Jun 10 12:27:18 EDT 2013
+myproxy-2.0.6-rc2.jar>=
+myproxy-2.0.6-rc2-sources.jar>=
+myproxy-2.0.6-rc2.pom>=

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2-sources.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2-sources.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2-sources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.pom
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.pom?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.pom (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/2.0.6-rc2/myproxy-2.0.6-rc2.pom Sat Jul 13 00:49:09 2013
@@ -0,0 +1,26 @@
+<?xml version="1.0"?>
+<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>
+		<artifactId>jglobus-all</artifactId>
+		<groupId>org.jglobus</groupId>
+		<version>2.0.6-rc2</version>
+	</parent>
+
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>myproxy</artifactId>
+	<name>myproxy</name>
+
+	<dependencies>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>gss</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/maven-metadata-local.xml?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/maven-metadata-local.xml (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/myproxy/maven-metadata-local.xml Sat Jul 13 00:49:09 2013
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.jglobus</groupId>
+  <artifactId>myproxy</artifactId>
+  <versioning>
+    <release>2.0.6-rc2</release>
+    <versions>
+      <version>2.0.6-rc2</version>
+      <version>2.0.6-rc3-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20130619202623</lastUpdated>
+  </versioning>
+</metadata>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/_maven.repositories
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/_maven.repositories?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/_maven.repositories (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/_maven.repositories Sat Jul 13 00:49:09 2013
@@ -0,0 +1,5 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Mon Jun 10 12:27:18 EDT 2013
+ssl-proxies-tomcat-2.0.6-rc2.pom>=
+ssl-proxies-tomcat-2.0.6-rc2-sources.jar>=
+ssl-proxies-tomcat-2.0.6-rc2.jar>=

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2-sources.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2-sources.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2-sources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.pom
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.pom?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.pom (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/2.0.6-rc2/ssl-proxies-tomcat-2.0.6-rc2.pom Sat Jul 13 00:49:09 2013
@@ -0,0 +1,132 @@
+<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>
+		<artifactId>jglobus-all</artifactId>
+		<groupId>org.jglobus</groupId>
+		<version>2.0.6-rc2</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>ssl-proxies-tomcat</artifactId>
+	<name>SSL and proxy certificate support for Tomcat</name>
+	<profiles>
+		<profile>
+			<id>tomcat7</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-patch-plugin</artifactId>
+						<version>1.1.1</version>
+						<configuration>
+							<patches>
+								<patch>jglobus-tomcat7.patch</patch>
+							</patches>
+							<strip>5</strip>
+						</configuration>
+						<executions>
+							<execution>
+								<id>patch</id>
+								<phase>process-sources</phase>
+								<goals>
+									<goal>apply</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+			<dependencies>
+				<dependency>
+					<groupId>org.apache.tomcat</groupId>
+					<artifactId>tomcat-catalina</artifactId>
+					<version>7.0.32</version>
+				</dependency>
+				<dependency>
+					<groupId>org.apache.tomcat</groupId>
+					<artifactId>tomcat-coyote</artifactId>
+					<version>7.0.32</version>
+				</dependency>
+			</dependencies>
+		</profile>
+		<profile>
+			<id>tomcat6</id>
+			<activation>
+				<activeByDefault>true</activeByDefault>
+			</activation>
+			<dependencies>
+				<dependency>
+					<groupId>org.apache.tomcat</groupId>
+					<artifactId>catalina</artifactId>
+					<version>6.0.24</version>
+				</dependency>
+				<dependency>
+					<groupId>org.apache.tomcat</groupId>
+					<artifactId>coyote</artifactId>
+					<version>6.0.24</version>
+				</dependency>
+			</dependencies>
+		</profile>
+		<profile>
+			<id>tomcat5</id>
+			<build>
+				<plugins>
+					<plugin>
+						<groupId>org.apache.maven.plugins</groupId>
+						<artifactId>maven-patch-plugin</artifactId>
+						<version>1.1.1</version>
+						<configuration>
+							<patches>
+								<patch>jglobus-tomcat5.patch</patch>
+							</patches>
+							<strip>5</strip>
+						</configuration>
+						<executions>
+							<execution>
+								<id>patch</id>
+								<phase>process-sources</phase>
+								<goals>
+									<goal>apply</goal>
+								</goals>
+							</execution>
+						</executions>
+					</plugin>
+				</plugins>
+			</build>
+			<dependencies>
+				<dependency>
+					<groupId>tomcat</groupId>
+					<artifactId>catalina</artifactId>
+					<version>5.5.23</version>
+				</dependency>
+				<dependency>
+					<groupId>tomcat</groupId>
+					<artifactId>tomcat-coyote</artifactId>
+					<version>5.5.23</version>
+				</dependency>
+			</dependencies>
+		</profile>
+	</profiles>
+	<dependencies>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>jsse</artifactId>
+			<version>${project.version}</version>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>container-test-utils</artifactId>
+			<version>${project.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>test-utils</artifactId>
+			<version>${project.version}</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+</project>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/maven-metadata-local.xml?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/maven-metadata-local.xml (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies-tomcat/maven-metadata-local.xml Sat Jul 13 00:49:09 2013
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.jglobus</groupId>
+  <artifactId>ssl-proxies-tomcat</artifactId>
+  <versioning>
+    <release>2.0.6-rc2</release>
+    <versions>
+      <version>2.0.6-rc2</version>
+      <version>2.0.6-rc3-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20130619202622</lastUpdated>
+  </versioning>
+</metadata>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/_maven.repositories
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/_maven.repositories?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/_maven.repositories (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/_maven.repositories Sat Jul 13 00:49:09 2013
@@ -0,0 +1,5 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Fri Jun 21 15:46:09 EDT 2013
+ssl-proxies-2.0.6-rc2.jar>=
+ssl-proxies-2.0.6-rc2.pom>=
+ssl-proxies-2.0.6-rc2-sources.jar>=

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2-sources.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2-sources.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2-sources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.pom
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.pom?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.pom (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/2.0.6-rc2/ssl-proxies-2.0.6-rc2.pom Sat Jul 13 00:49:09 2013
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+		<artifactId>jglobus-all</artifactId>
+		<groupId>org.jglobus</groupId>
+		<version>2.0.6-rc2</version>
+	</parent>
+	<modelVersion>4.0.0</modelVersion>
+	<artifactId>ssl-proxies</artifactId>
+	<name>SSL and proxy certificate support</name>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-surefire-plugin</artifactId>
+                <version>${surefire.version}</version>
+                <configuration>
+                    <failIfNoTests>false</failIfNoTests>
+                    <skipTests>${skipTests}</skipTests>
+                    <workingDirectory>${project.build.testOutputDirectory}</workingDirectory>
+                    <systemPropertyVariables>
+                        <projectDirectory>${basedir}</projectDirectory>
+                    </systemPropertyVariables>
+
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+	<dependencies>
+		<dependency>
+			<groupId>commons-logging</groupId>
+			<artifactId>commons-logging</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>log4j</groupId>
+			<artifactId>log4j</artifactId>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.bouncycastle</groupId>
+			<artifactId>bcprov-jdk16</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-io</groupId>
+			<artifactId>commons-io</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>commons-codec</groupId>
+			<artifactId>commons-codec</artifactId>
+		</dependency>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>${project.groupId}</groupId>
+			<artifactId>test-utils</artifactId>
+			<version>${project.version}</version>
+			<scope>test</scope>
+		</dependency>
+	</dependencies>
+
+    <properties>
+        <surefire.version>2.12</surefire.version>
+        <skipTests>false</skipTests>
+    </properties>
+
+</project>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/maven-metadata-local.xml?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/maven-metadata-local.xml (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/ssl-proxies/maven-metadata-local.xml Sat Jul 13 00:49:09 2013
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.jglobus</groupId>
+  <artifactId>ssl-proxies</artifactId>
+  <versioning>
+    <release>2.0.6-rc2</release>
+    <versions>
+      <version>2.0.6-rc2</version>
+      <version>2.1-SNAPSHOT</version>
+      <version>2.0.6-rc3-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20130621194609</lastUpdated>
+  </versioning>
+</metadata>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/_maven.repositories
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/_maven.repositories?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/_maven.repositories (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/_maven.repositories Sat Jul 13 00:49:09 2013
@@ -0,0 +1,5 @@
+#NOTE: This is an internal implementation file, its format can be changed without prior notice.
+#Mon Jun 10 12:27:15 EDT 2013
+test-utils-2.0.6-rc2.jar>=
+test-utils-2.0.6-rc2.pom>=
+test-utils-2.0.6-rc2-sources.jar>=

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2-sources.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2-sources.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2-sources.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.jar
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.jar?rev=1502732&view=auto
==============================================================================
Binary file - no diff available.

Propchange: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.pom
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.pom?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.pom (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/2.0.6-rc2/test-utils-2.0.6-rc2.pom Sat Jul 13 00:49:09 2013
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
+    <artifactId>jglobus-all</artifactId>
+    <groupId>org.jglobus</groupId>
+    <version>2.0.6-rc2</version>
+  </parent>
+  <modelVersion>4.0.0</modelVersion>
+  <artifactId>test-utils</artifactId>
+  <name>Test Utilities</name>
+
+  <dependencies>
+    <dependency>
+      <groupId>commons-io</groupId>
+      <artifactId>commons-io</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.httpcomponents</groupId>
+      <artifactId>httpclient</artifactId>
+    </dependency>
+    <dependency>
+      <groupId>commons-logging</groupId>
+      <artifactId>commons-logging</artifactId>
+      <scope>compile</scope>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId>
+      <artifactId>log4j</artifactId>
+      <scope>compile</scope>
+    </dependency>
+  </dependencies>
+</project>

Added: airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/maven-metadata-local.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/maven-metadata-local.xml?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/maven-metadata-local.xml (added)
+++ airavata/trunk/jglobus-repo/repository/org/jglobus/test-utils/maven-metadata-local.xml Sat Jul 13 00:49:09 2013
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<metadata>
+  <groupId>org.jglobus</groupId>
+  <artifactId>test-utils</artifactId>
+  <versioning>
+    <release>2.0.6-rc2</release>
+    <versions>
+      <version>2.0.6-rc2</version>
+      <version>2.1-SNAPSHOT</version>
+      <version>2.0.6-rc3-SNAPSHOT</version>
+    </versions>
+    <lastUpdated>20130619202651</lastUpdated>
+  </versioning>
+</metadata>

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java Sat Jul 13 00:49:09 2013
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.common.utils;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.commons.dbcp.BasicDataSource;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -292,7 +293,8 @@ public class DBUtil {
      * @throws Exception
      *             If an error occurred while reading configurations or while creating database object.
      */
-    public static DBUtil getDBUtil() throws Exception{
+    public static DBUtil getCredentialStoreDBUtil() throws ApplicationSettingsException, IllegalAccessException,
+            ClassNotFoundException, InstantiationException {
 
         String jdbcUrl = ServerSettings.getCredentialStoreDBURL();
         String userName = ServerSettings.getCredentialStoreDBUser();
@@ -306,12 +308,7 @@ public class DBUtil {
         log.debug(stringBuilder.toString());
 
         DBUtil dbUtil = new DBUtil(jdbcUrl, userName, password, driverName);
-        try {
-            dbUtil.init();
-        } catch (Exception e) {
-            log.error("Error initializing database operations.", e);
-            throw e;
-        }
+        dbUtil.init();
 
         return dbUtil;
     }

Modified: airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/servlet/CredentialStoreCallbackServlet.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/servlet/CredentialStoreCallbackServlet.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/servlet/CredentialStoreCallbackServlet.java (original)
+++ airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/servlet/CredentialStoreCallbackServlet.java Sat Jul 13 00:49:09 2013
@@ -68,7 +68,7 @@ public class CredentialStoreCallbackServ
         DBUtil dbUtil;
 
         try {
-            dbUtil = DBUtil.getDBUtil();
+            dbUtil = DBUtil.getCredentialStoreDBUtil();
         } catch (Exception e) {
             throw new ServletException("Error initializing database operations.", e);
         }

Modified: airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/store/CredentialReaderFactory.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/store/CredentialReaderFactory.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/store/CredentialReaderFactory.java (original)
+++ airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/store/CredentialReaderFactory.java Sat Jul 13 00:49:09 2013
@@ -21,6 +21,7 @@
 
 package org.apache.airavata.credential.store.store;
 
+import org.apache.airavata.common.exception.ApplicationSettingsException;
 import org.apache.airavata.common.utils.DBUtil;
 import org.apache.airavata.credential.store.store.impl.CredentialReaderImpl;
 
@@ -29,7 +30,25 @@ import org.apache.airavata.credential.st
  */
 public class CredentialReaderFactory {
 
+    /**
+     * Creates a credential reader using supplied database configurations.
+     * @param dbUti The database configurations.
+     * @return CredentialReader object.
+     */
     public static CredentialReader createCredentialStoreReader(DBUtil dbUti) {
         return new CredentialReaderImpl(dbUti);
     }
+
+    /**
+     * Creates credential reader using default configurations for credential store database.
+     * @return The credential reader.
+     * @throws ClassNotFoundException If an error occurred while instantiating jdbc driver
+     * @throws ApplicationSettingsException If an error occurred while reading database configurations.
+     * @throws InstantiationException If an error occurred while instantiating jdbc driver
+     * @throws IllegalAccessException A security exception accessing jdbc driver.
+     */
+    public static CredentialReader createCredentialStoreReader() throws ClassNotFoundException,
+            ApplicationSettingsException, InstantiationException, IllegalAccessException {
+        return new CredentialReaderImpl(DBUtil.getCredentialStoreDBUtil());
+    }
 }

Added: airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/TokenGenerator.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/TokenGenerator.java?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/TokenGenerator.java (added)
+++ airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/TokenGenerator.java Sat Jul 13 00:49:09 2013
@@ -0,0 +1,63 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.credential.store.util;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 5/21/13
+ * Time: 3:07 PM
+ */
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.sql.Timestamp;
+
+/**
+ * Generates tokens for users.
+ */
+public class TokenGenerator {
+
+    protected static Logger log = LoggerFactory.getLogger(TokenGenerator.class);
+
+
+    public TokenGenerator() {
+
+    }
+
+    public String generateToken(String gatewayId, String metadata) {
+        StringBuilder tokenBuilder = new StringBuilder("#token#");
+        tokenBuilder.append(gatewayId).append("#").append(metadata).append("#");
+
+
+        java.util.Date date= new java.util.Date();
+        Timestamp timestamp = new Timestamp(date.getTime());
+        tokenBuilder.append(Integer.toString(timestamp.getNanos()));
+
+        return tokenBuilder.toString();
+    }
+
+    public String encryptToken(String token) {
+        return null;
+    }
+
+}

Modified: airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/Utility.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/Utility.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/Utility.java (original)
+++ airavata/trunk/modules/credential-store/src/main/java/org/apache/airavata/credential/store/util/Utility.java Sat Jul 13 00:49:09 2013
@@ -21,6 +21,9 @@
 
 package org.apache.airavata.credential.store.util;
 
+import java.io.FileInputStream;
+import java.security.KeyStore;
+import java.security.KeyStoreException;
 import java.text.DateFormat;
 import java.text.SimpleDateFormat;
 import java.util.Date;
@@ -38,4 +41,31 @@ public class Utility {
         return df.format(date);
     }
 
+    public static String encrypt(String stringToEncrypt) {
+        return null;
+
+    }
+
+    public static KeyStore loadKeyStore(String keyStoreFile) throws Exception {
+        KeyStore ks = KeyStore.getInstance("JKS");
+        // get user password and file input stream
+        char[] password = getPassword();
+
+        java.io.FileInputStream fis = null;
+        try {
+            fis = new FileInputStream(keyStoreFile);
+            ks.load(fis, password);
+
+            return ks;
+        } finally {
+            if (fis != null) {
+                fis.close();
+            }
+        }
+    }
+
+    public static char[] getPassword() {
+        return new char[0];
+    }
+
 }

Modified: airavata/trunk/modules/distribution/airavata-client/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/airavata-client/pom.xml?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/airavata-client/pom.xml (original)
+++ airavata/trunk/modules/distribution/airavata-client/pom.xml Sat Jul 13 00:49:09 2013
@@ -160,11 +160,6 @@
             <version>2.5.1</version>
         </dependency>
         <dependency>
-            <groupId>cog-jglobus</groupId>
-            <artifactId>cog-jglobus</artifactId>
-            <version>1.8.0_1</version>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>${junit.version}</version>

Modified: airavata/trunk/modules/distribution/airavata-server/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/airavata-server/pom.xml?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/airavata-server/pom.xml (original)
+++ airavata/trunk/modules/distribution/airavata-server/pom.xml Sat Jul 13 00:49:09 2013
@@ -303,14 +303,6 @@
             <version>2.5.1</version>
         </dependency>
         <dependency>
-            <groupId>cog-jglobus</groupId>
-            <artifactId>cog-jglobus</artifactId>
-            <version>1.8.0_1</version>
-        </dependency>
-        <!-- <dependency> <groupId>cog-jglobus</groupId> <artifactId>cog-jglobus</artifactId>
-              <version>1.8.0-mod</version> </dependency> <dependency> <groupId>edu.iub.soic.damsl</groupId>
-              <artifactId>jXSP</artifactId> <version>0.0.1-SNAPSHOT</version> </dependency> -->
-        <dependency>
             <groupId>xsul</groupId>
             <artifactId>xsul</artifactId>
             <version>2.10.5_d</version>
@@ -457,14 +449,13 @@
         </dependency>
         <dependency>
             <groupId>org.bouncycastle</groupId>
-            <artifactId>bcprov-jdk15</artifactId>
-            <version>1.45</version>
+            <artifactId>bcprov-jdk16</artifactId>
         </dependency>
-        <dependency>
+        <!--dependency>
             <groupId>org.bouncycastle</groupId>
             <artifactId>bcmail-jdk15</artifactId>
             <version>1.45</version>
-        </dependency>
+        </dependency-->
         <dependency>
             <groupId>org.apache.openjpa</groupId>
             <artifactId>openjpa-all</artifactId>

Modified: airavata/trunk/modules/distribution/airavata-server/src/main/assembly/bin-assembly.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/airavata-server/src/main/assembly/bin-assembly.xml?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/airavata-server/src/main/assembly/bin-assembly.xml (original)
+++ airavata/trunk/modules/distribution/airavata-server/src/main/assembly/bin-assembly.xml Sat Jul 13 00:49:09 2013
@@ -225,7 +225,7 @@
                 <include>xsul5-ogce:xsul5-2007-02-27:jar</include>
                 <include>xutil:xutil</include>
                 <include>jython:jython</include>
-                <include>cog-jglobus:cog-jglobus</include>
+                <include>org.jglobus:jglobus-all</include>
                 <include>lead-security:puretls</include>
                 <include>lead-security:cryptix32</include>
                 <include>lead-security:cryptix-asn1</include>

Modified: airavata/trunk/modules/distribution/xbaya-gui/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/xbaya-gui/pom.xml?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/xbaya-gui/pom.xml (original)
+++ airavata/trunk/modules/distribution/xbaya-gui/pom.xml Sat Jul 13 00:49:09 2013
@@ -266,11 +266,6 @@
             <version>2.5.1</version>
         </dependency>
         <dependency>
-            <groupId>cog-jglobus</groupId>
-            <artifactId>cog-jglobus</artifactId>
-            <version>1.8.0_1</version>
-        </dependency>
-        <dependency>
             <groupId>junit</groupId>
             <artifactId>junit</artifactId>
             <version>${junit.version}</version>

Modified: airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml (original)
+++ airavata/trunk/modules/distribution/xbaya-gui/src/main/assembly/bin-assembly.xml Sat Jul 13 00:49:09 2013
@@ -109,7 +109,6 @@
 				<include>xsul5-ogce:xsul5-2007-02-27:jar</include>
 				<include>xutil:xutil</include>
 				<include>jython:jython</include>
-				<include>cog-jglobus:cog-jglobus</include>
 				<include>org.apache.xmlbeans:xmlbeans</include>
 				<include>com.amazonaws:aws-java-sdk</include>
 				<include>amazon:MapReduce.Service.Client</include>

Modified: airavata/trunk/modules/gfac-core/pom.xml
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/pom.xml?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/pom.xml (original)
+++ airavata/trunk/modules/gfac-core/pom.xml Sat Jul 13 00:49:09 2013
@@ -23,29 +23,28 @@
     <url>http://airavata.apache.org/</url>
 
     <dependencies>
+
         <dependency>
-            <groupId>cog-jglobus</groupId>
-            <artifactId>cog-jglobus</artifactId>
-            <version>1.8.0_bc</version>
+            <groupId>org.jglobus</groupId>
+            <artifactId>gss</artifactId>
+            <version>${jglobus.version}</version>
         </dependency>
         <dependency>
-            <groupId>cog-globus</groupId>
-            <artifactId>puretls</artifactId>
-            <type>jar</type>
-            <version>1.0</version>
+            <groupId>org.jglobus</groupId>
+            <artifactId>gram</artifactId>
+            <version>${jglobus.version}</version>
         </dependency>
         <dependency>
-            <groupId>cog-globus</groupId>
-            <artifactId>cryptix32</artifactId>
-            <version>1.0</version>
+            <groupId>org.jglobus</groupId>
+            <artifactId>myproxy</artifactId>
+            <version>${jglobus.version}</version>
         </dependency>
-        <!-- <dependency> <groupId>org.bouncycastle</groupId> <artifactId>bcprov-jdk16</artifactId> <version>1.46</version> 
-            </dependency> -->
         <dependency>
-            <groupId>cog-globus</groupId>
-            <artifactId>cryptix-asn1</artifactId>
-            <version>1.0</version>
+            <groupId>org.jglobus</groupId>
+            <artifactId>gridftp</artifactId>
+            <version>${jglobus.version}</version>
         </dependency>
+
         <dependency>
             <groupId>commons-configuration</groupId>
             <artifactId>commons-configuration</artifactId>
@@ -129,6 +128,12 @@
             <scope>test</scope>
         </dependency>
         <dependency>
+            <groupId>org.testng</groupId>
+            <artifactId>testng</artifactId>
+            <version>6.1.1</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>jcl-over-slf4j</artifactId>
             <scope>test</scope>
@@ -209,13 +214,18 @@
                     <!--skip>true</skip -->
                     <excludes>
                         <exclude>**/services/**</exclude>
+                        <exclude>**/gfac/**</exclude>
                     </excludes>
                     <forkMode>always</forkMode>
-                    <useSystemClassloader>true</useSystemClassloader>
                     <failIfNoTests>false</failIfNoTests>
                 </configuration>
             </plugin>
         </plugins>
     </build>
 
+    <properties>
+        <jglobus.version>2.0.6-rc2</jglobus.version>
+    </properties>
+
+
 </project>
\ No newline at end of file

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/AbstractSecurityContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/AbstractSecurityContext.java?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/AbstractSecurityContext.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/AbstractSecurityContext.java Sat Jul 13 00:49:09 2013
@@ -0,0 +1,53 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.gfac;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 6/26/13
+ * Time: 4:33 PM
+ */
+
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.gfac.SecurityContext;
+
+/**
+ * Abstract implementation of the security context.
+ */
+public abstract class AbstractSecurityContext implements SecurityContext {
+
+    private CredentialReader credentialReader;
+    private RequestData requestData;
+
+    public AbstractSecurityContext(CredentialReader credentialReader, RequestData requestData) {
+        this.credentialReader = credentialReader;
+        this.requestData = requestData;
+    }
+
+    public CredentialReader getCredentialReader() {
+        return credentialReader;
+    }
+
+    public RequestData getRequestData() {
+        return requestData;
+    }
+}

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Constants.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Constants.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Constants.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/Constants.java Sat Jul 13 00:49:09 2013
@@ -54,6 +54,7 @@ public class Constants {
 	public static final String EXECUTABLE_NAME = "run.sh";
 
 	public static final String TRUSTED_CERT_LOCATION = "trusted.cert.location";
+    public static final String TRUSTED_CERTIFICATE_SYSTEM_PROPERTY = "X509_CERT_DIR";
     public static final String MYPROXY_SERVER = "myproxy.server";
     public static final String MYPROXY_SERVER_PORT = "myproxy.port";
     public static final String MYPROXY_USER = "myproxy.user";

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacException.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacException.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacException.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/GFacException.java Sat Jul 13 00:49:09 2013
@@ -30,6 +30,11 @@ public class GFacException extends Excep
 	public GFacException(String s) {
         super(s);
     }
+
+    public GFacException(Exception e) {
+        super(e);
+    }
+
 	public GFacException(String s, Throwable throwable) {
         super(s, throwable);
     }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/JobSubmissionFault.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/JobSubmissionFault.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/JobSubmissionFault.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/JobSubmissionFault.java Sat Jul 13 00:49:09 2013
@@ -24,25 +24,76 @@ import org.apache.airavata.gfac.context.
 import org.apache.airavata.gfac.provider.GFacProvider;
 import org.apache.airavata.gfac.provider.GFacProviderException;
 
+// TODO review this class - Not sure some of the attributes are actually
+// needed
 public class JobSubmissionFault extends GFacProviderException{
-    
-    public static final String JOB_CANCEL = "JOB_CANCEL";
 
-    public static final String JOB_FAILED = "JOB_FAILED";
+    // TODO why we need following ?
+    //public static final String JOB_CANCEL = "JOB_CANCEL";
+
+    //public static final String JOB_FAILED = "JOB_FAILED";
 
     private String reason;
+    private String contact;
+    private int gramErrorCode;
+    private String rsl;
+    private String host;
 
-    public JobSubmissionFault(GFacProvider provider, Throwable cause, String submitHost, String contact, String rsl, JobExecutionContext jobExecutionContext) {
+    public JobSubmissionFault(Throwable cause, String submitHost, String contact, String rsl,
+                              JobExecutionContext jobExecutionContext, String reason, int errorCode) {
         super(cause.getMessage(), cause,jobExecutionContext);
+
+        this.host = submitHost;
+        this.contact = contact;
+        this.rsl = rsl;
+        this.reason = reason;
+        this.gramErrorCode = errorCode;
     }
 
     public void setReason(String reason) {
         this.reason = reason;
     }
 
+    // TODO why we need this ?
     public void sendFaultNotification(String message,
 			JobExecutionContext jobExecutionContext, Exception e,
 			String... additionalExceptiondata) {
 		
 	}
+
+    public String getReason() {
+        return reason;
+    }
+
+    public String getContact() {
+        return contact;
+    }
+
+    public void setContact(String contact) {
+        this.contact = contact;
+    }
+
+    public int getGramErrorCode() {
+        return gramErrorCode;
+    }
+
+    public void setGramErrorCode(int gramErrorCode) {
+        this.gramErrorCode = gramErrorCode;
+    }
+
+    public String getRsl() {
+        return rsl;
+    }
+
+    public void setRsl(String rsl) {
+        this.rsl = rsl;
+    }
+
+    public String getHost() {
+        return host;
+    }
+
+    public void setHost(String host) {
+        this.host = host;
+    }
 }

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/RequestData.java Sat Jul 13 00:49:09 2013
@@ -0,0 +1,167 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.gfac;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 6/28/13
+ * Time: 3:28 PM
+ */
+
+import org.apache.airavata.common.utils.ServerSettings;
+
+import java.util.Properties;
+
+/**
+ * Encapsulates GFac specific data that are coming in the request.
+ */
+public class RequestData {
+
+    private static final int DEFAULT_LIFE_TIME = 3600;
+    private static final int DEFAULT_MY_PROXY_PORT = 7512;
+
+    private String tokenId;
+    private String requestUser;
+    private String gatewayId;
+
+    private String myProxyServerUrl = null;
+    private int myProxyPort = 0;
+    private String myProxyUserName = null;
+    private String myProxyPassword = null;
+    private int myProxyLifeTime = DEFAULT_LIFE_TIME;
+
+
+    public RequestData() {
+    }
+
+    public RequestData(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public RequestData(String tokenId, String requestUser, String gatewayId) {
+        this.tokenId = tokenId;
+        this.requestUser = requestUser;
+        this.gatewayId = gatewayId;
+    }
+
+    public String getTokenId() {
+        return tokenId;
+    }
+
+    public void setTokenId(String tokenId) {
+        this.tokenId = tokenId;
+    }
+
+    public String getRequestUser() {
+        return requestUser;
+    }
+
+    public void setRequestUser(String requestUser) {
+        this.requestUser = requestUser;
+    }
+
+    public String getGatewayId() {
+        return gatewayId;
+    }
+
+    public void setGatewayId(String gatewayId) {
+        this.gatewayId = gatewayId;
+    }
+
+    public String getMyProxyServerUrl() {
+
+        if (myProxyServerUrl == null) {
+            Properties properties = ServerSettings.getProperties();
+            myProxyServerUrl = properties.getProperty(Constants.MYPROXY_SERVER);
+        }
+
+        return myProxyServerUrl;
+    }
+
+    public void setMyProxyServerUrl(String myProxyServerUrl) {
+        this.myProxyServerUrl = myProxyServerUrl;
+    }
+
+    public int getMyProxyPort() {
+
+        if (myProxyPort == 0) {
+            Properties properties = ServerSettings.getProperties();
+            String sPort = properties.getProperty(Constants.MYPROXY_SERVER_PORT);
+
+            if (sPort != null) {
+                myProxyPort = Integer.parseInt(sPort);
+            } else {
+                myProxyPort = DEFAULT_MY_PROXY_PORT;
+            }
+        }
+
+        return myProxyPort;
+    }
+
+    public void setMyProxyPort(int myProxyPort) {
+        this.myProxyPort = myProxyPort;
+    }
+
+    public String getMyProxyUserName() {
+        if (myProxyUserName == null) {
+            Properties properties = ServerSettings.getProperties();
+            myProxyUserName = properties.getProperty(Constants.MYPROXY_USER);
+        }
+
+        return myProxyUserName;
+    }
+
+    public void setMyProxyUserName(String myProxyUserName) {
+        this.myProxyUserName = myProxyUserName;
+    }
+
+    public String getMyProxyPassword() {
+
+        if (myProxyPassword == null) {
+            Properties properties = ServerSettings.getProperties();
+            myProxyPassword = properties.getProperty(Constants.MYPROXY_PASS);
+        }
+
+        return myProxyPassword;
+    }
+
+    public int getMyProxyLifeTime() {
+
+        Properties properties = ServerSettings.getProperties();
+        String life = properties.getProperty(Constants.MYPROXY_LIFE);
+
+        if (life == null) {
+            return myProxyLifeTime;
+        } else {
+            myProxyLifeTime = Integer.parseInt(life);
+            return myProxyLifeTime;
+        }
+    }
+
+    public void setMyProxyLifeTime(int myProxyLifeTime) {
+        this.myProxyLifeTime = myProxyLifeTime;
+    }
+
+    public void setMyProxyPassword(String myProxyPassword) {
+        this.myProxyPassword = myProxyPassword;
+    }
+}

Copied: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/SecurityContext.java (from r1496618, airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SecurityContext.java)
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/SecurityContext.java?p2=airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/SecurityContext.java&p1=airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SecurityContext.java&r1=1496618&r2=1502732&rev=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SecurityContext.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/SecurityContext.java Sat Jul 13 00:49:09 2013
@@ -19,9 +19,8 @@
  *
 */
 
-package org.apache.airavata.gfac.context.security;
+package org.apache.airavata.gfac;
 
-import org.apache.airavata.gfac.context.AbstractContext;
+public interface SecurityContext {
 
-public class SecurityContext extends AbstractContext {
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/JobExecutionContext.java Sat Jul 13 00:49:09 2013
@@ -23,7 +23,7 @@ package org.apache.airavata.gfac.context
 
 import org.apache.airavata.gfac.GFacConfiguration;
 import org.apache.airavata.gfac.GFacException;
-import org.apache.airavata.gfac.context.security.SecurityContext;
+import org.apache.airavata.gfac.SecurityContext;
 import org.apache.airavata.gfac.notification.GFacNotifier;
 import org.apache.airavata.gfac.provider.GFacProvider;
 import org.apache.airavata.schemas.wec.ContextHeaderDocument;

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/AmazonSecurityContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/AmazonSecurityContext.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/AmazonSecurityContext.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/AmazonSecurityContext.java Sat Jul 13 00:49:09 2013
@@ -21,7 +21,9 @@
 
 package org.apache.airavata.gfac.context.security;
 
-public class AmazonSecurityContext extends SecurityContext {
+import org.apache.airavata.gfac.SecurityContext;
+
+public class AmazonSecurityContext implements SecurityContext {
 
 	public static final String AMAZON_SECURITY_CONTEXT = "amazon";
     private String userName;

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/GSISecurityContext.java Sat Jul 13 00:49:09 2013
@@ -20,111 +20,245 @@
 */
 package org.apache.airavata.gfac.context.security;
 
+import java.io.File;
+import java.security.Security;
+import java.security.cert.X509Certificate;
 import java.util.Properties;
 
-import org.apache.airavata.gfac.utils.MyProxyManager;
-import org.globus.gsi.GlobusCredential;
+import org.apache.airavata.common.utils.ServerSettings;
+import org.apache.airavata.credential.store.credential.Credential;
+import org.apache.airavata.credential.store.credential.impl.certificate.CertificateCredential;
+import org.apache.airavata.credential.store.store.CredentialReader;
+import org.apache.airavata.gfac.AbstractSecurityContext;
+import org.apache.airavata.gfac.Constants;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.airavata.gfac.RequestData;
+import org.globus.gsi.X509Credential;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.globus.gsi.provider.GlobusProvider;
+import org.globus.myproxy.GetParams;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
 import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Handles GRID related security.
  */
-public class GSISecurityContext extends SecurityContext {
+public class GSISecurityContext extends AbstractSecurityContext {
 
-    protected final Logger log = LoggerFactory.getLogger(this.getClass());
+    protected static final Logger log = LoggerFactory.getLogger(GSISecurityContext.class);
     /*
      * context name
      */
     public static final String GSI_SECURITY_CONTEXT = "gsi";
 
-    private MyProxyManager myProxyManager;
+    public static int CREDENTIAL_RENEWING_THRESH_HOLD = 10 * 90;
 
     private GSSCredential gssCredentials = null;
 
-    private GlobusCredential globusCredential;
-
-    private String tokenId;
-
-    private String gatewayId;
+    // Set trusted cert path and add provider
+    static {
+        Security.addProvider(new GlobusProvider());
+        setUpTrustedCertificatePath();
+    }
+
+    public static void setUpTrustedCertificatePath(String trustedCertificatePath) {
+
+        File file = new File(trustedCertificatePath);
+
+        if (!file.exists() || !file.canRead()) {
+            File f = new File(".");
+            log.info("Current directory " + f.getAbsolutePath());
+            throw new RuntimeException("Cannot read trusted certificate path " + trustedCertificatePath);
+        } else {
+            System.setProperty(Constants.TRUSTED_CERTIFICATE_SYSTEM_PROPERTY, file.getAbsolutePath());
+        }
+    }
 
-    private String gatewayUser;
+    private static void setUpTrustedCertificatePath() {
 
-    public GSISecurityContext() {
-    }
+        Properties properties = ServerSettings.getProperties();
+        String trustedCertificatePath  = properties.getProperty(Constants.TRUSTED_CERT_LOCATION);
 
-    public GSISecurityContext(Properties configuration, String token, String gateway, String user) {
-        this.tokenId = token;
-        this.gatewayId = gateway;
-        this.gatewayUser = user;
-        myProxyManager = new MyProxyManager(configuration);
+        setUpTrustedCertificatePath(trustedCertificatePath);
     }
 
-    public GSISecurityContext(Properties configuration) {
-
-        myProxyManager = new MyProxyManager(configuration);
+    /**
+     * Gets the trusted certificate path. Trusted certificate path is stored in "X509_CERT_DIR"
+     * system property.
+     * @return The trusted certificate path as a string.
+     */
+    public static String getTrustedCertificatePath() {
+        return System.getProperty(Constants.TRUSTED_CERTIFICATE_SYSTEM_PROPERTY);
     }
 
-    public GSISecurityContext(String myProxyServer, String myProxyUserName, String myProxyPassword, int myProxyLifetime, String trustedCertLoc) {
 
-        myProxyManager = new MyProxyManager(myProxyUserName, myProxyPassword,
-                myProxyLifetime, myProxyServer, trustedCertLoc);
+    public GSISecurityContext(CredentialReader credentialReader, RequestData requestData) {
+        super(credentialReader, requestData);
     }
 
-    public GSSCredential getGssCredentials() throws SecurityException {
+    /**
+     * Gets GSSCredentials. The process is as follows;
+     * If credentials were queried for the first time create credentials.
+     *   1. Try creating credentials using certificates stored in the credential store
+     *   2. If 1 fails use user name and password to create credentials
+     * If credentials are already created check the remaining life time of the credential. If
+     * remaining life time is less than CREDENTIAL_RENEWING_THRESH_HOLD, then renew credentials.
+     * @return GSSCredentials to be used.
+     * @throws GFacException If an error occurred while creating credentials.
+     */
+    public GSSCredential getGssCredentials() throws GFacException {
 
-        if (gssCredentials != null)
-            return gssCredentials;
+        if (gssCredentials == null) {
 
-        try {
+            try {
+                gssCredentials = getCredentialsFromStore();
+            } catch (Exception e) {
+                log.error("An exception occurred while retrieving credentials from the credential store. " +
+                        "Will continue with my proxy user name and password.", e);
+            }
 
-            gssCredentials = this.myProxyManager.getCredentialsFromStore(gatewayId, tokenId);
+            // If store does not have credentials try to get from user name and password
+            if (gssCredentials == null) {
+                gssCredentials = getDefaultCredentials();
+            }
 
-        } catch (Exception e) {
-            log.warn("An error occurred while retrieving credentials from credential store. " +
-                    "But continuing with password credentials. ", e);
+            // if still null, throw an exception
+            if (gssCredentials == null) {
+                throw new GFacException("Unable to retrieve my proxy credentials to continue operation.");
+            }
+        } else {
+            try {
+                if (gssCredentials.getRemainingLifetime() < CREDENTIAL_RENEWING_THRESH_HOLD) {
+                    return renewCredentials();
+                }
+            } catch (GSSException e) {
+                throw new GFacException("Unable to retrieve remaining life time from credentials.", e);
+            }
         }
 
-        if (gssCredentials == null)
-            return getGssCredentialsFromUserPassword();
-        else
-            return gssCredentials;
+        return gssCredentials;
     }
 
+    /**
+     * Renews credentials. First try to renew credentials as a trusted renewer. If that failed
+     * use user name and password to renew credentials.
+     * @return Renewed credentials.
+     * @throws GFacException If an error occurred while renewing credentials.
+     */
+    public GSSCredential renewCredentials() throws GFacException {
 
-    public GSSCredential getGssCredentialsFromUserPassword() throws SecurityException {
+        // First try to renew credentials as a trusted renewer
         try {
-            if (gssCredentials == null || gssCredentials.getRemainingLifetime() < 10 * 90) {
-                gssCredentials = myProxyManager.renewProxy();
-            }
-            return gssCredentials;
+            gssCredentials = renewCredentialsAsATrustedHost();
         } catch (Exception e) {
-            throw new SecurityException(e.getMessage(), e);
+            log.warn("Renewing credentials as a trusted renewer failed", e);
+            gssCredentials = getProxyCredentials();
         }
+
+        return gssCredentials;
     }
 
+    /**
+     * Reads the credentials from credential store.
+     * @return If token is found in the credential store, will return a valid credential. Else returns null.
+     * @throws Exception If an error occurred while retrieving credentials.
+     */
+    public GSSCredential getCredentialsFromStore() throws Exception {
 
-    @SuppressWarnings("UnusedDeclaration")
-    public GlobusCredential getGlobusCredential() {
-        try {
-            if (gssCredentials == null || gssCredentials.getRemainingLifetime() < 10 * 90) {
-                globusCredential = myProxyManager.getGlobusCredential();
+        if (getCredentialReader() == null) {
+            return null;
+        }
+
+        Credential credential = getCredentialReader().getCredential(getRequestData().getGatewayId(),
+                getRequestData().getTokenId());
+
+        if (credential != null) {
+            if (credential instanceof CertificateCredential) {
+
+                log.info("Successfully found credentials for token id - " + getRequestData().getTokenId() +
+                        " gateway id - " + getRequestData().getGatewayId());
+
+                CertificateCredential certificateCredential = (CertificateCredential) credential;
+
+                X509Certificate[] certificates = new X509Certificate[1];
+                certificates[0] = certificateCredential.getCertificate();
+
+                X509Credential newCredential = new X509Credential(certificateCredential.getPrivateKey(), certificates);
+
+                return new GlobusGSSCredentialImpl(newCredential,
+                        GSSCredential.INITIATE_AND_ACCEPT);
+            } else {
+                log.info("Credential type is not CertificateCredential. Cannot create mapping globus credentials. " +
+                        "Credential type - " + credential.getClass().getName());
             }
-            return globusCredential;
-        } catch (Exception e) {
-            throw new SecurityException(e.getMessage(), e);
+        } else {
+            log.info("Could not find credentials for token - " + getRequestData().getTokenId() + " and "
+                    + "gateway id - " + getRequestData().getGatewayId());
         }
 
+        return null;
+    }
+
+    /**
+     * Gets the default proxy certificate.
+     * @return Default my proxy credentials.
+     * @throws GFacException If an error occurred while retrieving credentials.
+     */
+    public GSSCredential getDefaultCredentials() throws GFacException{
+        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
+        try {
+            return myproxy.get(getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
+                    getRequestData().getMyProxyLifeTime());
+        } catch (MyProxyException e) {
+            throw new GFacException("An error occurred while retrieving default security credentials.", e);
+        }
     }
 
+    /**
+     * Gets a new proxy certificate given current credentials.
+     * @return The short lived GSSCredentials
+     * @throws GFacException If an error is occurred while retrieving credentials.
+     */
+    public GSSCredential getProxyCredentials() throws GFacException {
 
-    @SuppressWarnings("UnusedDeclaration")
-    public String getGatewayUser() {
-        return gatewayUser;
+        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
+        try {
+            return myproxy.get(gssCredentials, getRequestData().getMyProxyUserName(), getRequestData().getMyProxyPassword(),
+                    getRequestData().getMyProxyLifeTime());
+        } catch (MyProxyException e) {
+            throw new GFacException("An error occurred while renewing security credentials using user/password.", e);
+        }
     }
 
-    public MyProxyManager getMyProxyManager() {
-        return myProxyManager;
+    /**
+     * Renew GSSCredentials.
+     * Before executing we need to add current host as a trusted renewer. Note to renew credentials
+     * we dont need user name and password.
+     * To do that execute following command
+     * > myproxy-logon -t <LIFETIME></LIFETIME> -s <MY PROXY SERVER> -l <USER NAME>
+     * E.g :- > myproxy-logon -t 264 -s myproxy.teragrid.org -l us3
+     *          Enter MyProxy pass phrase:
+     *          A credential has been received for user us3 in /tmp/x509up_u501.
+     * > myproxy-init -A --cert /tmp/x509up_u501 --key /tmp/x509up_u501 -l ogce -s myproxy.teragrid.org
+     * @return  Renewed credentials.
+     * @throws GFacException If an error occurred while renewing credentials.
+     */
+    public GSSCredential renewCredentialsAsATrustedHost() throws GFacException {
+        MyProxy myproxy = new MyProxy(getRequestData().getMyProxyServerUrl(), getRequestData().getMyProxyPort());
+
+        GetParams getParams = new GetParams();
+        getParams.setAuthzCreds(gssCredentials);
+        getParams.setUserName(getRequestData().getMyProxyUserName());
+        getParams.setLifetime(getRequestData().getMyProxyLifeTime());
+
+        try {
+            return myproxy.get(gssCredentials, getParams);
+        } catch (MyProxyException e) {
+            throw new GFacException("An error occurred while renewing security credentials.", e);
+        }
     }
 }

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SSHSecurityContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SSHSecurityContext.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SSHSecurityContext.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/context/security/SSHSecurityContext.java Sat Jul 13 00:49:09 2013
@@ -26,14 +26,14 @@ import net.schmizz.sshj.SSHClient;
 import net.schmizz.sshj.connection.channel.direct.Session;
 import net.schmizz.sshj.userauth.keyprovider.KeyProvider;
 
-import org.apache.airavata.gfac.context.JobExecutionContext;
+import org.apache.airavata.gfac.SecurityContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 /**
  * Handle SSH security
  */
-public class SSHSecurityContext extends SecurityContext {
+public class SSHSecurityContext implements SecurityContext {
 	private static final Logger log = LoggerFactory.getLogger(SSHSecurityContext.class);
 
 	public static final String SSH_SECURITY_CONTEXT = "ssh";

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/DBJobPersistenceManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/DBJobPersistenceManager.java?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/DBJobPersistenceManager.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/DBJobPersistenceManager.java Sat Jul 13 00:49:09 2013
@@ -0,0 +1,220 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.gfac.persistence;
+
+import org.apache.airavata.common.utils.DBUtil;
+import org.apache.airavata.gfac.GFacException;
+import org.apache.log4j.Logger;
+import org.globus.gram.internal.GRAMConstants;
+
+import java.sql.*;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 6/18/13
+ * Time: 4:16 PM
+ * Database based job persistence manager. Current default implementation.
+ */
+
+public class DBJobPersistenceManager implements JobPersistenceManager {
+
+    private DBUtil dbUtil;
+
+    private static final Logger log = Logger.getLogger(DBJobPersistenceManager.class);
+
+
+    public DBJobPersistenceManager(DBUtil db) {
+        this.dbUtil = db;
+    }
+
+    public synchronized void updateJobStatus(JobData jobData) throws GFacException {
+
+        if (jobData.getState() == GRAMConstants.STATUS_UNSUBMITTED) {
+            insertJob(jobData);
+        } else {
+
+            String sql = "update gram_job set status = ? where job_id = ?";
+
+            Connection connection = null;
+            PreparedStatement stmt = null;
+
+            try {
+                connection = getConnection();
+                stmt = connection.prepareStatement(sql);
+                stmt.setInt(1, jobData.getState());
+                stmt.setString(2, jobData.getJobId());
+
+                stmt.executeUpdate();
+                connection.commit();
+
+            } catch (SQLException e) {
+                throw new GFacException(e);
+            } finally {
+                try {
+                    if (stmt != null) {
+                        stmt.close();
+                    }
+
+                    if (connection != null) {
+                        connection.close();
+                    }
+
+                } catch (SQLException e) {
+                    log.error("Error closing streams", e);
+                }
+            }
+        }
+    }
+
+    private void insertJob(JobData jobData) throws GFacException {
+
+        String sql = "insert into gram_job values (?, ?)";
+
+        PreparedStatement stmt = null;
+        Connection connection = null;
+
+        try {
+            connection = getConnection();
+            stmt = connection.prepareStatement(sql);
+            stmt.setString(1, jobData.getJobId());
+            stmt.setInt(2, jobData.getState());
+
+            stmt.executeUpdate();
+        } catch (SQLException e) {
+            throw new GFacException(e);
+        } finally {
+            try {
+                if (stmt != null) {
+                    stmt.close();
+                }
+
+                if (connection != null) {
+                    connection.close();
+                }
+
+            } catch (SQLException e) {
+                log.error("Error closing streams", e);
+            }
+        }
+
+    }
+
+    public List<JobData> getRunningJobs() throws GFacException {
+
+        String sql = "select * from gram_job where status not in (?, ?, ?)";
+
+        int[] statuses = new int[3];
+        statuses[0] = GRAMConstants.STATUS_UNSUBMITTED;
+        statuses[1] = GRAMConstants.STATUS_DONE;
+        statuses[2] = GRAMConstants.STATUS_FAILED;
+
+        return getJobs(sql, statuses);
+    }
+
+    public List<JobData> getFailedJobs() throws GFacException {
+
+        String sql = "select * from gram_job where status in (?)";
+
+        int[] statuses = new int[1];
+        statuses[0] = GRAMConstants.STATUS_FAILED;
+
+        return getJobs(sql, statuses);
+    }
+
+    public List<JobData> getUnSubmittedJobs() throws GFacException {
+
+        String sql = "select * from gram_job where status in (?)";
+
+        int[] statuses = new int[1];
+        statuses[0] = GRAMConstants.STATUS_UNSUBMITTED;
+
+        return getJobs(sql, statuses);
+    }
+
+    public List<JobData> getSuccessfullyCompletedJobs() throws GFacException {
+
+        String sql = "select * from gram_job where status in (?)";
+
+        int[] statuses = new int[1];
+        statuses[0] = GRAMConstants.STATUS_DONE;
+
+        return getJobs(sql, statuses);
+
+    }
+
+
+    protected List<JobData> getJobs(String sql, int[] statuses) throws GFacException {
+
+        List<JobData> jobs = new ArrayList<JobData>();
+
+        PreparedStatement preparedStatement = null;
+        Connection connection = null;
+
+        try {
+            connection = getConnection();
+            preparedStatement = connection.prepareStatement(sql);
+
+            int index = 1;
+            for (int status : statuses) {
+                preparedStatement.setInt(index, status);
+                ++index;
+            }
+
+            ResultSet resultSet = preparedStatement.executeQuery();
+
+            while (resultSet.next()) {
+
+                String jobId = resultSet.getString("job_id");
+                int state = resultSet.getInt("status");
+
+                jobs.add(new JobData(jobId, state));
+            }
+
+        } catch (SQLException e) {
+            throw new GFacException(e);
+        } finally {
+            try {
+                if (preparedStatement != null) {
+                    preparedStatement.close();
+                }
+
+                if (connection != null) {
+                    connection.close();
+                }
+
+            } catch (SQLException e) {
+                log.error("Error closing connection", e);
+            }
+        }
+
+        return jobs;
+    }
+
+    private synchronized Connection getConnection() throws SQLException {
+        Connection connection = dbUtil.getConnection();
+        connection.setAutoCommit(true);
+
+        return connection;
+    }
+}

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobData.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobData.java?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobData.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobData.java Sat Jul 13 00:49:09 2013
@@ -0,0 +1,55 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.gfac.persistence;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 6/18/13
+ * Time: 2:34 PM
+ */
+
+public class JobData {
+
+    private String jobId;
+    private int state;
+
+    public JobData(String id, int state) {
+        this.jobId = id;
+        this.state = state;
+    }
+
+    public String getJobId() {
+        return jobId;
+    }
+
+    public void setJobId(String jobId) {
+        this.jobId = jobId;
+    }
+
+    public int getState() {
+        return state;
+    }
+
+    public void setState(int state) {
+        this.state = state;
+    }
+}

Added: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobPersistenceManager.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobPersistenceManager.java?rev=1502732&view=auto
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobPersistenceManager.java (added)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/persistence/JobPersistenceManager.java Sat Jul 13 00:49:09 2013
@@ -0,0 +1,76 @@
+/*
+ *
+ * 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.
+ *
+ */
+
+package org.apache.airavata.gfac.persistence;
+
+
+import org.apache.airavata.gfac.GFacException;
+
+import java.util.List;
+
+/**
+ * User: AmilaJ (amilaj@apache.org)
+ * Date: 6/18/13
+ * Time: 2:23 PM
+ */
+
+/**
+ * Responsible persisting job data. This data is useful during a restart.
+ * When restarting Airavata can resume monitoring currently executing jobs.
+ */
+public interface JobPersistenceManager {
+
+    /**
+     * Updates the job state in the persisting storage.
+     * @param jobData Job data to update.
+     * @throws GFacException If an error occurred while updating job data.
+     */
+    void updateJobStatus (JobData jobData) throws GFacException;
+
+    /**
+     * Get all running jobs.
+     * @return Job ids which are not failed nor completed.
+     * @throws GFacException If an error occurred while querying job data.
+     */
+    List<JobData> getRunningJobs() throws GFacException;
+
+    /**
+     * Get all failed job ids.
+     * @return Failed job ids.
+     * @throws GFacException If an error occurred while querying job data.
+     */
+    List<JobData> getFailedJobs() throws GFacException;
+
+    /**
+     * Get all un-submitted job ids.
+     * @return Un-submitted job ids.
+     * @throws GFacException If an error occurred while querying job data.
+     */
+    List<JobData> getUnSubmittedJobs() throws GFacException;
+
+    /**
+     * Get all successfully completed job ids.
+     * @return Successfully completed job ids.
+     * @throws GFacException If an error occurred while querying job data.
+     */
+    List<JobData> getSuccessfullyCompletedJobs() throws GFacException;
+
+}

Modified: airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java?rev=1502732&r1=1502731&r2=1502732&view=diff
==============================================================================
--- airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java (original)
+++ airavata/trunk/modules/gfac-core/src/main/java/org/apache/airavata/gfac/provider/GFacProvider.java Sat Jul 13 00:49:09 2013
@@ -51,4 +51,34 @@ public interface GFacProvider {
      * @throws GFacProviderException in case of a error cleaning resources.
      */
     void dispose(JobExecutionContext jobExecutionContext) throws GFacProviderException,GFacException;
+
+    /**
+     * Cancels all jobs relevant to an experiment.
+     * @param experimentId The experiment id
+     * @param jobExecutionContext The job execution context, contains runtime information.
+     * @throws GFacException If an error occurred while cancelling the job.
+     */
+    void cancelJob(String experimentId, JobExecutionContext jobExecutionContext) throws GFacException;
+
+    /**
+     * Cancels all jobs relevant to a workflow in an experiment.
+     * @param experimentId The experiment id
+     * @param workflowId The workflow id.
+     * @param jobExecutionContext The job execution context, contains runtime information.
+     * @throws GFacException If an error occurred while cancelling the job.
+     */
+    void cancelJob(String experimentId, String workflowId,
+                   JobExecutionContext jobExecutionContext) throws GFacException;
+
+    /**
+     * Cancels the job for a given a workflow id and node id in an experiment.
+     * @param experimentId The experiment id.
+     * @param workflowId The workflow id.
+     * @param nodeId The node id.
+     * @param jobExecutionContext The job execution context relevant to cancel job operation.
+     * @throws GFacException If an error occurred while cancelling the job.
+     */
+    void cancelJob(String experimentId, String workflowId, String nodeId,
+                   JobExecutionContext jobExecutionContext) throws GFacException;
+
 }