rave-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mpie...@apache.org
Subject svn commit: r1158925 - in /incubator/rave/sandbox/science-gateways: pom.xml rave-gateway-extensions/pom.xml rave-gateway-extensions/src/main/java/org/apache/rave/portal/service/impl/GsiUserService.java rave-merger/pom.xml
Date Wed, 17 Aug 2011 21:49:22 GMT
Author: mpierce
Date: Wed Aug 17 21:49:22 2011
New Revision: 1158925

URL: http://svn.apache.org/viewvc?rev=1158925&view=rev
Log:
(Rave-144) Initial checkin for getting GSI credentials.

Modified:
    incubator/rave/sandbox/science-gateways/pom.xml
    incubator/rave/sandbox/science-gateways/rave-gateway-extensions/pom.xml
    incubator/rave/sandbox/science-gateways/rave-gateway-extensions/src/main/java/org/apache/rave/portal/service/impl/GsiUserService.java
    incubator/rave/sandbox/science-gateways/rave-merger/pom.xml

Modified: incubator/rave/sandbox/science-gateways/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/science-gateways/pom.xml?rev=1158925&r1=1158924&r2=1158925&view=diff
==============================================================================
--- incubator/rave/sandbox/science-gateways/pom.xml (original)
+++ incubator/rave/sandbox/science-gateways/pom.xml Wed Aug 17 21:49:22 2011
@@ -48,6 +48,11 @@
         <enabled>false</enabled>
       </releases>
     </repository>
+    <repository>
+      <id>gateway.repo</id>
+      <name>OGCE Gateways Libraries</name>
+      <url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
+    </repository>
   </repositories>
 
 

Modified: incubator/rave/sandbox/science-gateways/rave-gateway-extensions/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/science-gateways/rave-gateway-extensions/pom.xml?rev=1158925&r1=1158924&r2=1158925&view=diff
==============================================================================
--- incubator/rave/sandbox/science-gateways/rave-gateway-extensions/pom.xml (original)
+++ incubator/rave/sandbox/science-gateways/rave-gateway-extensions/pom.xml Wed Aug 17 21:49:22
2011
@@ -37,6 +37,14 @@
   <packaging>war</packaging>
   <version>SNAPSHOT</version>
 
+  <repositories>
+    <repository>
+      <id>gateway.repo</id>
+      <name>OGCE Gateways Libraries</name>
+      <url>http://community.ucs.indiana.edu:9090/archiva/repository/ogce.m2.all</url>
+    </repository>
+  </repositories>
+
   <properties>
 	 <scope.sharedlib></scope.sharedlib>
 	 <cargo.version>1.1.0</cargo.version>

Modified: incubator/rave/sandbox/science-gateways/rave-gateway-extensions/src/main/java/org/apache/rave/portal/service/impl/GsiUserService.java
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/science-gateways/rave-gateway-extensions/src/main/java/org/apache/rave/portal/service/impl/GsiUserService.java?rev=1158925&r1=1158924&r2=1158925&view=diff
==============================================================================
--- incubator/rave/sandbox/science-gateways/rave-gateway-extensions/src/main/java/org/apache/rave/portal/service/impl/GsiUserService.java
(original)
+++ incubator/rave/sandbox/science-gateways/rave-gateway-extensions/src/main/java/org/apache/rave/portal/service/impl/GsiUserService.java
Wed Aug 17 21:49:22 2011
@@ -36,6 +36,21 @@ import org.springframework.security.core
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
+//GSI security imports
+import java.security.cert.X509Certificate;
+import org.ietf.jgss.GSSCredential;
+import org.ietf.jgss.GSSException;
+import org.globus.gsi.CertUtil;
+import org.globus.gsi.GlobusCredential;
+import org.globus.gsi.TrustedCertificates;
+import org.globus.gsi.gssapi.GlobusGSSCredentialImpl;
+import org.globus.myproxy.MyProxy;
+import org.globus.myproxy.MyProxyException;
+
+import xportlets.proxymanager.ProxyManager;
+import xportlets.proxymanager.ProxyStorageException;
+
+
 /**
  *
  */
