NASA - National Aeronautics and Space Administration

+ NASA Homepage
+ NASA en Español
+ Contact NASA
Go
Planetary Data System - Engineering Node Banner

Installation

This document describes how to install the Filter software contained in the filter package. The following topics can be found in this section:

System Requirements

This section details the system requirements for installing and operating the Filter software.

Java Runtime Environment

The Filter software was developed using Java and will run on any platform with a supported Java Runtime Environment (JRE). The software was specifically developed under Java version 1.6 and has only been tested with this version. The following commands test the local Java installation in a UNIX-based environment:

% which java
/usr/bin/java

% java -version
java version "1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03-384-10M3425)
Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02-384, mixed mode)
        

The first command above checks whether the java executable is in the environment's path and the second command reports the version. If Java is not installed or the version is not at least 1.6, Java will need to be downloaded and installed in the current environment. Consult the local system administrator for installation of this software. For the do-it-yourself crowd, the Java software can be downloaded from the Oracle Java Download page. The software package of choice is the Java Standard Edition (SE) 6, either the JDK or the JRE package. The JDK package is not necessary to run the software but could be useful if development and compilation of Java software will also occur in the current environment.

Java Application Server

The Filter software requires a Java application server for hosting the application. The suggested application server for this release is Apache Tomcat with a minimal version of 6.0.20 through version 7.0.X. Consult the local system administrator for installation of this software. For the do-it-yourself crowd, see the Tomcat Deployment document for installation and configuration details. If viewing this document from the filter package, view the Tomcat Deployment document from the Engineering Node site.

Unpacking the Package

Download the filter package from the PDS FTP site. The binary distribution is available in identical zip or tar/gzip packages. The installation directory may vary from environment to environment but in UNIX-based environments it is typical to install software packages in the /usr/local directory and in Windows-based environments it is typical to install software packages in the C:\Program Files directory. Unpack the selected binary distribution file with one of the following commands:

% unzip filter-0.1.0-bin.zip
or
% tar -xzvf filter-0.1.0-bin.tar.gz
      

Note: Depending on the platform, the native version of tar may produce an error when attempting to unpack the distribution file because many of the file paths are greater than 100 characters. If available, the GNU version of tar will resolve this problem. If that is not available or cannot be installed, the zipped package will work just fine in a UNIX environment.

The commands above result in the creation of the filter-0.1.0 directory with the following directory structure:

  • README.txt

    A README file directing the user to the available documentation for the project.

  • LICENSE.txt

    The copyright notice from the California Institute of Technology detailing the restrictions regarding the use and distribution of this software. Although the license is strictly worded, the software has been classified as Technology and Software Publicly Available (TSPA) and is available for anyone to download and use.

  • conf/

    This directory contains the web.xml configuration file for the Filter software.

  • doc/

    This directory contains a local web site with the Filter documentation and other configuration management related information. Just point the desired web browser to the index.html file in this directory.

  • lib/

    This directory contains the dependent jar files for the application along with the jar file (filter-0.1.0.jar) containing the Filter software.

Deploying the Application

The Filter application is packaged as a JAR file and is intended for installation under a standard Java Application Server. For a Tomcat server deployment, the JAR file is copied directly to the lib directory within the Tomcat installation. Once this step is complete, the application is ready for operation.

Configuring the Application

In order for the Filter application to be applied properly, it needs to be specified in the Tomcat server configuration. To modify the Tomcat configuration, edit the web.xml file located in the $TOMCAT_HOME/conf directory. Add the following block to the end of the file, just inside the <\web-app> tag:

...
<!--
  Configure a filter to clean up parameters to avoid
  Cross-Site Scripting and Blind SQL Injection.
-->
<filter>
  <filter-name>XSSFilter</filter-name>
  <filter-class>gov.nasa.pds.portal.filter.XSSFilter</filter-class>
</filter>

<!-- Apply the filter to all end points. -->
<filter-mapping>
  <filter-name>XSSFilter</filter-name>
  <url-pattern>/*</url-pattern>
</filter-mapping>
...
      

The configuration above assumes that the filter will be applied to every web application installed on the Tomcat server. To be more specific, the filter could be applied to just the ds-view application with the following entry (multiple <filter-mapping> entries may be specified):

...
<!-- Apply the filter to all end points. -->
<filter-mapping>
  <filter-name>XSSFilter</filter-name>
  <url-pattern>/ds-view/*</url-pattern>
</filter-mapping>
...
      

Once the configuration is complete, save the file and restart the Tomcat server for the change to take effect.


FirstGov Logo
+ Freedom of Information Act
+ NASA 2003 Strategic Plan
+ NASA Privacy Statement, Disclaimer, and
   Accessiblity Certification

+ Copyright/Image Use Policy
NASA Logo
Curator: Emily.S.Law
Webmaster: Maryia Sauchanka-Davis
NASA Official: William Knopf
Last Updated:
+ Comments and Questions