Skip to Content.
Sympa Menu

perfsonar-dev - perfsonar: r2932 - in branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service: . authService testHarness testHarness/authService

Subject: perfsonar development work

List archive

perfsonar: r2932 - in branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service: . authService testHarness testHarness/authService


Chronological Thread 
  • From:
  • To:
  • Subject: perfsonar: r2932 - in branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service: . authService testHarness testHarness/authService
  • Date: Tue, 9 Oct 2007 07:02:08 -0400

Author: rodriguez
Date: 2007-10-09 07:02:07 -0400 (Tue, 09 Oct 2007)
New Revision: 2932

Added:

branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/testHarness/

branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/testHarness/authService/

branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/testHarness/authService/AuthNRequestTest.java
Modified:

branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/ASEngine.java

branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
Log:
Adding full support of UbC in the AuthServer. Also, it's using the last
eduGAIN library

Modified:
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/ASEngine.java
===================================================================
---
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/ASEngine.java
2007-10-09 11:00:39 UTC (rev 2931)
+++
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/ASEngine.java
2007-10-09 11:02:07 UTC (rev 2932)
@@ -1,11 +1,13 @@
package org.perfsonar.service.authService;

+import java.io.ByteArrayOutputStream;
+import java.io.PrintWriter;
import java.util.Arrays;
import java.util.List;
import java.util.Properties;

-import net.geant.edugain.base.eduGAINConfig;
-import net.geant.edugain.validation.eduGAINvalidator;
+import net.geant.edugain.base.Configurator;
+import net.geant.edugain.validation.Validator;

import org.ggf.ns.nmwg.base.v2_0.Message;
import org.perfsonar.base.auxiliary.AuxiliaryComponentManager;
@@ -23,8 +25,8 @@
private LoggerComponent logger = null; // The object to log
private ConfigurationComponent configuration;

- private eduGAINConfig cfg;
- private eduGAINvalidator val;
+ private Configurator cfg;
+ private Validator val;

public ASEngine() throws PerfSONARException {
this.acceptedTypes = Arrays.asList(new String[] {
ActionType.AUTHN_EE_REQUEST });
@@ -49,17 +51,24 @@
private void loadConfiguration() throws PerfSONARException {
props=new Properties();
props.put("provider",
configuration.getProperty("service.as.crypt_provider"));
- props.put("org.opensaml.ssl.keystore-pwd",
configuration.getProperty("service.as.truststore_password"));
-
props.put("org.opensaml.ssl.keystore",configuration.getProperty("service.as.truststore_file"));
-
props.put("net.geant.edugain.base.validation.valid-components",configuration.getProperty("service.as.valid_components"));
+ props.put(Configurator.PROPS_TRUSTSTORE_PASSWD,
configuration.getProperty("service.as.truststore_password"));
+
props.put(Configurator.PROPS_TRUSTSTORE_FILE,configuration.getProperty("service.as.truststore_file"));
+
props.put(Configurator.PROPS_VALID_COMPONENTS,configuration.getProperty("service.as.valid_components"));
try {
logger.debug("AuthNAction: getting the eduGAIN config
object...");
- cfg = eduGAINConfig.getInstance(props);
+ cfg = Configurator.getInstance(props);
logger.debug("AuthNAction: getting the eduGAIN
validator object...");
- val=new eduGAINvalidator(props);
+ val=new Validator(props);
} catch (Throwable e) {
- String m = "AuthNAction: There is a problem
initiating the eduGAIN environment: "+e.toString();
- logger.info(m);
+ e.printStackTrace();
+ String error="";
+ ByteArrayOutputStream baos=new
ByteArrayOutputStream();
+ PrintWriter pw=new PrintWriter(baos);
+ e.printStackTrace(pw);
+ error=baos.toString();
+ pw.close();
+ String m = "AuthNAction: There is a problem
initiating the eduGAIN environment: "+e.toString()+". Print Stack Trace:
"+error;
+ logger.fatal(m);
throw new PerfSONARException("error.authn.edugain",m);
}
}

Modified:
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
===================================================================
---
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
2007-10-09 11:00:39 UTC (rev 2931)
+++
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
2007-10-09 11:02:07 UTC (rev 2932)
@@ -2,8 +2,10 @@

import java.net.URI;
import java.security.cert.X509Certificate;
-import net.geant.edugain.validation.eduGAINvalidator;

+import net.geant.edugain.validation.ComponentID;
+import net.geant.edugain.validation.Validator;
+
import org.ggf.ns.nmwg.base.v2_0.Data;
import org.ggf.ns.nmwg.base.v2_0.EventType;
import org.ggf.ns.nmwg.base.v2_0.Message;
@@ -22,9 +24,9 @@
private static String TYPE_RESPONSE = "AuthNEEResponse";
private static String EVENT_TYPE_SUCCESS = "success.as.authn";
private static String SEC_TOKEN_PARAM = "SecurityToken";
- private eduGAINvalidator val;
+ private Validator val;

- public AuthNAction(eduGAINvalidator val) throws PerfSONARException {
+ public AuthNAction(Validator val) throws PerfSONARException {
super();
this.val=val;
}
@@ -95,8 +97,9 @@
try {
X509Certificate cert=(X509Certificate)stValue;
logger.info("AuthNAction: Validating X509
certificate");
- URI theUri=val.validate(cert);
+ ComponentID theUri=val.validate(cert);
} catch (Throwable e) {
+ e.printStackTrace();
String m = "AuthNAction: the X509 certificate is not
valid";
logger.info(m);
throw new
PerfSONARException("error.authn.x509_not_valid",m);

Added:
branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service/testHarness/authService/AuthNRequestTest.java



  • perfsonar: r2932 - in branches/new-structure/trunk/geant2_java-as/src/main/java/org/perfsonar/service: . authService testHarness testHarness/authService, svnlog, 10/09/2007

Archive powered by MHonArc 2.6.16.

Top of Page