@@ -45,7 +60,7 @@ public class GsiUserService extends Defa
     private static int defaultLifeTime = 60*24*100;
 	 private static String defaultServer="myproxy.teragrid.org";
 
-    protected static final Logger log = LoggerFactory.getLogger(GsiUserService.class);
+    protected static final Logger logger = LoggerFactory.getLogger(GsiUserService.class);
     private UserRepository userRepository;
 
     // public static String trustedCertsFile = "trustedCAs";
@@ -68,15 +83,22 @@ public class GsiUserService extends Defa
     }
 
     @Override
-    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException,
DataAccessException {
+	public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException,
DataAccessException {
         log.debug("loadUserByUsername called with: " + username);
+	logger.info("Running GSI login");
+	System.out.println("Running GSI login");
         final User user = userRepository.getByUsername(username);
         if(user == null) {
             throw new UsernameNotFoundException("User with username '" + username + "' was
not found!");
         }
-		  System.out.println("GSI User Service: Can do anything else here too.");
-		  MyProxy myproxy=new MyProxy(myproxyHostname,myproxyPortNumber);
-		  GSSCredential cred = myproxy.get(user.getUsername(), user.getPassword(), myproxyLifeTime);
  
+	try {
+	    MyProxy myproxy=new MyProxy(myproxyHostname,myproxyPortNumber);
+	    GSSCredential cred = myproxy.get(user.getUsername(), user.getPassword(), myproxyLifeTime);
  
+	}
+	catch (Exception ex) {
+	    logger.error("Could not get myproxy for "+username);
+	    ex.printStackTrace();
+	}
         return user;
     }
 }
\ No newline at end of file

Modified: incubator/rave/sandbox/science-gateways/rave-merger/pom.xml
URL: http://svn.apache.org/viewvc/incubator/rave/sandbox/science-gateways/rave-merger/pom.xml?rev=1158925&r1=1158924&r2=1158925&view=diff
==============================================================================
--- incubator/rave/sandbox/science-gateways/rave-merger/pom.xml (original)
+++ incubator/rave/sandbox/science-gateways/rave-merger/pom.xml Wed Aug 17 21:49:22 2011
@@ -34,7 +34,7 @@
   <artifactId>rave-gateway-merger</artifactId>
   <name>Apache Rave :: rave-sandbox-merger</name>
   <description>Apache Rave Project Sandbox</description>
-  <packaging>uberwar</packaging>
+  <packaging>${packaging.type}</packaging>
   <version>SNAPSHOT</version>
 
   <properties>
@@ -91,28 +91,24 @@
 
     <profiles>
         <profile>
-            <id>dist</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.codehaus.cargo</groupId>
-                        <artifactId>cargo-maven2-plugin</artifactId>
-                        <version>${cargo.version}</version>
-                        <executions>
-                            <execution>
-                                <id>dist-cargo-package</id>
-                                <phase>install</phase>
-                                <goals>
-                                    <goal>configure</goal>
-                                    <goal>package</goal>
-                                </goals>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-				</build>
-		  </profile>
-	 </profiles>
+            <id>uberwar</id>
+	    <activation>
+	      <activeByDefault>true</activeByDefault>
+	    </activation>
+	    <properties>
+	      <packaging.type>uberwar</packaging.type>
+	    </properties>
+	</profile>
+        <profile>
+            <id>war</id>
+	    <activation>
+	      <activeByDefault>true</activeByDefault>
+	    </activation>
+	    <properties>
+	      <packaging.type>war</packaging.type>
+	    </properties>
+	</profile>
+    </profiles>
 	 
 	 <build>
 		<defaultGoal>install</defaultGoal>
@@ -180,7 +176,7 @@
 					 </deployable>
 					 <deployable>
 						<groupId>org.apache.rave</groupId>
-						<artifactId>rave-portal</artifactId>
+						<artifactId>rave-gateway-merger</artifactId>
 						<type>war</type>
 						<properties>
 						  <context>/portal</context>



Mime
View raw message