perfsonar-dev - perfsonar: r3272 - in trunk: geant2_java-as/ant geant2_java-as/conf geant2_java-as/conf/axis-1.4 geant2_java-as/conf/axis-1.4/WEB-INF geant2_java-as/src/main/java/org/perfsonar/service geant2_java-as/src/main/java/org/perfsonar/service/authService geant2_java-as/src/main/java/org/perfsonar/service/webadmin perfsonar_base/src/main/java/org/perfsonar/service/base/authn
Subject: perfsonar development work
List archive
perfsonar: r3272 - in trunk: geant2_java-as/ant geant2_java-as/conf geant2_java-as/conf/axis-1.4 geant2_java-as/conf/axis-1.4/WEB-INF geant2_java-as/src/main/java/org/perfsonar/service geant2_java-as/src/main/java/org/perfsonar/service/authService geant2_java-as/src/main/java/org/perfsonar/service/webadmin perfsonar_base/src/main/java/org/perfsonar/service/base/authn
Chronological Thread
- From:
- To:
- Subject: perfsonar: r3272 - in trunk: geant2_java-as/ant geant2_java-as/conf geant2_java-as/conf/axis-1.4 geant2_java-as/conf/axis-1.4/WEB-INF geant2_java-as/src/main/java/org/perfsonar/service geant2_java-as/src/main/java/org/perfsonar/service/authService geant2_java-as/src/main/java/org/perfsonar/service/webadmin perfsonar_base/src/main/java/org/perfsonar/service/base/authn
- Date: Mon, 28 Jan 2008 06:04:12 -0500
Author: rodriguez
Date: 2008-01-28 06:04:12 -0500 (Mon, 28 Jan 2008)
New Revision: 3272
Added:
trunk/geant2_java-as/conf/axis-1.4/default.css
trunk/geant2_java-as/conf/axis-1.4/main.css
trunk/geant2_java-as/conf/axis-1.4/partners.gif
trunk/geant2_java-as/conf/axis-1.4/perfsonar_logo.gif
trunk/geant2_java-as/conf/servlet.properties.template
trunk/geant2_java-as/conf/wizard.properties.template
trunk/geant2_java-as/src/main/java/org/perfsonar/service/webadmin/
trunk/geant2_java-as/src/main/java/org/perfsonar/service/webadmin/ASHandler.java
Modified:
trunk/geant2_java-as/ant/axis-deploy-targets.xml
trunk/geant2_java-as/ant/configure-targets.xml
trunk/geant2_java-as/ant/libs-download-targets.xml
trunk/geant2_java-as/conf/axis-1.4/WEB-INF/web.xml
trunk/geant2_java-as/conf/axis-1.4/index.html
trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
Log:
- Fixing a bug with WS-SEC
- Adding the perfSONAR Web Admin Tool
Modified: trunk/geant2_java-as/ant/axis-deploy-targets.xml
===================================================================
--- trunk/geant2_java-as/ant/axis-deploy-targets.xml 2008-01-25 22:57:52
UTC (rev 3271)
+++ trunk/geant2_java-as/ant/axis-deploy-targets.xml 2008-01-28 11:04:12
UTC (rev 3272)
@@ -16,7 +16,13 @@
xmlns:psbase="psbase:/base.perfsonar.org">
<psbase:copy-axis-config
dest-conf-path="${service.home}/${deploy.root}"/>
+ <copy file="${basedir}/conf/axis-1.4/default.css"
todir="${service.home}/${deploy.root}"/>
+ <copy file="${basedir}/conf/axis-1.4/main.css"
todir="${service.home}/${deploy.root}"/>
+ <copy file="${basedir}/conf/axis-1.4/partners.gif"
todir="${service.home}/${deploy.root}"/>
+ <copy file="${basedir}/conf/axis-1.4/perfsonar_logo.gif"
todir="${service.home}/${deploy.root}"/>
+ <copy file="${basedir}/conf/servlet.properties"
todir="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf"/>
+ <copy file="${basedir}/conf/wizard.properties"
todir="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf"/>
</target>
<target name="copy-dep-base-service-jars"
@@ -29,8 +35,12 @@
<target name="copy-dep-service-jars"
depends="copy-dep-base-service-jars">
- <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20070814/nmwg-1.0.20070814.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
- <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20071008/perfsonar-base-1.0.20071008.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/nmwg/nmwg/1.0.20080124/nmwg-1.0.20080124.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-base/1.0.20080115/perfsonar-base-1.0.20080115.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/perfsonar/perfsonar-web-admin/0.5b/perfsonar-web-admin-0.5b.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/commons-io/commons-io/1.3.2/commons-io-1.3.2.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/commons-codec/commons-codec/1.3/commons-codec-1.3.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
+ <copy
file="${basedir}/lib/repository/commons-fileupload/commons-fileupload/1.2/commons-fileupload-1.2.jar"
todir="${service.home}/${deploy.root}/WEB-INF/lib"/>
<copy file="${basedir}/conf/wsdd/${wsdd.file.deploy}"
todir="${service.home}/${deploy.root}/wsdd"/>
<copy file="${basedir}/conf/wsdd/${wsdd.file.undeploy}"
todir="${service.home}/${deploy.root}/wsdd"/>
Modified: trunk/geant2_java-as/ant/configure-targets.xml
===================================================================
--- trunk/geant2_java-as/ant/configure-targets.xml 2008-01-25 22:57:52
UTC (rev 3271)
+++ trunk/geant2_java-as/ant/configure-targets.xml 2008-01-28 11:04:12
UTC (rev 3272)
@@ -61,7 +61,7 @@
<entry key="service.log.log4j.config"
value="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf/log4j.properties"/>
<entry key="service.as.truststore_file"
value="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf/perfSONARtruststore.jks"/>
<entry key="service.as.valid_components"
value="${service.home}/${deploy.root}/WEB-INF/classes/perfsonar/conf/ASValidComponentsFile"/>
-
+
<!-- for LookupInfoRequest message -->
<entry key="service.r.service_type" value="AS"/>
<entry key="service.r.service_name" value="${service.name}"/>
@@ -83,6 +83,12 @@
<psbase:template-use template-file="conf/components.properties.template"
dest-file="conf/components.properties"/>
+ <psbase:template-use template-file="conf/servlet.properties.template"
+ dest-file="conf/servlet.properties"/>
+
+ <psbase:template-use template-file="conf/wizard.properties.template"
+ dest-file="conf/wizard.properties"/>
+
<property file="const.properties"/>
<psbase:set-log4j-config template-file="conf/log4j.properties.template"
dest-file="conf/log4j.properties"
Modified: trunk/geant2_java-as/ant/libs-download-targets.xml
===================================================================
--- trunk/geant2_java-as/ant/libs-download-targets.xml 2008-01-25 22:57:52
UTC (rev 3271)
+++ trunk/geant2_java-as/ant/libs-download-targets.xml 2008-01-28 11:04:12
UTC (rev 3272)
@@ -55,8 +55,15 @@
<artifact:dependencies>
<dependency groupId="perfsonar" artifactId="perfsonar-base"
version="1.0.20080115"/>
- <dependency groupId="nmwg" artifactId="nmwg"
version="1.0.20071008"/>
+ <dependency groupId="perfsonar" artifactId="perfsonar-web-admin"
version="0.5b"/>
+ <dependency groupId="nmwg" artifactId="nmwg"
version="1.0.20080124"/>
+ <!-- dependencies for perfsonar-web-admin -->
+ <dependency groupId="commons-io"
artifactId="commons-io" version="1.3.2"/>
+ <dependency groupId="commons-codec"
artifactId="commons-codec" version="1.3"/>
+ <dependency groupId="commons-fileupload"
artifactId="commons-fileupload" version="1.2"/>
+ <dependency groupId="perfsonar"
artifactId="perfsonar-web-admin" version="0.5b"/>
+
<localRepository refid="local.repository"/>
<remoteRepository refid="remote.repository"/>
Modified: trunk/geant2_java-as/conf/axis-1.4/WEB-INF/web.xml
===================================================================
--- trunk/geant2_java-as/conf/axis-1.4/WEB-INF/web.xml 2008-01-25 22:57:52
UTC (rev 3271)
+++ trunk/geant2_java-as/conf/axis-1.4/WEB-INF/web.xml 2008-01-28 11:04:12
UTC (rev 3272)
@@ -71,6 +71,42 @@
<url-pattern>/servlet/AdminServlet</url-pattern>
</servlet-mapping>
-->
+ <!-- Properties configuration servlet -->
+ <servlet>
+ <servlet-name>
+ ServiceAdmin
+ </servlet-name>
+ <servlet-class>
+ perfSONARWebAdmin.admin.service.Admin
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>
+ ServiceAdmin
+ </servlet-name>
+ <url-pattern>
+ /ServiceAdmin
+ </url-pattern>
+ </servlet-mapping>
+
+ <!-- Configuration wizard servlet -->
+ <servlet>
+ <servlet-name>
+ Wizard
+ </servlet-name>
+ <servlet-class>
+ perfSONARWebAdmin.admin.wizard.Wizard
+ </servlet-class>
+ </servlet>
+ <servlet-mapping>
+ <servlet-name>
+ Wizard
+ </servlet-name>
+ <url-pattern>
+ /Wizard
+ </url-pattern>
+ </servlet-mapping>
<session-config>
<!-- Default to 5 minute session timeouts -->
@@ -92,8 +128,8 @@
</mime-mapping>
<welcome-file-list id="WelcomeFileList">
+ <welcome-file>index.html</welcome-file>
<welcome-file>index.jsp</welcome-file>
- <welcome-file>index.html</welcome-file>
<welcome-file>index.jws</welcome-file>
</welcome-file-list>
Added: trunk/geant2_java-as/conf/axis-1.4/default.css
Modified: trunk/geant2_java-as/conf/axis-1.4/index.html
===================================================================
--- trunk/geant2_java-as/conf/axis-1.4/index.html 2008-01-25 22:57:52
UTC (rev 3271)
+++ trunk/geant2_java-as/conf/axis-1.4/index.html 2008-01-28 11:04:12
UTC (rev 3272)
@@ -1,21 +1,77 @@
<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
- <meta http-equiv="Refresh" content="5;url=index.jsp">
- <title>Apache-Axis</title>
-</head>
+ <head>
+ <title>perfSONAR Service Web Administration page</title>
+ <link rel="stylesheet" type="text/css" href="main.css" />
+ <meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1"><style type="text/css">
+<!--
+body,td,th {
+ font-family: arial;
+}
+a:hover {
+ color: #000000;
+}
+-->
+</style></head>
+ <body>
+<div class="adminPanel" >
+
+<div class="banner">
+<table border="0" align="left" cellpadding="0" cellspacing="0">
+<tr>
+ <td><img src="perfsonar_logo.gif" alt="perfSONAR" width="192" height="94"
border="0" align="right"></td>
+</tr>
+</table>
-<body bgcolor="#FFFFFF">
+</div>
-<h1 align="center">Apache-AXIS</h1>
+<div class="mainWindow" >
-<blockquote>
- We've moved to an internationalized <a href="index.jsp">top page</a>. The
new URL should be automatically loaded after 5 seconds.<br>
-If you want to visit the new site immediately, please click the above link.
-</blockquote>
+<div class="sidebar" >
+<table border="0" cellpadding="0" cellspacing="0">
+<tr >
+<th>Administration</th>
+</tr>
+<tr>
+ <td><p><a href="Wizard" target="main" class="navtex" >Service</a></p>
+ <p><a href="Wizard" target="main" class="navtex" >Configuration</a></p>
+ <p><a href="Wizard" target="main" class="navtex" >Wizard</a></p></td>
+</tr>
+<tr>
+ <td><p><a href="ServiceAdmin?serviceProperties" target="main"
class="navtex" >Service</a></p>
+ <p><a href="ServiceAdmin?serviceProperties" target="main" class="navtex"
>configuration</a></p></td>
+</tr>
+<tr>
+ <td>
+ <p><a href="ServiceAdmin?loggingProperties" target="main" class="navtex"
>logging</a></p>
+ <p><a href="ServiceAdmin?loggingProperties" target="main" class="navtex"
>configuration</a>
+ </p>
+ </p></td>
+</tr>
+<tr><td><p><a href="eXistAdmin" target="main" class="navtex" >eXist
Database</a></p>
+ <p><a href="eXistAdmin" target="main" class="navtex"
>Administration</a></p></td>
+</tr>
+</table>
+<a href="http://www.perfsonar.net/partners.html"></a> <br>
+<img src="partners.gif" alt="perfSONAR project partners" border="0"/>
</a></div>
-<hr>
-Copyright © 2005 The Apache Software Foundation. All rights reserved.
-</body>
-</html>
+<div class="centerWindow" >
+ <object data="http://www.perfsonar.net" type="text/html" name="main"
width="101%" height="106%" class="main" >
+ <p>Sorry for the inconvenience we are having connectiong to the main
page...</p>
+ </object>
+</div>
+
+
+</div>
+
+<div class="footer" >PERFormance Service-Oriented Network monitoring
ARchitecture </div>
+
+
+
+
+
+</div>
+
+
+ </body>
+</html>
\ No newline at end of file
Added: trunk/geant2_java-as/conf/axis-1.4/main.css
Added: trunk/geant2_java-as/conf/axis-1.4/partners.gif
Property changes on: trunk/geant2_java-as/conf/axis-1.4/partners.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/geant2_java-as/conf/axis-1.4/perfsonar_logo.gif
Property changes on: trunk/geant2_java-as/conf/axis-1.4/perfsonar_logo.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: trunk/geant2_java-as/conf/servlet.properties.template
Added: trunk/geant2_java-as/conf/wizard.properties.template
Modified:
trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
===================================================================
---
trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
2008-01-25 22:57:52 UTC (rev 3271)
+++
trunk/geant2_java-as/src/main/java/org/perfsonar/service/authService/AuthNAction.java
2008-01-28 11:04:12 UTC (rev 3272)
@@ -3,6 +3,7 @@
import java.security.cert.X509Certificate;
import java.util.Calendar;
import java.util.Iterator;
+import java.util.Vector;
import net.geant.edugain.validation.ComponentID;
import net.geant.edugain.validation.Validator;
@@ -34,7 +35,11 @@
public static final String
SAML_ID="http://docs.oasis-open.org/wss/oasis-wss-saml-token-profile-1.1#SAMLV1.1";
private final String
WSSECHEADER_TIMESTAMP_NS="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
+ private final String
SOAPENV_NS="http://schemas.xmlsoap.org/soap/envelope/";
+ private final String
WSSECHEADER_NS="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
private final String WSSECHEADER_TIMESTAMP="Timestamp";
+ private final String WSSECHEADER="Security";
+ private final String WSSECHEADER_ACTOR="actor";
private static String TYPE_RESPONSE = "AuthNEEResponse";
private static String EVENT_TYPE_SUCCESS = "success.as.authn";
@@ -45,6 +50,7 @@
public AuthNAction(Validator val) throws PerfSONARException {
super();
this.val=val;
+ System.setProperty("org.apache.commons.logging.Log",
"org.apache.commons.logging.impl.Log4JLogger");
}
@Override
@@ -69,7 +75,7 @@
else if (sentSecToken!=null&&
sentSecToken.getParameterValue()!=null&&
sentSecToken.getParameterValue().equals(AuthNAction.SAML_ID)) {
- checkWSSecHeader(tsCrypto);
+// checkWSSecHeader(tsCrypto);
checkTimeStampInfo();
return processSAMLAuthN(request);
}
@@ -98,6 +104,8 @@
long
end=ts.getExpires().getTimeInMillis();
if
(now.before(ts.getCreated())||now.after(ts.getExpires())) {
logger.error("AuthNAction:
security token not valid. The token was created before or after right now");
+ logger.error("AuthNAction:
**** Security token ("+ts.getCreated().toString()+","+ts.getExpires()+")");
+ logger.error("AuthNAction:
**** Now ("+now.toString()+")");
throw new
PerfSONARException("error.authn.timestamp","Security token not valid. The
token was created before or after right now");
}
if ((end-start)>max) {
@@ -124,9 +132,22 @@
MessageContext mc=MessageContext.getCurrentContext();
try {
org.apache.axis.Message m=mc.getCurrentMessage();
+ SOAPHeader sh=(SOAPHeader)m.getSOAPHeader();
+ NodeList
nl=sh.getElementsByTagNameNS(WSSECHEADER_NS,WSSECHEADER);
+ Element wssec=(Element)nl.item(0);
+ String actor=wssec.getAttributeNS(SOAPENV_NS,
WSSECHEADER_ACTOR);
SOAPEnvelope env=m.getSOAPEnvelope();
Document doc=env.getAsDocument();
- secEngine.processSecurityHeader(doc, null, null,
tsCrypto);
+ Vector result=secEngine.processSecurityHeader(doc,
actor, null, tsCrypto);
+ logger.info("AuthNAction: result=
'"+(result!=null)+"'");
+ if (result==null) {
+ throw new
PerfSONARException("error.authn.soap","Null response checking the signature");
+ }
+ } catch (PerfSONARException e) {
+ e.printStackTrace();
+ String m = "Null response checking the signature";
+ logger.error(m);
+ throw e;
} catch (Exception e) {
e.printStackTrace();
String m = "Error getting the SOAP envelope of the
authN request";
@@ -187,6 +208,7 @@
logger.info("AuthNAction: subject DN:
'"+cert.getSubjectDN().toString()+"' issuer DN:
'"+cert.getIssuerDN().toString()+"'");
logger.info("AuthNAction: Validating X509
certificate");
ComponentID theUri=val.validate(cert);
+ logger.info("AuthNAction: cId: "+theUri.getURN());
} catch (Throwable e) {
e.printStackTrace();
String m = "AuthNAction: the X509 certificate is not
valid";
Added:
trunk/geant2_java-as/src/main/java/org/perfsonar/service/webadmin/ASHandler.java
Modified:
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
===================================================================
---
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
2008-01-25 22:57:52 UTC (rev 3271)
+++
trunk/perfsonar_base/src/main/java/org/perfsonar/service/base/authn/AADispatchSOAPProtocol.java
2008-01-28 11:04:12 UTC (rev 3272)
@@ -9,6 +9,8 @@
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.soap.SOAPHeaderElement;
+import javax.xml.xpath.XPathConstants;
+import javax.xml.xpath.XPathExpression;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
@@ -112,9 +114,12 @@
// if there is any assertion, it should be a
saml security token
NodeList nodelist2 =
org.apache.xpath.XPathAPI.selectNodeList(he, "//Assertion");
- if (parameter!=null&&nodelist2.getLength()>0) {
-
parameter.setTextContent(AADispatchSOAPProtocol.WSS_SAML);
- }
+ for (int i = 0; i < nodelist2.getLength();
i++) {
+ Element e=(Element)nodelist2.item(i);
+ if
(e.getAttribute("ValueType").equals("#SAMLBase64Binary")) {
+
parameter.setTextContent(AADispatchSOAPProtocol.WSS_SAML);
+ }
+ }
envelope.getHeader().addChildElement(he);
}
- perfsonar: r3272 - in trunk: geant2_java-as/ant geant2_java-as/conf geant2_java-as/conf/axis-1.4 geant2_java-as/conf/axis-1.4/WEB-INF geant2_java-as/src/main/java/org/perfsonar/service geant2_java-as/src/main/java/org/perfsonar/service/authService geant2_java-as/src/main/java/org/perfsonar/service/webadmin perfsonar_base/src/main/java/org/perfsonar/service/base/authn, svnlog, 01/28/2008
Archive powered by MHonArc 2.6.16.