InstallationThis document describes how to install the OpenDS software package. This package serve as the Security Service for the PDS 2010 system. The following topics can be found in this section: System RequirementsThe software that makes up this project consists of the OpenDS open source package that is available for download and installation. This release requires version 2.2.0 of OpenDS. This package requires Java and a Java Application Server to be installed in the target environment. Java Runtime EnvironmentThe OpenDS product was developed using Java and will run on any platform with a supported Java Runtime Environment (JRE). The software requires Java version 1.6. 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 ServerOpenDS requires a Java application server for hosting the web 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, the Apache Tomcat software can be downloaded from the Apache Tomcat page. Choose the version to download (6.0 or 7.0) from the menu on the left. Software Installation1. Install Directory ServerWe are choosing to install a directory server (OpenDS), within the application server so that it is accessible from other applications that require a standard LDAP interface.
Install OpenDS with QuickSetupLaunch QuickSetup Locally. % $OPENDS_HOME/setup
Configure the LDAP server with SSL using a self-signed certificateAssume that you are running following commands under $OPENDS_HOME/config directory.
2. Install Application ServerAlthough other application servers are supported (e.g., GlassFish), Apache Tomcat is the preferred application server.
ConfigurationThis section details the Directory Sever, the Tomcat Server, and the Tomcat Application configuration. Directory Server ConfigurationWith the software configuration complete, it is time to add groups and users to the directory server. The following configuration files, in the LDAP Data Interchange Format (LDIF), are available for configuring the directory server:
Execute the commands with the configuration files as follows: % $OPEN_DS/bin/ldapmodify -p 389 -h pdsops.jpl.nasa.gov -D "cn=Directory Manager" \ -w <password> -c -a -f pdspers_schema.ldif % $OPEN_DS/bin/ldapmodify -p 389 -h pdsops.jpl.nasa.gov -D "cn=Directory Manager" \ -w <password> -c -a -f pds_groups.ldif % $OPEN_DS/bin/ldapmodify -p 389 -h pdsops.jpl.nasa.gov -D "cn=Directory Manager" \ -w <password> -c -a -f pdsops_pers.ldif Tomcat Server ConfigurationType following command to generate a self-signed server certificate: % $JAVA_HOME/bin/keytool -genkey -alias virtualhostname -keyalg RSA \ -keystore /usr/local/tomcat7/.keystore The password you enter in the first password prompt will be the password for the keystore where your server certificate is stored. For the operational system, you may need to purchase a Certificate from a well-known Certificate Authority(CA) such as VeriSign or Thawte. After generating the server certificate, edit the Tomcat's server configuration file ($CATALINA_HOME/conf/server.xml) to have Tomcat server listening on the port 8080. The redirectPort option is the port that will be used when redirecting from http to https. <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" /> To make Tomcat listen on the port 8443, with an SSL transport, the following needs to be configured in the server.xml file. <Connector port="8443" protocol="HTTP/1.1" SSLEnabled="true" maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreFile="/usr/local/tomcat7/.keystore" keystorePass="password"/> Add an OpenDS realm to the Tomcat Server to authenticate the users with the Directory Server. <Realm className="org.apache.catalina.realm.JNDIRealm" debug="99" connectionName="cn=Directory Manager" connectionPassword="password" connectionURL="ldap://pdsdev.jpl.nasa.gov:389" userPattern="uid={0},ou=people,dc=pdsdev,dc=jpl,dc=nasa,dc=gov" roleBase="ou=groups,dc=pdsdev,dc=jpl,dc=nasa,dc=gov" roleName="cn" roleSearch="(uniqueMember={0})"/> To enable Single Sign On feature of the Tomcat server, make sure following element is not commented out. <Valve class="org.apache.catalina.authenticator.SingleSignOn"/> Tomcat Application Server ConfigurationAdd the security-constraint, role, and login-config elements to your application's web.xml file as shown below. <security-constraint> <web-resource-collection> <web-resource-name>registry</web-resource-name> <url-pattern>/*</url-pattern> <http-method>DELETE</http-method> <http-method>POST</http-method> <http-method>PUT</http-method> </web-resource-collection> <auth-constraint> <role-name>PDS_Affiliate</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>BASIC</auth-method> <realm-name>OpenDS</realm-name> </login-config> Add the following in the your application's web.xml ($CATALINA_HOME/webapps/yourapplication/WEB-INF/web.xml) in the <security-constraint> tag: <user-data-constraint> <transport-guarantee>CONFIDENTIAL</transport-guarantee> </user-data-constraint> This forces a switch from http to https, using the secure protocol. With this configuration, you can create a Tomcat application that will automatically be secured if accessing it at: http://localhost:8080/registry/extrinsics You will be automatically redirected to: https://localhost:8443/registry/extrinsics
|