Removed gsissh module from tools
Project: http://git-wip-us.apache.org/repos/asf/airavata/repo Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/13c2e79e Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/13c2e79e Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/13c2e79e Branch: refs/heads/master Commit: 13c2e79e416d95cc04a8b0fabd8bac5df862cd87 Parents: 2835d09 Author: Shameera Rathanyaka <[email protected]> Authored: Fri Jun 5 01:26:34 2015 -0400 Committer: Shameera Rathanyaka <[email protected]> Committed: Fri Jun 5 01:26:34 2015 -0400 ---------------------------------------------------------------------- modules/distribution/server/pom.xml | 632 -------- .../gfac/gfac-monitor/gfac-hpc-monitor/pom.xml | 158 -- tools/gsissh/README.txt | 8 - tools/gsissh/pom.xml | 156 -- tools/gsissh/src/main/java/SSHDemo.java | 242 --- .../java/com/jcraft/jsch/ExtendedSession.java | 41 - .../com/jcraft/jsch/GSISSHIdentityFile.java | 129 -- .../jcraft/jsch/GSISSHIdentityRepository.java | 29 - .../UserAuthGSSAPIWithMICGSSCredentials.java | 308 ---- .../illinois/ncsa/BCGSS/BCGSSContextImpl.java | 1447 ------------------ .../illinois/ncsa/BCGSS/CircularByteBuffer.java | 824 ---------- .../ncsa/BCGSS/GlobusTlsCipherFactory.java | 63 - .../illinois/ncsa/BCGSS/GlobusTlsClient.java | 247 --- .../edu/illinois/ncsa/BCGSS/TlsHandlerUtil.java | 282 ---- .../airavata/gfac/gsi/ssh/GSSContextX509.java | 210 --- .../airavata/gfac/gsi/ssh/api/Cluster.java | 162 -- .../gfac/gsi/ssh/api/CommandExecutor.java | 278 ---- .../airavata/gfac/gsi/ssh/api/CommandInfo.java | 34 - .../gfac/gsi/ssh/api/CommandOutput.java | 49 - .../apache/airavata/gfac/gsi/ssh/api/Core.java | 59 - .../apache/airavata/gfac/gsi/ssh/api/Node.java | 104 -- .../gfac/gsi/ssh/api/SSHApiException.java | 36 - .../airavata/gfac/gsi/ssh/api/ServerInfo.java | 65 - .../api/authentication/AuthenticationInfo.java | 32 - .../authentication/GSIAuthenticationInfo.java | 43 - .../authentication/SSHKeyAuthentication.java | 46 - .../SSHPasswordAuthentication.java | 43 - .../SSHPublicKeyAuthentication.java | 54 - .../SSHPublicKeyFileAuthentication.java | 52 - .../gfac/gsi/ssh/api/job/JobDescriptor.java | 473 ------ .../ssh/api/job/JobManagerConfiguration.java | 51 - .../airavata/gfac/gsi/ssh/api/job/JobType.java | 32 - .../gsi/ssh/api/job/LSFJobConfiguration.java | 121 -- .../gfac/gsi/ssh/api/job/LSFOutputParser.java | 130 -- .../gfac/gsi/ssh/api/job/OutputParser.java | 67 - .../gsi/ssh/api/job/PBSJobConfiguration.java | 119 -- .../gfac/gsi/ssh/api/job/PBSOutputParser.java | 212 --- .../gsi/ssh/api/job/SlurmJobConfiguration.java | 117 -- .../gfac/gsi/ssh/api/job/SlurmOutputParser.java | 190 --- .../gsi/ssh/api/job/UGEJobConfiguration.java | 119 -- .../gfac/gsi/ssh/api/job/UGEOutputParser.java | 188 --- .../gfac/gsi/ssh/config/ConfigReader.java | 76 - .../ssh/impl/DefaultJobSubmissionListener.java | 42 - .../gsi/ssh/impl/GSISSHAbstractCluster.java | 767 ---------- .../airavata/gfac/gsi/ssh/impl/JobStatus.java | 110 -- .../airavata/gfac/gsi/ssh/impl/PBSCluster.java | 45 - .../gfac/gsi/ssh/impl/RawCommandInfo.java | 55 - .../airavata/gfac/gsi/ssh/impl/SSHUserInfo.java | 63 - .../gfac/gsi/ssh/impl/StandardOutReader.java | 79 - .../gfac/gsi/ssh/impl/SystemCommandOutput.java | 78 - .../DefaultPasswordAuthenticationInfo.java | 48 - .../DefaultPublicKeyAuthentication.java | 68 - .../DefaultPublicKeyFileAuthentication.java | 70 - .../MyProxyAuthenticationInfo.java | 108 -- .../gfac/gsi/ssh/jsch/ExtendedJSch.java | 64 - .../gsi/ssh/listener/JobSubmissionListener.java | 81 - .../airavata/gfac/gsi/ssh/util/CommonUtils.java | 81 - .../ssh/util/SSHAPIUIKeyboardInteractive.java | 73 - .../gsi/ssh/util/SSHKeyPasswordHandler.java | 68 - .../airavata/gfac/gsi/ssh/util/SSHUtils.java | 757 --------- .../gsissh/src/main/resources/LSFTemplate.xslt | 93 -- .../gsissh/src/main/resources/PBSTemplate.xslt | 82 - .../src/main/resources/SLURMTemplate.xslt | 78 - .../gsissh/src/main/resources/UGETemplate.xslt | 74 - .../main/resources/schemas/PBSJobDescriptor.xsd | 114 -- .../resources/schemas/gsissh-schemas.xsdconfig | 14 - .../gfac/ssh/config/ConfigReaderTest.java | 37 - .../impl/DefaultSSHApiTestWithMyProxyAuth.java | 77 - .../gfac/ssh/impl/VanilaTestWithSSHAuth.java | 262 ---- .../gsissh/src/test/resources/gsissh.properties | 26 - .../gsissh/src/test/resources/log4j.properties | 34 - tools/gsissh/src/test/resources/sleep.pbs | 32 - tools/gsissh/src/test/resources/test.pbs | 30 - 73 files changed, 11338 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/modules/distribution/server/pom.xml ---------------------------------------------------------------------- diff --git a/modules/distribution/server/pom.xml b/modules/distribution/server/pom.xml deleted file mode 100644 index 8d645df..0000000 --- a/modules/distribution/server/pom.xml +++ /dev/null @@ -1,632 +0,0 @@ -<?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"> - <parent> - <groupId>org.apache.airavata</groupId> - <artifactId>distribution</artifactId> - <version>0.16-SNAPSHOT</version> - <relativePath>../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>apache-airavata-server</artifactId> - <name>Airavata server distribution</name> - <packaging>pom</packaging> - <url>http://airavata.apache.org/</url> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-dependency-plugin</artifactId> - <version>2.8</version> - <executions> - <execution> - <id>unpack</id> - <phase>compile</phase> - <goals> - <goal>unpack</goal> - </goals> - <configuration> - <artifactItems> - <artifactItem> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-server-configuration</artifactId> - <version>${project.version}</version> - <type>jar</type> - </artifactItem> - </artifactItems> - <!--includes>**/*.war</includes --> - <outputDirectory>${project.build.directory}/conf</outputDirectory> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.codehaus.gmaven</groupId> - <artifactId>gmaven-plugin</artifactId> - <version>1.4</version> - <executions> - <execution> - <id>generate-timestamp</id> - <phase>package</phase> - <goals> - <goal>execute</goal> - </goals> - <configuration> - <source> - import java.util.Date - import java.text.MessageFormat - project.properties['buildTimestamp'] = - MessageFormat.format("{0,date,dd-MM-yyyy}", new - Date()) - </source> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-assembly-plugin</artifactId> - <executions> - <execution> - <id>distribution-package</id> - <phase>package</phase> - <goals> - <goal>single</goal> - </goals> - <configuration> - <finalName>${archieve.name}-${project.version}</finalName> - <descriptors> - <descriptor>src/main/assembly/bin-assembly.xml</descriptor> - <!-- <descriptor>src/main/assembly/src-assembly.xml</descriptor> --> - </descriptors> - <attach>false</attach> - </configuration> - </execution> - </executions> - </plugin> - - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>build-helper-maven-plugin</artifactId> - <version>1.7</version> - <executions> - <execution> - <id>attach-artifacts</id> - <phase>package</phase> - <goals> - <goal>attach-artifact</goal> - </goals> - <configuration> - <artifacts> - <artifact> - <file>${airavata.bin.zip}</file> - <type>zip</type> - <classifier>bin</classifier> - </artifact> - <artifact> - <file>${airavata.bin.tar.gz}</file> - <type>tar.gz</type> - <classifier>bin</classifier> - </artifact> - </artifacts> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <dependencies> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derby</artifactId> - <version>${derby.version}</version> - </dependency> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derbyclient</artifactId> - <version>${derby.version}</version> - </dependency> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derbynet</artifactId> - <version>${derby.version}</version> - </dependency> - <dependency> - <groupId>org.apache.derby</groupId> - <artifactId>derbytools</artifactId> - <version>${derby.version}</version> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>jcl-over-slf4j</artifactId> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>com.amazonaws</groupId> - <artifactId>aws-java-sdk</artifactId> - <version>1.9.0</version> - <exclusions> - <exclusion> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>net.java.dev.jets3t</groupId> - <artifactId>jets3t</artifactId> - <version>0.8.0</version> - </dependency> - <dependency> - <groupId>commons-collections</groupId> - <artifactId>commons-collections</artifactId> - <version>3.2.1</version> - </dependency> - <dependency> - <groupId>commons-lang</groupId> - <artifactId>commons-lang</artifactId> - <version>2.4</version> - </dependency> - <dependency> - <groupId>commons-io</groupId> - <artifactId>commons-io</artifactId> - <version>2.4</version> - </dependency> - <dependency> - <groupId>commons-codec</groupId> - <artifactId>commons-codec</artifactId> - <version>1.6</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-standalone-server</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>app-catalog-cpi</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-messaging-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>app-catalog-data</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-common-utils</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.ws.commons.schema</groupId> - <artifactId>XmlSchema</artifactId> - </exclusion> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xmlParserAPIs</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.neethi</groupId> - <artifactId>neethi</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-orchestrator-service</artifactId> - <version>${project.version}</version> - <exclusions> - <exclusion> - <groupId>org.apache.ws.commons.schema</groupId> - <artifactId>XmlSchema</artifactId> - </exclusion> - <exclusion> - <groupId>xerces</groupId> - <artifactId>xmlParserAPIs</artifactId> - </exclusion> - <exclusion> - <groupId>org.apache.neethi</groupId> - <artifactId>neethi</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-orchestrator-stubs</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-stubs</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-orchestrator-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-registry-cpi</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-experiment-catalog</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-data-models</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-credential-store</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-ssh</artifactId> - <version>${project.version}</version> - </dependency> - <!--<dependency> --> - <!--<groupId>org.apache.airavata</groupId> --> - <!--<artifactId>airavata-gfac-gram</artifactId> --> - <!--<version>${project.version}</version> --> - <!--</dependency> --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-bes</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-gsissh</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-hpc-monitor</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-local</artifactId> - <version>${project.version}</version> - </dependency> - <!--<dependency> --> - <!--<groupId>org.apache.airavata</groupId> --> - <!--<artifactId>airavata-gfac-hadoop</artifactId> --> - <!--<version>${project.version}</version> --> - <!--</dependency> --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-service</artifactId> - <version>${project.version}</version> - </dependency> - <!--<dependency> --> - <!--<groupId>org.apache.airavata</groupId> --> - <!--<artifactId>airavata-message-monitor</artifactId> --> - <!--<version>${project.version}</version> --> - <!--</dependency> --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-workflow-model-core</artifactId> - <version>${project.version}</version> - </dependency> - <!--<dependency> --> - <!--<groupId>org.apache.airavata</groupId> --> - <!--<artifactId>airavata-messenger-commons</artifactId> --> - <!--<version>${project.version}</version> --> - <!--</dependency> --> - <!--<dependency> --> - <!--<groupId>org.apache.airavata</groupId> --> - <!--<artifactId>airavata-messenger-client</artifactId> --> - <!--<version>${project.version}</version> --> - <!--</dependency> --> - <!--<dependency> --> - <!--<groupId>org.apache.airavata</groupId> --> - <!--<artifactId>airavata-workflow-tracking</artifactId> --> - <!--<version>${project.version}</version> --> - <!--</dependency> --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>gsissh</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-model-utils</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-api-server</artifactId> - <version>${project.version}</version> - </dependency> - <!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>apache-airavata-samples</artifactId> - <type>zip</type> <version>${project.version}</version> </dependency --> - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk15on</artifactId> - </dependency> - <dependency> - <groupId>org.apache.openjpa</groupId> - <artifactId>openjpa-all</artifactId> - <version>2.2.0</version> - </dependency> - - <dependency> - <groupId>org.apache.shiro</groupId> - <artifactId>shiro-core</artifactId> - <version>1.2.1</version> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-client</artifactId> - <version>${jersey.version}</version> - </dependency> - <!--dependency> <groupId>org.apache.airavata</groupId> <artifactId>airavata-common-utils</artifactId> - <version>${project.version}</version> </dependency --> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>3.0.1</version> - <scope>provided</scope> - </dependency> - <dependency> - <groupId>org.apache.tomcat.embed</groupId> - <artifactId>tomcat-embed-logging-juli</artifactId> - <version>7.0.22</version> - </dependency> - <dependency> - <groupId>org.apache.tomcat.embed</groupId> - <artifactId>tomcat-embed-jasper</artifactId> - <version>7.0.22</version> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-servlet</artifactId> - <version>${jersey.version}</version> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-json</artifactId> - <version>${jersey.version}</version> - <exclusions> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - </exclusions> - - </dependency> - <dependency> - <groupId>com.sun.jersey.contribs</groupId> - <artifactId>jersey-multipart</artifactId> - <version>${jersey.version}</version> - </dependency> - <dependency> - <groupId>com.sun.jersey</groupId> - <artifactId>jersey-server</artifactId> - <version>${jersey.version}</version> - </dependency> - <!--dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-client</artifactId> - <version>${jersey.version}</version> </dependency --> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-mapper-asl</artifactId> - <version>1.9.2</version> - </dependency> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-xc</artifactId> - <version>1.9.2</version> - </dependency> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-jaxrs</artifactId> - <version>1.9.2</version> - </dependency> - <dependency> - <groupId>org.codehaus.jackson</groupId> - <artifactId>jackson-core-asl</artifactId> - <version>1.9.2</version> - </dependency> - <dependency> - <groupId>xerces</groupId> - <artifactId>xercesImpl</artifactId> - <version>2.9.1</version> - <exclusions> - <exclusion> - <groupId>xml-apis</groupId> - <artifactId>xml-apis</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>com.ibm.icu</groupId> - <artifactId>icu4j</artifactId> - <version>3.4.4</version> - </dependency> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>12.0</version> - </dependency> - - <!-- Hadoop provider related dependencies --> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-core</artifactId> - <version>1.0.3</version> - </dependency> - <dependency> - <groupId>org.apache.hadoop</groupId> - <artifactId>hadoop-client</artifactId> - <version>1.0.3</version> - </dependency> - <dependency> - <groupId>org.apache.whirr</groupId> - <artifactId>whirr-core</artifactId> - <version>0.7.1</version> - <exclusions> - <exclusion> - <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk16</artifactId> - </exclusion> - <exclusion> - <groupId>org.jclouds.driver</groupId> - <artifactId>jclouds-bouncycastle</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.whirr</groupId> - <artifactId>whirr-hadoop</artifactId> - <version>0.7.1</version> - </dependency> - <dependency> - <groupId>org.hamcrest</groupId> - <artifactId>hamcrest-all</artifactId> - <version>1.1</version> - </dependency> - <dependency> - <groupId>org.mockito</groupId> - <artifactId>mockito-all</artifactId> - <version>1.8.5</version> - </dependency> - <dependency> - <groupId>commons-configuration</groupId> - <artifactId>commons-configuration</artifactId> - <version>1.7</version> - </dependency> - <dependency> - <groupId>net.sf.jopt-simple</groupId> - <artifactId>jopt-simple</artifactId> - <version>3.2</version> - </dependency> - <dependency> - <groupId>org.ebaysf.web</groupId> - <artifactId>cors-filter</artifactId> - <version>${ebay.cors.filter}</version> - </dependency> - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch</artifactId> - <version>0.1.50</version> - </dependency> - <!-- dependency> <groupId>org.ogce</groupId> <artifactId>bcgss</artifactId> - <version>146</version> </dependency> --> - <dependency> - <groupId>org.apache.xmlbeans</groupId> - <artifactId>xmlbeans</artifactId> - <version>${xmlbeans.version}</version> - <exclusions> - <exclusion> - <groupId>stax</groupId> - <artifactId>stax-api</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.apache.thrift</groupId> - <artifactId>libthrift</artifactId> - <version>0.9.1</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.0.0</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-core</artifactId> - <version>2.0.0</version> - </dependency> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-annotations</artifactId> - <version>2.0.0</version> - </dependency> - <!-- zookeeper dependencies --> - - <dependency> - <groupId>org.apache.zookeeper</groupId> - <artifactId>zookeeper</artifactId> - <version>3.4.0</version> - </dependency> - <dependency> - <groupId>commons-cli</groupId> - <artifactId>commons-cli</artifactId> - <version>1.2</version> - </dependency> - - <dependency> - <groupId>com.rabbitmq</groupId> - <artifactId>amqp-client</artifactId> - <version>${amqp.client.version}</version> - </dependency> - <dependency> - <groupId>org.apache.curator</groupId> - <artifactId>curator-framework</artifactId> - <version>${curator.version}</version> - </dependency> - - <!-- ======================== Sample =================== --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-client-samples</artifactId> - <version>${project.version}</version> - </dependency> - </dependencies> - - - <properties> - <jersey.version>1.13</jersey.version> - <grizzly.version>2.0.0-M3</grizzly.version> - <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> - <archieve.name>apache-airavata-server</archieve.name> - <airavata.dist.name>${archieve.name}-${project.version}</airavata.dist.name> - <airavata.work.dir>${project.build.directory}/tests/${airavata.dist.name}</airavata.work.dir> - <airavata.bin.zip>${project.build.directory}/${airavata.dist.name}-bin.zip</airavata.bin.zip> - <airavata.bin.tar.gz>${project.build.directory}/${airavata.dist.name}-bin.tar.gz</airavata.bin.tar.gz> - </properties> -</project> http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml ---------------------------------------------------------------------- diff --git a/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml b/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml deleted file mode 100644 index c051783..0000000 --- a/modules/gfac/gfac-monitor/gfac-hpc-monitor/pom.xml +++ /dev/null @@ -1,158 +0,0 @@ -<?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>airavata-gfac-monitor</artifactId> - <groupId>org.apache.airavata</groupId> - <version>0.16-SNAPSHOT</version> - </parent> - <modelVersion>4.0.0</modelVersion> - - <artifactId>airavata-gfac-hpc-monitor</artifactId> - <name>Airavata GFac Grid Job Monitor</name> - <description>The Grid related monitoring implementation</description> - <url>http://airavata.apache.org/</url> - - <dependencies> - <!-- Logging --> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - </dependency> - - <!-- GFAC schemas --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-core</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-gsissh</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-gfac-ssh</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-registry-cpi</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-experiment-catalog</artifactId> - <version>${project.version}</version> - </dependency> - <!-- Workflow Tracking --> - <!--<dependency>--> - <!--<groupId>org.apache.airavata</groupId>--> - <!--<artifactId>airavata-workflow-tracking</artifactId>--> - <!--<version>${project.version}</version>--> - <!--</dependency>--> - <!-- Credential Store --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-credential-store</artifactId> - <version>${project.version}</version> - </dependency> - <!-- Test --> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <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> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-server-configuration</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-client-configuration</artifactId> - <scope>test</scope> - </dependency> - - <!-- Guava --> - <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>12.0</version> - </dependency> - <!-- gsi-ssh api dependencies --> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>gsissh</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata-data-models</artifactId> - <version>${project.version}</version> - </dependency> - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch</artifactId> - <version>0.1.50</version> - </dependency> - <dependency> - <groupId>org.apache.xmlbeans</groupId> - <artifactId>xmlbeans</artifactId> - <version>${xmlbeans.version}</version> - </dependency> - <!-- this is the dependency for amqp implementation --> - <dependency> - <groupId>com.fasterxml.jackson.core</groupId> - <artifactId>jackson-databind</artifactId> - <version>2.0.0</version> - </dependency> - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.apache.maven.plugins</groupId> - <artifactId>maven-surefire-plugin</artifactId> - <configuration> - <skip>false</skip> - <forkMode>always</forkMode> - <failIfNoTests>false</failIfNoTests> - </configuration> - </plugin> - <plugin> - <groupId>org.jsonschema2pojo</groupId> - <artifactId>jsonschema2pojo-maven-plugin</artifactId> - <version>0.4.0</version> - <configuration> - <sourceDirectory>${basedir}/src/main/resources/schema</sourceDirectory> - <targetPackage>org.apache.airavata</targetPackage> - </configuration> - <executions> - <execution> - <goals> - <goal>generate</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - -</project> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/README.txt ---------------------------------------------------------------------- diff --git a/tools/gsissh/README.txt b/tools/gsissh/README.txt deleted file mode 100644 index daf65d5..0000000 --- a/tools/gsissh/README.txt +++ /dev/null @@ -1,8 +0,0 @@ -To Run - -1. Go to lib and give execution permission to install.sh. - chmod +x install.sh -2. Execute install.sh - ./install.sh -3. Go to parent directory (gsissh) and executed following command; - mvn clean install -Dmyproxy.user=xxx -Dmyproxy.password=xxx http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/pom.xml ---------------------------------------------------------------------- diff --git a/tools/gsissh/pom.xml b/tools/gsissh/pom.xml deleted file mode 100644 index 7e5382b..0000000 --- a/tools/gsissh/pom.xml +++ /dev/null @@ -1,156 +0,0 @@ -<?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"> - <!-- the version of maven's project object model --> - - <parent> - <groupId>org.apache.airavata</groupId> - <artifactId>airavata</artifactId> - <version>0.16-SNAPSHOT</version> - <relativePath>../../pom.xml</relativePath> - </parent> - - <modelVersion>4.0.0</modelVersion> - <artifactId>gsissh</artifactId> - <name>GSISSH Library</name> - <description>The core function of the library is to do GSISSH interactions.</description> - <url>http://airavata.apache.org/</url> - - <prerequisites> - <maven>3.0</maven> - </prerequisites> - - <dependencies> - <dependency> - <groupId>com.jcraft</groupId> - <artifactId>jsch</artifactId> - <version>0.1.51</version> - </dependency> - <dependency> - <groupId>org.jglobus</groupId> - <artifactId>myproxy</artifactId> - <version>${jglobus.version}</version> - </dependency> - <dependency> - <groupId>org.jglobus</groupId> - <artifactId>gss</artifactId> - <version>${jglobus.version}</version> - </dependency> - <dependency> - <groupId>org.jglobus</groupId> - <artifactId>gram</artifactId> - <version>${jglobus.version}</version> - </dependency> - <dependency> - <groupId>org.jglobus</groupId> - <artifactId>gridftp</artifactId> - <version>${jglobus.version}</version> - </dependency> - <dependency> - <groupId>junit</groupId> - <artifactId>junit</artifactId> - <scope>test</scope> - </dependency> - <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-log4j12</artifactId> - </dependency> - <dependency> - <groupId>log4j</groupId> - <artifactId>log4j</artifactId> - </dependency> - <dependency> - <groupId>org.testng</groupId> - <artifactId>testng</artifactId> - <version>6.1.1</version> - <scope>test</scope> - </dependency> - <!-- dependency> - <groupId>org.ogce</groupId> - <artifactId>bcgss</artifactId> - <version>146</version> - </dependency> --> - <dependency> - <groupId>org.bouncycastle</groupId> - <artifactId>bcprov-jdk15on</artifactId> - </dependency> - <dependency> - <groupId>org.apache.xmlbeans</groupId> - <artifactId>xmlbeans</artifactId> - <version>${xmlbeans.version}</version> - </dependency> - <dependency> - <groupId>com.jcabi</groupId> - <artifactId>jcabi-aspects</artifactId> - <version>0.9</version> - <exclusions> - <exclusion> - <groupId>org.jboss.logging</groupId> - <artifactId>jboss-logging</artifactId> - </exclusion> - </exclusions> - </dependency> - <dependency> - <groupId>org.aspectj</groupId> - <artifactId>aspectjrt</artifactId> - <version>1.6.12</version> - <scope>runtime</scope> - </dependency> - - </dependencies> - - <build> - <plugins> - <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>xmlbeans-maven-plugin</artifactId> - <version>2.3.3</version> - <executions> - <execution> - <goals> - <goal>xmlbeans</goal> - </goals> - </execution> - </executions> - <inherited>true</inherited> - <configuration> - <schemaDirectory>src/main/resources/schemas</schemaDirectory> - <xmlConfigs> - <xmlConfig implementation="java.io.File">src/main/resources/schemas/gsissh-schemas.xsdconfig - </xmlConfig> - </xmlConfigs> - <outputJar>target/generated/${project.artifactId}-${project.version}.jar</outputJar> - </configuration> - </plugin> - </plugins> - <testSourceDirectory>${project.basedir}/src/test/java</testSourceDirectory> - <testOutputDirectory>${project.build.directory}/test-classes</testOutputDirectory> - <testResources> - <testResource> - <directory>${project.basedir}/src/test/resources</directory> - </testResource> - </testResources> - </build> - - <properties> - <jglobus.version>2.1.0</jglobus.version> - <surefire.version>2.12</surefire.version> - <junit.version>4.7</junit.version> - <log4j.version>1.2.17</log4j.version> - <org.slf4j.version>1.7.2</org.slf4j.version> - <skipTests>false</skipTests> - <xmlbeans.version>2.5.0</xmlbeans.version> - </properties> -</project> - http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/src/main/java/SSHDemo.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/SSHDemo.java b/tools/gsissh/src/main/java/SSHDemo.java deleted file mode 100644 index ea73e3c..0000000 --- a/tools/gsissh/src/main/java/SSHDemo.java +++ /dev/null @@ -1,242 +0,0 @@ -/* - * - * 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. - * - */ - -/** - * User: AmilaJ ([email protected]) - * Date: 8/6/13 - * Time: 1:08 PM - */ - - - -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/** - * This program will demonstrate remote exec. - * $ CLASSPATH=.:../build javac Exec.java - * $ CLASSPATH=.:../build java Exec - * You will be asked username, hostname, displayname, passwd and command. - * If everything works fine, given command will be invoked - * on the remote side and outputs will be printed out. - * - */ - -import com.jcraft.jsch.*; -import org.apache.airavata.gfac.ssh.jsch.ExtendedJSch; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; - -import javax.swing.*; -import java.awt.*; -import java.io.InputStream; - -/** - * A main class that demonstrates GSI-SSH execution. - */ -public class SSHDemo { - - private static final Logger logger = LoggerFactory.getLogger(SSHDemo.class); - static { - JSch.setConfig("gssapi-with-mic.x509", "org.apache.airavata.gfac.ssh.GSSContextX509"); - JSch.setConfig("userauth.gssapi-with-mic", "com.jcraft.jsch.UserAuthGSSAPIWithMICGSSCredentials"); - System.setProperty("X509_CERT_DIR", - "/Users/smarru/deploy/certificates"); - } - - public static void main(String[] arg) { - try { - - JSch jsch = new ExtendedJSch(); - - String host; - int port = 22; - - String inputString = JOptionPane.showInputDialog("Enter username@hostname:port", - "[email protected]"); - String user = inputString.substring(0, inputString.indexOf('@')); - - if (inputString.contains(":")) { - host = inputString.substring(inputString.indexOf('@') + 1, inputString.indexOf(':')); - String strPort = inputString.substring(inputString.indexOf(':') + 1); - port = Integer.parseInt(strPort); - - } else { - host = inputString.substring(inputString.indexOf('@') + 1); - } - - Session session = jsch.getSession(user, host, port); - HostKey hostKey = session.getHostKey(); - - java.util.Properties config = new java.util.Properties(); - config.put("StrictHostKeyChecking", "no"); - session.setConfig(config); - - session.connect(); - - String command = JOptionPane.showInputDialog("Enter command", - "echo \"Hello World\""); - - Channel channel = session.openChannel("exec"); - ((ChannelExec) channel).setCommand(command); - - // X Forwarding - // channel.setXForwarding(true); - - //channel.setInputStream(System.in); - channel.setInputStream(null); - - //channel.setOutputStream(System.out); - - //FileOutputStream fos=new FileOutputStream("/tmp/stderr"); - //((ChannelExec)channel).setErrStream(fos); - ((ChannelExec) channel).setErrStream(System.err); - - InputStream in = channel.getInputStream(); - - channel.connect(); - - byte[] tmp = new byte[1024]; - while (true) { - while (in.available() > 0) { - int i = in.read(tmp, 0, 1024); - if (i < 0) break; - System.out.print(new String(tmp, 0, i)); - } - if (channel.isClosed()) { - System.out.println("exit-status: " + channel.getExitStatus()); - break; - } - try { - Thread.sleep(1000); - } catch (Exception ignored) { - logger.debug(ignored.getMessage(), ignored); - } - } - channel.disconnect(); - session.disconnect(); - } catch (Exception e) { - logger.error(e.getMessage(), e); - } - } - - public static class MyUserInfo implements UserInfo, UIKeyboardInteractive { - public String getPassword() { - return passwd; - } - - public boolean promptYesNo(String str) { - Object[] options = {"yes", "no"}; - int foo = JOptionPane.showOptionDialog(null, - str, - "Warning", - JOptionPane.DEFAULT_OPTION, - JOptionPane.WARNING_MESSAGE, - null, options, options[0]); - return foo == 0; - } - - String passwd; - JTextField passwordField = (JTextField) new JPasswordField(20); - - public String getPassphrase() { - return null; - } - - public boolean promptPassphrase(String message) { - return true; - } - - public boolean promptPassword(String message) { - Object[] ob = {passwordField}; - int result = - JOptionPane.showConfirmDialog(null, ob, message, - JOptionPane.OK_CANCEL_OPTION); - if (result == JOptionPane.OK_OPTION) { - passwd = passwordField.getText(); - return true; - } else { - return false; - } - } - - public void showMessage(String message) { - JOptionPane.showMessageDialog(null, message); - } - - final GridBagConstraints gbc = - new GridBagConstraints(0, 0, 1, 1, 1, 1, - GridBagConstraints.NORTHWEST, - GridBagConstraints.NONE, - new Insets(0, 0, 0, 0), 0, 0); - private Container panel; - - public String[] promptKeyboardInteractive(String destination, - String name, - String instruction, - String[] prompt, - boolean[] echo) { - panel = new JPanel(); - panel.setLayout(new GridBagLayout()); - - gbc.weightx = 1.0; - gbc.gridwidth = GridBagConstraints.REMAINDER; - gbc.gridx = 0; - panel.add(new JLabel(instruction), gbc); - gbc.gridy++; - - gbc.gridwidth = GridBagConstraints.RELATIVE; - - JTextField[] texts = new JTextField[prompt.length]; - for (int i = 0; i < prompt.length; i++) { - gbc.fill = GridBagConstraints.NONE; - gbc.gridx = 0; - gbc.weightx = 1; - panel.add(new JLabel(prompt[i]), gbc); - - gbc.gridx = 1; - gbc.fill = GridBagConstraints.HORIZONTAL; - gbc.weighty = 1; - if (echo[i]) { - texts[i] = new JTextField(20); - } else { - texts[i] = new JPasswordField(20); - } - panel.add(texts[i], gbc); - gbc.gridy++; - } - - if (JOptionPane.showConfirmDialog(null, panel, - destination + ": " + name, - JOptionPane.OK_CANCEL_OPTION, - JOptionPane.QUESTION_MESSAGE) - == JOptionPane.OK_OPTION) { - String[] response = new String[prompt.length]; - for (int i = 0; i < prompt.length; i++) { - response[i] = texts[i].getText(); - } - return response; - } else { - return null; // cancel - } - } - } - - -} http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java b/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java deleted file mode 100644 index 5b7f7d7..0000000 --- a/tools/gsissh/src/main/java/com/jcraft/jsch/ExtendedSession.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * 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 com.jcraft.jsch; - -import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo; - -public class ExtendedSession extends Session { - - private GSIAuthenticationInfo authenticationInfo; - - public ExtendedSession(JSch jsch, String username, String host, int port) throws JSchException { - super(jsch, username, host, port); - } - - public GSIAuthenticationInfo getAuthenticationInfo() { - return authenticationInfo; - } - - public void setAuthenticationInfo(GSIAuthenticationInfo authenticationInfo) { - this.authenticationInfo = authenticationInfo; - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java b/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java deleted file mode 100644 index 8601973..0000000 --- a/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityFile.java +++ /dev/null @@ -1,129 +0,0 @@ -/* - * - * 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 com.jcraft.jsch; - -import java.io.*; -import com.jcraft.jsch.*; - -/** - * NOTE : This is class is directly created using com.jcraft.jsch.IdentityFile - * IdentityFile has private access. Therefore to suit our requirements we modify IdentityFile - * with public access. - */ -public class GSISSHIdentityFile implements Identity { - private JSch jsch; - private KeyPair kpair; - private String identity; - - public static GSISSHIdentityFile newInstance(String prvfile, String pubfile, JSch jsch) throws JSchException{ - KeyPair kpair = KeyPair.load(jsch, prvfile, pubfile); - return new GSISSHIdentityFile(jsch, prvfile, kpair); - } - - public static GSISSHIdentityFile newInstance(String name, byte[] prvkey, byte[] pubkey, JSch jsch) throws JSchException{ - KeyPair kpair = KeyPair.load(jsch, prvkey, pubkey); - return new GSISSHIdentityFile(jsch, name, kpair); - } - - private GSISSHIdentityFile(JSch jsch, String name, KeyPair kpair) throws JSchException{ - this.jsch = jsch; - this.identity = name; - this.kpair = kpair; - } - - /** - * Decrypts this identity with the specified pass-phrase. - * @param passphrase the pass-phrase for this identity. - * @return <tt>true</tt> if the decryption is succeeded - * or this identity is not cyphered. - */ - public boolean setPassphrase(byte[] passphrase) throws JSchException{ - return kpair.decrypt(passphrase); - } - - /** - * Returns the public-key blob. - * @return the public-key blob - */ - public byte[] getPublicKeyBlob(){ - return kpair.getPublicKeyBlob(); - } - - /** - * Signs on data with this identity, and returns the result. - * @param data data to be signed - * @return the signature - */ - public byte[] getSignature(byte[] data){ - return kpair.getSignature(data); - } - - /** - * @deprecated This method should not be invoked. - * @see #setPassphrase(byte[] passphrase) - */ - public boolean decrypt(){ - throw new RuntimeException("not implemented"); - } - - /** - * Returns the name of the key algorithm. - * @return "ssh-rsa" or "ssh-dss" - */ - public String getAlgName(){ - return new String(kpair.getKeyTypeName()); - } - - /** - * Returns the name of this identity. - * It will be useful to identify this object in the {@link IdentityRepository}. - */ - public String getName(){ - return identity; - } - - /** - * Returns <tt>true</tt> if this identity is cyphered. - * @return <tt>true</tt> if this identity is cyphered. - */ - public boolean isEncrypted(){ - return kpair.isEncrypted(); - } - - /** - * Disposes internally allocated data, like byte array for the private key. - */ - public void clear(){ - kpair.dispose(); - kpair = null; - } - - /** - * Returns an instance of {@link KeyPair} used in this {@link Identity}. - * @return an instance of {@link KeyPair} used in this {@link Identity}. - */ - public KeyPair getKeyPair(){ - return kpair; - } -} - http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java b/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java deleted file mode 100644 index 89646c5..0000000 --- a/tools/gsissh/src/main/java/com/jcraft/jsch/GSISSHIdentityRepository.java +++ /dev/null @@ -1,29 +0,0 @@ -/* - * - * 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 com.jcraft.jsch; - -public class GSISSHIdentityRepository extends LocalIdentityRepository { - - public GSISSHIdentityRepository(JSch jsch) { - super(jsch); - } -} http://git-wip-us.apache.org/repos/asf/airavata/blob/13c2e79e/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java ---------------------------------------------------------------------- diff --git a/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java b/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java deleted file mode 100644 index d9fb822..0000000 --- a/tools/gsissh/src/main/java/com/jcraft/jsch/UserAuthGSSAPIWithMICGSSCredentials.java +++ /dev/null @@ -1,308 +0,0 @@ -/* - * - * 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 com.jcraft.jsch; - -import java.util.ArrayList; -import java.util.Iterator; -import java.util.List; - -import org.apache.airavata.gfac.ssh.GSSContextX509; -import org.apache.airavata.gfac.ssh.api.authentication.GSIAuthenticationInfo; -import org.globus.gsi.gssapi.GSSConstants; -import org.ietf.jgss.GSSException; -import org.ietf.jgss.Oid; - -/* -*-mode:java; c-basic-offset:2; indent-tabs-mode:nil -*- */ -/* - * Copyright(c)2004,2005,2006 ymnk, JCraft,Inc. All rights reserved. - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. 2. Redistributions in - * binary form must reproduce the above copyright notice, this list of - * conditions and the following disclaimer in the documentation and/or other - * materials provided with the distribution. 3. The names of the authors may not - * be used to endorse or promote products derived from this software without - * specific prior written permission. THIS SOFTWARE IS PROVIDED ``AS IS'' AND - * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS - * SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, - * OR CONSEQUENTIAL DAMAGES(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - * INTERRUPTION)HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - * CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE)ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGE. - */ - -/** - * This class now supports two mappings to the gssapi-with-mic method: x509 - * (preferred) and krb5. - * - * @author Al Rossi - * @author Jeff Overbey - */ -public class UserAuthGSSAPIWithMICGSSCredentials extends UserAuth { - - private static final int SSH_MSG_USERAUTH_GSSAPI_RESPONSE = 60; - private static final int SSH_MSG_USERAUTH_GSSAPI_TOKEN = 61; - // private static final int SSH_MSG_USERAUTH_GSSAPI_EXCHANGE_COMPLETE = 63; - private static final int SSH_MSG_USERAUTH_GSSAPI_ERROR = 64; - private static final int SSH_MSG_USERAUTH_GSSAPI_ERRTOK = 65; - private static final int SSH_MSG_USERAUTH_GSSAPI_MIC = 66; - - // this is the preferred order - private static String[] supportedMethods = { "gssapi-with-mic.x509", - "gssapi-with-mic.krb5" }; - private static byte[][] supportedOids; - - static { - try { - supportedOids = new byte[][] { - GSSConstants.MECH_OID.getDER(), - new Oid("1.2.840.113554.1.2.2").getDER() }; - } catch (GSSException gsse) { - gsse.printStackTrace(); - } - } - - @Override - public boolean start(Session session) throws Exception { - - // this.userinfo = userinfo; - Packet packet = session.packet; - Buffer buf = session.buf; - final String username = session.username; - byte[] _username = Util.str2byte(username); - - // checkForSupportedOIDs - List methods = new ArrayList(); - boolean found = false; - for (int i = 0; i < supportedOids.length; i++) { - found = found - || checkForSupportedOIDs(methods, packet, buf, i, - _username, session); - } - - if (!found) - return false; - - // logger.debug( "supported methods " + methods ); - - boolean success = false; - for (Iterator it = methods.iterator(); it.hasNext();) { - String method = (String) it.next(); - success = tryMethod(username, _username, method, session, packet, - buf); - if (success) - break; - } - return success; - - } - - private boolean checkForSupportedOIDs(List methods, Packet packet, - Buffer buf, int index, byte[] _username, Session session) - throws Exception { - packet.reset(); - - // byte SSH_MSG_USERAUTH_REQUEST(50) - // string user name(in ISO-10646 UTF-8 encoding) - // string service name(in US-ASCII) - // string "gssapi"(US-ASCII) - // uint32 n, the number of OIDs client supports - // string[n] mechanism OIDS - buf.putByte((byte) SSH_MSG_USERAUTH_REQUEST); - buf.putString(_username); - buf.putString("ssh-connection".getBytes()); - buf.putString("gssapi-with-mic".getBytes()); - buf.putInt(1); - buf.putString(supportedOids[index]); - session.write(packet); - - while (true) { - buf = session.read(buf); - - if (buf.buffer[5] == SSH_MSG_USERAUTH_FAILURE) { - return false; - } - - if (buf.buffer[5] == SSH_MSG_USERAUTH_GSSAPI_RESPONSE) { - buf.getInt(); - buf.getByte(); - buf.getByte(); - byte[] message = buf.getString(); - // logger.debug( "OID " + supportedOids[index] ); - if (Util.array_equals(message, supportedOids[index])) { - methods.add(supportedMethods[index]); - // logger.debug( "OID MATCH, method is " + methods ); - return true; - } - } - - if (buf.buffer[5] == SSH_MSG_USERAUTH_BANNER) { - buf.getInt(); - buf.getByte(); - buf.getByte(); - byte[] _message = buf.getString(); - buf.getString(); - String message = Util.byte2str(_message); - if (userinfo != null) { - userinfo.showMessage(message); - } - continue; - } - return false; - } - } - - private boolean tryMethod(String username, byte[] _username, String method, - Session session, Packet packet, Buffer buf) throws Exception { - GSSContext context = null; - try { - Class c = Class.forName(session.getConfig(method)); - context = (GSSContext) (c.newInstance()); - - } catch (Exception e) { - // logger.error( "could not instantiate GSSContext", e ); - return false; - } - - // Get the credentials and set them - // Not a good way, but we dont have any choice - if (session instanceof ExtendedSession) { - GSIAuthenticationInfo authenticationInfo = ((ExtendedSession) session).getAuthenticationInfo(); - - if (context instanceof GSSContextX509) { - ((GSSContextX509) context).setCredential(authenticationInfo.getCredentials()); - } - } - - // logger.debug( "GOT CONTEXT: " + context ); - - - // FIXME - // if ( userinfo instanceof IX509UserInfo ) { - // if ( context instanceof GSSContextX509 ) { - // GSSCredential credential = ( ( IX509UserInfo )userinfo - // ).getCredential(); - // logger.debug( "user info credential = " + credential ); - // ( ( GSSContextX509 )context ).setCredential( credential ); - // } - // } - - try { - context.create(username, session.host); - } catch (JSchException e) { - // logger.error( "context creation failed", e ); - return false; - } - - byte[] token = new byte[0]; - - while (!context.isEstablished()) { - try { - token = context.init(token, 0, token.length); - } catch (JSchException e) { - // logger.error( "context initialization failed", e ); - // TODO - // ERRTOK should be sent? - // byte SSH_MSG_USERAUTH_GSSAPI_ERRTOK - // string error token - return false; - } - - if (token != null) { - packet.reset(); - buf.putByte((byte) SSH_MSG_USERAUTH_GSSAPI_TOKEN); - buf.putString(token); - session.write(packet); - } - - if (!context.isEstablished()) { - buf = session.read(buf); - - if (buf.buffer[5] == SSH_MSG_USERAUTH_GSSAPI_ERROR) { - // uint32 major_status - // uint32 minor_status - // string message - // string language tag - buf = session.read(buf); - } else if (buf.buffer[5] == SSH_MSG_USERAUTH_GSSAPI_ERRTOK) { - buf = session.read(buf); - } - - if (buf.buffer[5] == SSH_MSG_USERAUTH_FAILURE) { - return false; - } - - buf.getInt(); - buf.getByte(); - buf.getByte(); - token = buf.getString(); - } - } - - Buffer mbuf = new Buffer(); - // string session identifier - // byte SSH_MSG_USERAUTH_REQUEST - // string user name - // string service - // string "gssapi-with-mic" - mbuf.putString(session.getSessionId()); - mbuf.putByte((byte) SSH_MSG_USERAUTH_REQUEST); - mbuf.putString(_username); - mbuf.putString("ssh-connection".getBytes()); - mbuf.putString("gssapi-with-mic".getBytes()); - - byte[] mic = context.getMIC(mbuf.buffer, 0, mbuf.getLength()); - - if (mic == null) { // there was an error in the getMIC call - return false; - } - - packet.reset(); - buf.putByte((byte) SSH_MSG_USERAUTH_GSSAPI_MIC); - buf.putString(mic); - session.write(packet); - - context.dispose(); - - buf = session.read(buf); - if (buf.buffer[5] == SSH_MSG_USERAUTH_SUCCESS) { - return true; - } - if (buf.buffer[5] == SSH_MSG_USERAUTH_FAILURE) { - buf.getInt(); - buf.getByte(); - buf.getByte(); - byte[] foo = buf.getString(); - int partial_success = buf.getByte(); - if (partial_success != 0) { - throw new JSchPartialAuthException(new String(foo)); - } - } - return false; - } -} -
